I am setting up a test system with encryption and ZFS. I have been following this guide:
Full Disk Encryption (with ZFS root) for FreeBSD 9.x
I'm having trouble restoring my dump file. After I have set all the ZFS mount points:
I then try to do a restore into /boot/zfs/zroot as follows:
It then complains that the directories already exist (from the mount points created above). After the restore all these directories are empty.
So I started working throught the guide again but this time I didn't create the ZFS mount points and everything was restored into /boot/zfs/zroot just fine. The problem came when I tried to create the ZFS mount points again. After doing this all those mountpoint directories were empty again.
So my question is, how does one restore a dump file onto a ZFS partition AND create the ZFS mountpoints? Do I need to create the ZFS mount points and then FORCE a restore of my dump file over existing directories?
Thank you!
Full Disk Encryption (with ZFS root) for FreeBSD 9.x
I'm having trouble restoring my dump file. After I have set all the ZFS mount points:
Code:
zfs set checksum=fletcher4 zroot
zfs create -o compression=on -o exec=on -o setuid=off zroot/tmp
chmod 1777 /boot/zfs/zroot/tmp
zfs create zroot/usr
zfs create zroot/usr/home
cd /boot/zfs/zroot; ln -s /usr/home home
zfs create -o compression=lzjb -o setuid=off zroot/usr/ports
zfs create -o compression=off -o exec=off -o setuid=off zroot/usr/ports/distfiles
zfs create -o compression=off -o exec=off -o setuid=off zroot/usr/ports/packages
zfs create zroot/var
zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/crash
zfs create -o exec=off -o setuid=off zroot/var/db
zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/db/pkg
zfs create -o exec=off -o setuid=off zroot/var/empty
zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/log
zfs create -o compression=gzip -o exec=off -o setuid=off zroot/var/mail
zfs create -o exec=off -o setuid=off zroot/var/run
zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/tmp
chmod 1777 /boot/zfs/zroot/var/tmp
I then try to do a restore into /boot/zfs/zroot as follows:
# restore -rf /media/restore.dump
It then complains that the directories already exist (from the mount points created above). After the restore all these directories are empty.
So I started working throught the guide again but this time I didn't create the ZFS mount points and everything was restored into /boot/zfs/zroot just fine. The problem came when I tried to create the ZFS mount points again. After doing this all those mountpoint directories were empty again.
So my question is, how does one restore a dump file onto a ZFS partition AND create the ZFS mountpoints? Do I need to create the ZFS mount points and then FORCE a restore of my dump file over existing directories?
Thank you!