On Sun, 5 Nov 2000, Brian Tao wrote:
I cheat a bit specifically for the snapshot creation/deletion
checks... our backup server mounts the root of each Netapp it is responsible for, so it is very easy just to look in any .snapshot directory and do a "test -d" for the appropriate snapshot name. I'm
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.)
Until next time...
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 ---