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)

#ZFS

christian mock reshared this.

in reply to silverwizard

assuming /tmp or /run is writable,

zpool import -R /tmp/altroot <pool>

This entry was edited (1 year ago)
in reply to silverwizard

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).
in reply to Mike Gerdts

@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
in reply to silverwizard

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.
in reply to Mike Gerdts

@Mike Gerdts That... is the right idea, if I can find a mount

I feel like this is probably freebsd inside baseball though