Skip to content

Why does zpool import <my-pool> cause /var/log, /var/lib, /var/spool to be unmounted? #16154

Answered by IvanVolosyuk
MadProbe asked this question in Q&A
Discussion options

You must be logged in to vote

Not sure I understand the full detail of the problem, but when I setup a new system I usually do that in a chroot environment. You can import the pool with altroot using: zpool import -R /mnt/newsystem pool. Next, you can bind mount whatever is needed for the root of the new system:

mount -t tmpfs -o size=2G none $ROOT/var/tmp
mount -t tmpfs -o size=2G none $ROOT/tmp
mount -o bind /dev $ROOT/dev
mount -o bind /sys $ROOT/sys
mount -o bind /proc $ROOT/proc
mount -o rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 devpts $ROOT/dev/pts -t devpts
mount -t tmpfs -o size=2G,mode=01777 none $ROOT/dev/shm

You can copy /etc/resolv.conf to $ROOT/etc/resolv.conf for DNS resolver to work.Then si…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MadProbe
Comment options

Answer selected by MadProbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants