I'm trying to get a feel on how to deal with a ZFS root filesystem when booted 
off an alternate medium. For UFS, this simply meant finding the correct device 
(slice on a disk) to mount and then mount it, assuming there wasn't some volume 
manager in the way.

For ZFS, this is a little more complex, especially if you don't want to modify 
the state of anything in the root pool. The root pool can be imported with 
zpool -R. However, simply importing the pool won't cause the root filesystem 
itself to get mounted. I assume this is because of the default canmount=noauto 
setting on it. If you try to simply zfs mount the root filesystem, you'll get 
something like this:

cannot mount '/tmp/rpool': directory is not empty

That's because the other stuff in the root pool *did* get mounted on the 
import, so root is unable to get mounted over it.

So the question here is, what would be the proper way to mount the root 
filesystem (somewhere) without changing the state of anything in the pool ?

The only way I seem to be able to get / mounted is to use zfs set 
mountpoint=<dir>, but this changes the mountpoint for / in the pool. My 
observation is that this doesn't really matter with root, but I'd rather not do 
this nonetheless. Furthermore, if I have a separate /var in the root pool that 
also needs to be mounted, doing a zfs set mountpoint for /var *does* cause a 
problem when booting back off of the root pool.

It would seem that the answer would be the ability to run zfs mount with a -o 
mountpoint=<dir>, but this option doesn't seem to exist.

Any thoughts on this ? Am I missing something here ?

BTW, I'm currently trying this with the Solaris 10u6_04. It's possible that 
this may already be resolved in a later version (like OpenSolaris), but I need 
to be able to do this with Solaris 10.

Thanks,
John
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to