"Todd C. Merrill" tmerrill@mathworks.com writes: [...]
You don't need to mount the root. Every directory on a NetApp has a sekrit .snapshot directory which you can check:
15 m3:/mnt/scratch/toddc/test>ls -al total 16 drwxr-xr-x 2 toddc users 4096 Nov 7 10:03 ./ drwxr-xr-x 5 toddc users 4096 Nov 7 10:03 ../
16 m3:/mnt/scratch/toddc/test>ls -al .snapshot total 40 drwxrwxrwx 8 root root 16384 Nov 7 10:01 . drwxr-xr-x 3 toddc users 4096 Nov 7 10:03 .. ---------- 1 root root 0 Jan 28 1999 hourly.0 ---------- 1 root root 0 Jan 28 1999 hourly.1 ---------- 1 root root 0 Jan 28 1999 hourly.2 ---------- 1 root root 0 Jan 28 1999 nightly.0
(The "u" option to `ls` only seems to work at the root level, however.)
The "u" option (i.e. looking at the atime values) will work whenever the entries in .snapshot are "genuine", i.e. the directory actually existed at the time of the particular snapshot, e.g.
$ pwd /home/cet1 $ ls -alu .snapshot total 920 drwxrwxrwx 20 root root 4096 Dec 20 1999 . drwxr-xr-x 95 cet1 cet1 24576 Nov 7 16:35 .. drwxr-xr-x 94 cet1 cet1 24576 Nov 7 16:00 hourly.0 drwxr-xr-x 94 cet1 cet1 24576 Nov 7 12:00 hourly.1 drwxr-xr-x 94 cet1 cet1 24576 Nov 7 08:00 hourly.2 [...] drwxr-xr-x 92 cet1 cet1 24576 Oct 30 00:00 weekly.1 drwxr-xr-x 92 cet1 cet1 24576 Oct 23 00:00 weekly.2 drwxr-xr-x 91 cet1 cet1 24576 Oct 16 00:00 weekly.3
but not if they are dummy entries indicating that it didn't:
$ mkdir temp $ ls -alu temp/.snapshot total 16 drwxrwxrwx 20 root root 4096 Dec 20 1999 . drwxr-xr-x 3 cet1 cet1 4096 Nov 7 17:12 .. ---------- 1 root root 0 Mar 26 1999 hourly.0 ---------- 1 root root 0 Mar 26 1999 hourly.1 ---------- 1 root root 0 Mar 26 1999 hourly.2 [...] ---------- 1 root root 0 Mar 26 1999 weekly.1 ---------- 1 root root 0 Mar 26 1999 weekly.2 ---------- 1 root root 0 Mar 26 1999 weekly.3
e.g., for an account created last night:
$ ls -alu /home/spqr9/.snapshot total 40 drwxrwxrwx 20 root root 4096 Dec 20 1999 . drwxr-xr-x 3 spqr9 spqr9 4096 Nov 7 04:30 .. drwxr-xr-x 2 spqr9 spqr9 4096 Nov 7 16:00 hourly.0 drwxr-xr-x 2 spqr9 spqr9 4096 Nov 7 12:00 hourly.1 drwxr-xr-x 2 spqr9 spqr9 4096 Nov 7 08:00 hourly.2 [...] ---------- 1 root root 0 Mar 26 1999 weekly.1 ---------- 1 root root 0 Mar 26 1999 weekly.2 ---------- 1 root root 0 Mar 26 1999 weekly.3
In fact all of the ctime, mtime & atime for those dummy entries are set to the time of creation of the volume.
The root directory is safest for this sort of thing, as it's practically guaranteed to have been there at the time of the snapshot. :-)
Maybe this should be an RFE: as the attributes of the dummy entries could be anything NetApp wanted them to be, the atime could be the time of the snapshot as they are for the (comparatively) real ones.
It occurs to me to wonder what the atime of the .snapshot directory itself is ("Dec 20 1999" above). [The mtime and ctime are the time the last snapshot was taken.] I think that was when I upgraded from 5.2.2 to 5.3.4R2.
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.