We use a FreeNAS system as an NFS share and mount this share on several Linux systems. We make ZFS snapshots of the share in order to restore files if needed. With ZFS it is possible to make snapshots visible on the NFS share via a .zfs folder using the following command:
zfs set snapdir=visible zpool/zfilesystem
Now you can access the .zfs snapshot directory and see the snapshots in the following way:
user@hostname:/mnt/freenasDC/.zfs> ls
snapshot
user@hostname:/mnt/freenasDC/.zfs> cd snapshot
user@hostname:/mnt/freenasDC/.zfs/snapshot> ls
auto-20190719.1900-1w auto-20190723.0700-1w auto-20190724.1900-1w auto-20190726.0700-1w
auto-20190722.0700-1w auto-20190723.1900-1w auto-20190725.0700-1w
auto-20190722.1900-1w auto-20190724.0700-1w auto-20190725.1900-1w
However, a colleague of mine discovered that you can also change directory into the snapshot directory in the following way:
user@hostname:/mnt/freenasDC/.zfs> cd sna
user@hostname:/mnt/freenasDC/.zfs/sna> pwd
/mnt/freenasDC/.zfs/sna
user@hostname:/mnt/freenasDC/.zfs/sna> ls
auto-20190719.1900-1w auto-20190723.0700-1w auto-20190724.1900-1w auto-20190726.0700-1w
auto-20190722.0700-1w auto-20190723.1900-1w auto-20190725.0700-1w
auto-20190722.1900-1w auto-20190724.0700-1w auto-20190725.1900-1w
It is also possible to cd into: 's', 'sn', 'snap' etc...
We are wondering what is causing this phenomenon. Is it a ZFS feature? Is it a FreeNAS or FreeBSD thing? Could this somehow be caused by the Linux clients? Can someone shed some light on this. Thanks in advance.