try this. vol options vol0 nosnapdir on should be able to work
This appears to completely disable the directory -- i can't even cd into it.
I've been on systems where you didn't see it in, say, ls, but you could still change into the directory:
$ ls .snapshot ls: .snapshot: No such file or directory $ cd .snapshot $ ls hourly.0 hourly.2 [snip]
However, our installation can't do that. Has anyone been able to get this behavior over NFS?
raldi@research.netsol.com (Mike Schiraldi) writes:
try this. vol options vol0 nosnapdir on should be able to work
This appears to completely disable the directory -- i can't even cd into it.
I've been on systems where you didn't see it in, say, ls, but you could still change into the directory:
$ ls .snapshot ls: .snapshot: No such file or directory $ cd .snapshot $ ls hourly.0 hourly.2 [snip]
However, our installation can't do that. Has anyone been able to get this behavior over NFS?
I would be surprised if this is possible, as the NFS operations involved in "ls .snapshot" and "cd .snapshot" are too similar. What can be controlled is whether the .snapshot entry is visible to READDIR(PLUS), e.g. to "ls -A" on the parent directory, or to "find", etc.
Normally, the .snapshot entry is "visible" in this way just in those directories which are NFS mount points. I don't know of any way of making them invisible even there, i.e. an NFS equivalent of the cifs.show_snapshot option, which seems to be what you are asking for.
The justification I have heard for why the .snapshot "has" to be visible at the mount point is that in combination with the way that lookups of ".." are implemented on the filer, it is needed to make the algorithm used by getcwd(3c), realpath(3c), etc. produce an answer when the initial directory is inside a snapshot:
$ cd /home/cet1/reset/status/.snapshot/nightly.0 $ /bin/pwd /home/cet1/.snapshot/nightly.0/reset/status
[where /home/cet1 is the NFS mount point]. Personally, I would be quite happy to give that up in exchange for not having to educate users on how to avoid du, find, etc. crawling over snapshots and giving results that are confusing at best.
While I am at it, that's not the only way in which I would like more control over the visibility of snapshots! I want the ability to forbid access to snapshots via a particular NFS export, i.e. essentially the nosnapdir option but on a per-export basis.
Chris Thompson University of Cambridge Computing Service, Email: cet1@ucs.cam.ac.uk New Museums Site, Cambridge CB2 3QH, Phone: +44 1223 334715 United Kingdom.