Can one find a mount point just knowing the volume name?

Harald Barth haba@pdc.kth.se
Thu, 08 Feb 2001 19:59:39 +0100


> I've done this (don't ask for the code, Caltech owns it).  It's not easy; 
> you've got to look out for foreign cell mounts and cyclic symlinks, 
> symlinks to local filesystems, and make sure you don't go down another 
> mount to a volume you've already visited. 

Hm. 

1) Mount all your volumes kindof "flat" in one directory somewere.
   Something like 
   fs listvldb server | awk '$3 == "RW" {print "fs mkm "$1" "$1" -fast"}' | bash

2) Write a script find-all-mp-in-vol that descend into each one and
records all mount points you find there, but does not cross mount
points or other symbolic links. The script should produce a line 
with the volume and all its mount points. 

H.haba	#H.haba.mail #H.haba.src #transarc.com:root.cell

As it never crosses any mount points but the ones created in 1) it
should be safe of all that cyclic stuff users invent.

3) Call that script for every mountpoint you did in 1)

4) Process the list as you wish

Oh yes, 5) Mail the script here and tell me where I was wrong ;-)

Harald.