If you store files in the root file system of a zpool, it’s probably not so straightforward to access them from a different system, e.g. a live CD/DVD. Don’t panic. Here’s how.
- Import the zpool with both the no mount option and the altroot option:
zpool import -N -R /tmp/zfs poolname
You might even consider importing the zpool read-only:
zpool import -N -R /tmp/zfs -o readonly=on poolname
- Manually mount the root file system using the system
mountcommand, not the
mount -t zfs poolname /tmp/zfs
- Finally, mount the remaining file systems under the
/tmp/zfsmount point using the
zfs mount -a
Thanks goes to Volodymyr Kostyrko for providing the right answer and to Dr. Josef Karthauser for raising this issue in the first place.
I guess it’s still debateable whether it’s wiser to create new file systems below the root file system of a zpool, rather than using the initial file system provided by the zpool.