Data Backup and Recovery

Snapshot File System Metadata


When doing a LUN level snapshot is the metadata on at the file system location of the snapshot get updated?


Specifically is the "/vol/VM_XXXX_Lun/.snapshot/smvi_XXXX_novmsnap_recent" file that exists on my filer. Should the modify date or access date get updated everytime a new recent snapshot is taken?


I understand I can get this from looking at the logs or by accessing a snapmanager tool but I would like to know if simply by looking at the file system metadata if i can get a sense of how recent the most recent snapshot actually is.


Thank you  






Hi -


A snapshot is a point in time image of the volume in question.  Thus, once a snapshot is taken, nothing about the contents of that snapshot change, including any content metadata.  But that doesn't exactly answer your question.


To that point, a snapshot has a specific creation time, which you can query from the filer CLI/ZAPI etc.  That date identifies clearly when the snapshot was taken and is fixed.


But the path you indicate "/vol/VM_XXXX_Lun/.snapshot/smvi_XXXX_novmsnap_recent" refers to a snapshot by name and using VSC to create the snapshots (the "smvi" and the general naming mechanism).  Snapshots can have their name changed without changing the underlying contents of the snapshot, such as the date created.  There is no snapshot modify or access time equivalent, nor if you traversed a snapshot would any file image within the snapshot have any metadata changed...snapshot contents are read only.


SMVI (VSC) for scheduled jobs does do a name change on the snapshot though.  Specifically, for a job, the first snapshot is created with the appropriate name followed by some options followed by the word "recent".  During the next run, the "recent" snapshot is renamed to include the timestamp of the SMVI job when the snapshot was taken, then a new snapshot cycle is run with the "recent" keyword.  Thus under SMVI the snapshot that ends in "recent" is always the most recently taken snapshot and historically retained snapshots have historical timestamps.


Internally, the contents of the snapshot have the metadata they had when the snapshot was taken.  For example, the directory "/vol/VM_XXXX_Lun/" (to a user file system the "root" directory of the volume) has a modified date, last access date, etc. based on whatever uses that path.  The path "/vol/VM_XXXX_Lun/.snapshot/smvi_XXXX_novmsnap_recent" refers to the same "root" directoy of the volume as it existed when the named snapshot was taken.  Hence, that path will have modification, last access, and other metadata equivalent to what the real volume had when the snapshot was taken.  So if the metadata on the root volume shows really old dates, the metadata in the snapshots will show similarly old dates.  



Hope this helps.


Bob Greenwald

Senior Systems Engineer | cStor

NCIE SAN ONTAP, Data Protection




Kudos and accepted solutions are always appreciated.