Solved Unvisible /usr/.zfs snapshot catalog

Hello,

FreeBSD 10.1 installed on ZFS root. I make snapshot and set snapshot directory visible.
Code:
zfs snapshot zroot/usr@backup1
zfs set snapdir=visible zroot/usr
I want to see snapshot in /usr/.zfs catalog, but it invisible

Code:
# ls -la /usr 
total 189 
drwxr-xr-x  16 root  wheel  16 15 апр 12:24 . 
drwxr-xr-x  17 root  wheel  24 14 апр 18:49 .. 
drwxr-xr-x  2 root  wheel  488  3 апр 15:47 bin 
drwxr-xr-x  2 root  wheel  2 12 ноя 00:03 games 
...

But in other dataset catalog .zfs folder present

Code:
# ls -la /usr/home/ 
total 34 
drwxr-xr-x  5 root  wheel  4  9 апр 12:54 . 
drwxr-xr-x  16 root  wheel  16 15 апр 12:24 .. 
dr-xr-xr-x  4 root  wheel  4  1 апр 15:52 .zfs
....

The same situation in /var dataset

This is output from zfs get snapdir
Code:
#zfs get snapdir 
NAME  PROPERTY  VALUE  SOURCE 
zroot  snapdir  hidden  local 
zroot/ROOT  snapdir  hidden  inherited from zroot 
zroot/ROOT/default  snapdir  hidden  inherited from zroot 
zroot/tmp  snapdir  hidden  inherited from zroot 
zroot/usr  snapdir  visible  local 
zroot/usr@backup  snapdir  -  - 
zroot/usr@backup1  snapdir  -  - 
zroot/usr/home  snapdir  visible  inherited from zroot/usr 
zroot/usr/ports  snapdir  visible  inherited from zroot/usr 
zroot/usr/src  snapdir  visible  inherited from zroot/usr 
zroot/var  snapdir  visible  local 
zroot/var/crash  snapdir  visible  inherited from zroot/var 
zroot/var/log  snapdir  visible  inherited from zroot/var 
zroot/var/mail  snapdir  visible  inherited from zroot/var 
zroot/var/tmp  snapdir  visible  inherited from zroot/var
Please help me to make /usr/.zfs visible.

Best regards
Dmitry.
 
zroot/usr is probably not mounted (this is good, don't try to change this). Check with zfs get canmount zroot/usr.

What you think should be in /usr is actually in the zroot/ROOT/default dataset (so snapshots are in /.zfs). This is the default if you selected the ZFS option in the installer. It is done to support boot environments AFAIK. FreeBSD's loader does not support them directly now but might in the future (you currently have to set vfs.root.mountfrom manually in the loader if you want to boot with another root dataset).
 
tobik, Thank you very much!

Please explain me how I can access
zroot/usr@backup
zroot/usr@backup1

I don't see it in /.zfs/snapshot/
Code:
# zfs set snapdir=visible zroot/ROOT/default
# ls -la /.zfs/snapshot/
total 0
dr-xr-xr-x  2 root  wheel  2  1 янв  1970 .
dr-xr-xr-x  4 root  wheel  4  1 апр 15:52 ..
 
Back
Top