ZFS Missing .zfs directory?

Code:
# zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
...
zroot/usr            243G   448G    96K  /usr
...

Code:
# zfs list -t snapshot | grep zroot/usr@
zroot/usr@20250709033000              0B      -    96K  -
zroot/usr@20250711033000              0B      -    96K  -
zroot/usr@20250712033000              0B      -    96K  -
...

Code:
# cd /usr/.zfs
/usr/.zfs: No such file or directory.

So there's a snapshot but no snapshot directory? Where are they?

They can be deleted as:

Code:
# zfs destroy zroot/usr@20250710033000

did indeed remove that snapshot from the list of snapshots.
 
I believe that there is a property on the zpool controlling the visibility of the .zfs directory. Not sure what it is, but maybe list all the properties and grep -i snap may tell you.
A possible reason for it to be hidden by default is backuptools may not parse things correctly and add snapshots instead of just live data.
 
zfs get snapdir zroot/usr

Code:
     snapdir=disabled|hidden|visible
       Controls whether the .zfs directory is disabled, hidden or visible in
       the root of the file system as discussed in the Snapshots section of
       zfsconcepts(7).  The default value is hidden.
zfsprops(7)

Also, your snapshots are empty, zroot/usr is essentially a placeholder, it's not actually mounted and does not contain any files. The /usr directory (and its content) lives in the zroot/ROOT/default dataset (assuming you haven't messed with BEs and everything's still standard). So /usr/.zfs does not exist.

Code:
# zfs list -o canmount,mounted,mountpoint zroot/usr
CANMOUNT  MOUNTED  MOUNTPOINT
off       no       /usr
 
  • Like
Reactions: mro
Back
Top