The snapshot pseudo-directory gives NFS clients access to the contents of filesystem snapshots. The snapshot directory allows the end-user to recover deleted or modified files autonomously with no admin assistance. Using snapshot directory, the end-user can run a backup from a static view of the filesystem, without mounting the snapshot.

This feature supports customers migrating from existing NAS solutions by allowing the admin to determine the way the snapshot directory is named.

Visibility and contents of the snapshot directory

  • The snapshot directory appears, and is accessed, as a regular folder. 
  • Its name is configurable when the filesystem is created. The default name is .snapshot
  • Only RO snapshots that have never been writable are visible and accessible in the snapshot directory.
  • Visibility of the snapshot directory:
    • The visibility of snapshot directory is configurable per export.
    • A snapshot directory that is not visible can still be accessed by providing its specific path.
    • Snapshots of snapshots are not accessible from the snapshot directory. They can be accessed if mounted to the first-level snapshots.
  • The snapshot directory is accessible from any folder. 
    • Replication snapshots are not visible in the snapshot directory.


Earlier InfiniBox software versions did not impose any restrictions on directory names, and a customer could have a directory named .snapshot. However, following an upgrade to a software version that supports the snapshot directory feature, the existing folder would not be accessible. To resolve this, the customer should disable the snapshot directory feature on the specific filesystem, rename the existing directory, and enable the feature again.

Snapshot refresh

Whenever a snapshot is refreshed:

  • The snapshot is accessible to the user as it was prior to the refresh operation.
  • Files that existed in the pre-refreshed snapshot and whose content was refreshed will display the refreshed content to the user.
  • Files that are added to the snapshot during the refresh operation are visible after the refresh operation is complete.

The snapshot directory of a replicated filesystem

  • When replicating from an InfiniBox system with a software version that supports snapshot directory to an InfiniBox with a software version that does not:
    • The snapshot directory will not appear on the target InfiniBox system.
    • Upon upgrading the target InfiniBox system to a software version that supports snapshot directory, the snapshot directory will be created automatically.
  • When replicating from an InfiniBox system with a software version that does not support snapshot directory to an InfiniBox with a software version that does:
    • A snapshot directory will be automatically created on the target.

Viewing the I/O performance of snapshots via the snapshot directory

Each I/O on a snapshot accessed via the snapshot directory folder is counted as an access to the snapshot, not as an access to the parent filesystem. This includes every aspect of the I/O "target": filesystem, export, TreeQ and file path.

Enabling the feature for an existing filesystem

Enabling the snapshot directory feature for a filesystem takes effect only after remounting the export.

Recovering deleted files using the .Snapshot directory

The following is an example of how to recover files from the .Snapshot directory folder without the assistance of an administrator.

Step 1. Use the "ls" command to see the files in the regular folder:

root@ubuntu-1:/mnt/fs-test-1# ls
file1.txt  file2.txt  file3.txt  file4.txt  file5.txt

Step 2. Delete a file, then re-display the files in the folder:

root@ubuntu-1:/mnt/fs-test-1# rm file3.txt
root@ubuntu-1:/mnt/fs-test-1# ls
file1.txt  file2.txt  file4.txt  file5.txt

Step 3. Move to the .Snapshot folder (the .Snapshot is named snap-fs-test-1), and display the files. It will contain all of the files in the snapshot:

root@ubuntu-1:/mnt/fs-test-1# cd .snapshot
root@ubuntu-1:/mnt/fs-test-1/.snapshot# cd snap-fs-test-1
root@ubuntu-1:/mnt/fs-test-1/.snapshot/snap-fs-test-1# ls
file1.txt  file2.txt  file3.txt  file4.txt  file5.txt

Step 4. Use the "cp" command to copy a file from the .Snapshot folder to the original location. The "cp" command allows you to rename the file if you desire. In this example, the file was renamed file3restored.txt:

root@ubuntu-1:/mnt/fs-test-1/.snapshot/snap-fs-test-1# cp file3.txt /mnt/fs-test-1/file3restored.txt
root@ubuntu-1:/mnt/fs-test-1/.snapshot/snap-fs-test-1# cd ..
root@ubuntu-1:/mnt/fs-test-1/.snapshot# cd ..
root@ubuntu-1:/mnt/fs-test-1# ls
file1.txt  file2.txt  file3restored.txt  file4.txt  file5.txt
Was this article helpful?
0 out of 0 found this helpful

0 out of 0 found this helpful

Last edited: 2022-08-06 08:09:33 UTC