SUMMARY: lo mounts

From: Greg Roberts (gregr@cibc.com)
Date: Wed Aug 09 1995 - 10:09:16 CDT


Well, there was quite a bit of interest expressed as to the use of lo mounts
and there possible effect on performance (original Q and replies in full follow
at the end).

The general concensus from the replies was that the approach of using lo mounts
in the (v)fstab file as a way to centrally manage required changes in / and /usr
was ONE possible sound way to approach this, and that the memory/performance
impact of them is neglible in space and zero in performance (for file lookups).

A good point made a number of times was that, if I am already running automount
(which I am), the auto.direct map would be a good way of implementing this type
of scheme also, and this would restrict all / and /usr mods to this map AND can
be distributed via NIS/NIS+, which is a very good point.

So, to keep / and /usr manageable, here are four possible approaches:

1. Dump the tree actually in / or /usr ... BAD ... not scalable/manageable/upgrades
   become a nightmare ... need I continue ...
2. Create symbolic links ... must keep a record of where these links are for future
   upgrades, don't know until you use them if they are valid (but supremely better
   approach then 1 above).
3. Use "lo" mounts ... getting there, but must update each individual machine, and
   need to manually create the lo mount point on each host ... at least these dependecies
   are "documented" in one file and resolved at boot time.
4. Use automounter ... bingo!! (at least to me, when I look after around 60 prod machines
   that get somewhat regular updates).

I'm changing to "4" above, and keep /, /usr and vfstab as SIMPLE as possible.

Thanks to the following:
mshon@sunrock.East.Sun.COM (Michael J. Shon {*Prof Services} Sun Rochester)
Kevin.Sheehan@uniq.com.au (Kevin Sheehan {Consulting Poster Child})
 
and any others that arrive later.

Cheers
Greg Roberts
gregr@cibc.com

ORIGINAL QUESTION ========================
|
|I have a question regarding an approach to loopback mounts that I
|use and becomes more important with my migration to Sol24 underway.
|
|I generally like to keep / and /usr as close top pristeen as I can to
|make upgrades and rebuilds much easier.
| To this end, I generally mount
|anything that MUST be under / or /usr via a loopback mount, as I see
|these links/mounts being specified in one file only (I run a script
|through the fstab file at boot to ensure all "lo" mount points exist).
|Currently, my SunOS setup has 10 loopback mounts for each client.
|
|A fellow SA noted that mounted file systems are recorded in the running kernel and
|therefore take up space in incore tables, and that these mounts could all
|be replaced with symbolic links which ony get evaluated at time of use and
|are therefore better (I'm not saying I agree, but that was the stat't - in
|fact, I'm currently leaning towards violent disagreement).
|
|My Q is:
|Is there any problems with generally using loopback mounts instead of symbolic
|links at any time, as I find loopback mounts easier to manage and maintain, as
|one file indicates all of these mounts, whereas, loopback mounts, and their
|pointing to non-existent dirs cannot be checked until they are used.
|At least with loopback mounts, their sanity is checked at boot time.
|Is there a point at which excessive loopback mounts does hurt performance,
|or is it totally negligible.
|
|
|Well that's what I think ... is this even worth spending any time on!?
|If anyone thinks so, I'll summarize, else, sorry about the bandwidth.
|
|Cheers
|Greg Roberts
|gregr@cibc.com
|
>========================================================================

REPLIES:

======= Kevin Sheehan ===================================================
 
Well, symbolic links are cheaper, but loopback mounts are not terribly
expensive either. You don't want symbolic links from one NFS filesystem
to another, as that causes a lot of unnecessary lookups.

Have you considered using the automounter instead??

                l & h,
                kev

======== Michael J. Shon ===================================================
 
I don't know of any problems with loopback mounts.

 

You *can* check the existance of the things pointed to by symbolic links.

        ls -lLd link 2>&1

will either show the pointed-to directory, or will report
"whatever_name: No such file or directory"
 
Loopback mounts have some space overhead in the mount table, but have
NO additional overhead in file lookups. However, symlinks have additional
overhead EVERY time. It is generally negligible, but some exotic file-
naming schemes involve links to links to links to links, and at that
point, it can be noticeable; especially over NFS.

If loopbacks work for you, use them.
The only drawbacks that I see are
        1) you have to maintain vfstab
        2) most people know nothing about them, and
                won't understand how your system works.

There is another alternative which you should investigate-
use an automounter direct map.
The automounter will use a loopback mount for the mounts, so it's
just like doing them yourself.

You will still have all of the mounts
documented in a single place (the auto_direct file), but you won't
have to mount them all of the time - just when being used.
You can share the auto_direct mappings among multiple systems using
NIS or NIS+ and that can make it MUCH easier to support a lot of
similar systems.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:31 CDT