I would love to use sysutils/beadm to manage all the snapshots/clones for the entire system, because it is so easy to use. From what I have read that is not possible if you have a data set where tank0/usr is not a child of tank0/ROOT. The reason for that is to keep the core system separate from the local. That makes perfect sense, but I still want to keep snapshots of /usr especially before installing or upgrading a port or package. So I tried to do it manually, but I seem to have few problems.
Then I delete some test files in /usr in order to see if I can recover them from the snapshot. So I create a clone
Why is it mounted as legacy and not at /mnt/usrTEST? I can't access this clone. I tried with a different filestystem so I created a snapshot and then a clone of tank0/usr/home. This gets mounted properly and I can access the deleted files.
However I noticed that it is mounted at /mnt/usr and not at /usr where the original filesytem is mounted. Is there a reason for this? Could this create any problems in the future especially if want to promote this clone?
So why clones of /usr get mounted as legacy, how can I change this? Why is there a slight difference of mount point of other child filesystems of /usr. WIll any of this create any problems in the future.
Is there another approach to tackle this issue? How do people work with snapshots for /usr
Thanks
# zfs list
Code:
NAME USED AVAIL REFER MOUNTPOINT
tank0 8.62G 20.7G 144K legacy
tank0/ROOT 1.07G 20.7G 144K legacy
tank0/ROOT/default 1.07G 20.7G 1.07G /mnt
tank0/swap 2.06G 22.7G 16.3M -
tank0/tmp 288K 20.7G 288K /tmp
tank0/usr 2.98G 20.7G 144K /mnt/usr
tank0/usr/home 292K 20.7G 196K /usr/home
tank0/usr/jails 1.89G 20.7G 260K /usr/jails
tank0/usr/obj 144K 20.7G 144K /usr/obj
tank0/usr/ports 1.08G 20.7G 810M /usr/ports
tank0/usr/ports/distfiles 297M 20.7G 297M /usr/ports/distfiles
tank0/usr/src 144K 20.7G 144K /usr/src
tank0/var 680K 20.7G 144K /mnt/var
tank0/var/audit 144K 20.7G 144K /var/audit
tank0/var/log 240K 20.7G 240K /var/log
tank0/var/tmp 152K 20.7G 152K /var/tmp
#zfs snapshot tank0/usr@test
#zfs list -t snapshot
Code:
NAME USED AVAIL REFER MOUNTPOINT
tank0/usr@test 0 - 144K -
Then I delete some test files in /usr in order to see if I can recover them from the snapshot. So I create a clone
#zfs clone tank0/usr@test tank0/usrTEST
#zfs list
Code:
NAME USED AVAIL REFER MOUNTPOINT
...
tank0/usr 2.98G 20.7G 144K /mnt/usr
tank0/usrTEST 8K 20.7G 144K legacy
...
Why is it mounted as legacy and not at /mnt/usrTEST? I can't access this clone. I tried with a different filestystem so I created a snapshot and then a clone of tank0/usr/home. This gets mounted properly and I can access the deleted files.
Code:
...
tank0/usr/home 292K 20.7G 196K /usr/home
tank0/usr/homeTEST 8K 20.7G 196K /mnt/usr/homeTEST
...
However I noticed that it is mounted at /mnt/usr and not at /usr where the original filesytem is mounted. Is there a reason for this? Could this create any problems in the future especially if want to promote this clone?
So why clones of /usr get mounted as legacy, how can I change this? Why is there a slight difference of mount point of other child filesystems of /usr. WIll any of this create any problems in the future.
Is there another approach to tackle this issue? How do people work with snapshots for /usr
Thanks