Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chained mount

Status
Not open for further replies.

nolim073

IS-IT--Management
Nov 9, 2006
21
US
Hello,
i have this file structure
/prod
/prod/x1
/prod/x2

/prod is a dedicated file system and x1 and x2 are dirs.

Now some users want me to create a dir x3 under /prod and mount a another file system..... my question is it allowed?
ie /prod/x3 --> can this be another dedicated file system or will doing this will hide x1 and x2?
 
What they are asking for can be done. The only catch is: when mounting everything - like after a reboot - you must make sure that /prod gets mounted first.

IE if you mount in this order:

/prod
/prod/x3

you will be able to see /prod, /prod/x1, /prod/x2 and /prod/x3 (the new sub mount point)

If you mount in this order:

/prod/x3
/prod

you will only see /prod, /prod/x1 and /prod/x2. /prod/x3 will be hidden until you umount /prod (x1 and x2 would go with it).

scott
 
scott said:
If you mount in this order:

/prod/x3
/prod

you will only see /prod, /prod/x1 and /prod/x2. /prod/x3 will be hidden until you umount /prod (x1 and x2 would go with it).

One way to prevent this is to avoid creating a /prod/x3 directory on the root filesystem, that way you will be unable to mount /prod/x3 until /prod (which contains an x3 directory/mount point) is mounted.

Annihilannic.
 
You could also create the new system and mount it somewhere else. Then create a symbolic link in the /prod directory.

Code:
mount /new_fs
cd /prod
ln -s /new_fs x3
 
thats what I love about *nix. So many ways to do things and they are all right. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top