Wednesday, December 13, 2017

Finding ZFS .zfs/snapshots directory in OpenSolaris




My home directory in OpenSolaris 0906 is part of the zpool rpool. I can view the pool in zpool list. I can view the file system in zfs list. I can create snapshots. I can use zfs list and see a list of the snapshots I've taken. It's my understanding there should be a .zfs directory inside /export/home/test at /export/home/test/.zfs






zfs snapshot rpool/export/home/test@1 


creates my snapshot successfully







zfs list -t snapshot 


shows my snapshots successfully






I can't figure out where to find the snapshots. I see no .zfs directory anywhere.




Any hints where else I should look or what else I should do to find the .zfs directory and the snapshots?


Answer



Change the snapdir property of the dataset if you need to make it visible.



# ls -la /rpool/
total 6
drwxr-xr-x 5 root root 4 2010-09-14 05:21 .
drwxr-xr-x 25 root root 25 2010-11-18 13:18 ..
dr-xr-xr-x 4 root root 4 2010-09-14 05:15 .zfs
drwxr-xr-x 3 root root 3 2010-09-14 05:15 boot

drwxr-xr-x 2 root root 3 2010-09-14 05:21 etc

# zfs set snapdir=hidden rpool

# ls -la /rpool/
total 6
drwxr-xr-x 4 root root 4 2010-09-14 05:21 .
drwxr-xr-x 24 root root 25 2010-11-18 13:18 ..
drwxr-xr-x 3 root root 3 2010-09-14 05:15 boot
drwxr-xr-x 2 root root 3 2010-09-14 05:21 etc


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...