Skip to main content

Hey #zfs people

if I have a pool I want to view when I can't mount it - any way to view files? (Read only root so mountpoints can't create)

christian mock reshared this.

assuming /tmp or /run is writable,

zpool import -R /tmp/altroot <pool>
This entry was edited (4 months ago)
not sure about Linux or FreeBSD, but on Solaris the pool import succeeds even if the mounts fail. That is “zpool import” may succeed, allowing you to change the mountpoint (zfs set mountpoint=/mnt pool/fs) or use a temporary mountpoint (zfs mount -o mountpoint=/mnt pool/fs).
@Mike Gerdts yeah - on FreeBSD I can do -R for an altroot but that also failed, I assumed /mnt would be mountable on livecd but sadly no
can you creat a ramdisk and mount that somewhere, then create the required hierarchy in the mounted ramdisk fs? Or maybe mounting a tmpfs filesystem is an option.
@Mike Gerdts That... is the right idea, if I can find a mount

I feel like this is probably freebsd inside baseball though