I have a need to get lists of snapsnots on my filers. However, since the filers are heavily used, the snap command takes minutes to return. I suspect they take that long in order to calculate the usage statistics. Is there another way, a faster way, to just get a list of the snapshot names and timestamps?
A listing of the directories under a .snapshot directory give the names, but not accurate timestamps.
Until next time...
Todd C. Merrill The Mathworks, Inc. 508-647-7000 x7792 3 Apple Hill Drive, Natick, MA 01760-2098 508-647-7001 FAX tmerrill@mathworks.com http://www.mathworks.com ---
----- Original Message ----- From: "Todd C. Merrill" tmerrill@mathworks.com To: toasters@mathworks.com Sent: Friday, May 26, 2000 6:04 AM Subject: snap command
I have a need to get lists of snapsnots on my filers. However, since the filers are heavily used, the snap command takes minutes to return. I suspect they take that long in order to calculate the usage statistics. Is there another way, a faster way, to just get a list of the snapshot names and timestamps?
A listing of the directories under a .snapshot directory give the names, but not accurate timestamps.
Yes, it does give accurate timestamps.
If you refer to your netapp sysadmin manual you will find your question is answered for you.
The "timestamp" you are looking at is probably the timestamp of last modification. Since the snapshot you are looking at is a copy of your root inode, what you are seeing is the last modification time of your root inode, when the snapshot was taken, just like any other file or directory. The .snapshot directory will report those accurately.
What you want to know, of course, is the time the .snapshot was created. Well, since snapshots are read-only, their access time cannot be updated and thus do not really reflect the time of last access. So NTAP uses this field to report the snapshot creation time instead. So, if you use "ls -lu" you will see the timestamps for the creation of the snapshots.
Bruce
PS - Don't feel bad; this is one of the most commonly asked questions.
"Todd C. Merrill" tmerrill@mathworks.com writes: [...]
A listing of the directories under a .snapshot directory give the names, but not accurate timestamps.
It does if you display the atime values:
$ ls -lut /toaster-mountpoint/.snapshot total 144 drwxr-xr-x 76 root root 4096 May 26 16:00 hourly.0 drwxr-xr-x 76 root root 4096 May 26 12:00 hourly.1 drwxr-xr-x 76 root root 4096 May 26 08:00 hourly.2 drwxr-xr-x 76 root root 4096 May 26 00:00 nightly.0 drwxr-xr-x 76 root root 4096 May 25 20:00 hourly.3 drwxr-xr-x 76 root root 4096 May 25 16:00 hourly.4 drwxr-xr-x 76 root root 4096 May 25 12:00 hourly.5 drwxr-xr-x 76 root root 4096 May 25 08:00 hourly.6 drwxr-xr-x 76 root root 4096 May 25 00:00 nightly.1 drwxr-xr-x 76 root root 4096 May 24 20:00 hourly.7 drwxr-xr-x 76 root root 4096 May 24 00:00 nightly.2 drwxr-xr-x 76 root root 4096 May 23 00:00 nightly.3 drwxr-xr-x 76 root root 4096 May 22 00:00 weekly.0 drwxr-xr-x 76 root root 4096 May 21 00:00 nightly.4 drwxr-xr-x 76 root root 4096 May 20 00:00 nightly.5 drwxr-xr-x 76 root root 4096 May 15 00:00 weekly.1 drwxr-xr-x 76 root root 4096 May 8 00:00 weekly.2 drwxr-xr-x 76 root root 4096 May 1 00:00 weekly.3
Chris Thompson University of Cambridge Computing Service, Email: cet1@ucs.cam.ac.uk New Museums Site, Cambridge CB2 3QG, Phone: +44 1223 334715 United Kingdom.