Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
Subject: Re: /etc/mtab (was Re: Rescue disk set?)
Date: Wed, 25 Dec 1996 09:48:11 -0700 (MST)	[thread overview]
Message-ID: <199612251648.JAA14855@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <19961225102941.6325.qmail@brouhaha.com>

> 
> > For that use "mount -n".  You do not **want** to update /etc/mtab
> > on read only file system.

Eric "Red Hat" Smith complained:
> 
> /etc/mtab is a never-ending source of frustration for me.  I don't understand
> why it exists at all.

There are two issues here.  One is /etc/mtab~ file, which is a lock
file.  It is not likely that you would want to see a race condition
from two processes trying to mount the same file system and results
of such action. :-)  This could easily happen, especially with
automounter in an operation.  Mounting is a rather prolonged operation.
I guess that assumption is that you are using '-n' flag mostly in
special situations (boot, single)  and then you know what you are doing. :-)

The other one is that /proc pseudo-filesystem is a relatively new
invention, only few kinds of Unix systems around have it, and there
is really no "standard" or "custom" which would tell you what you will
find there.  Even on Linux it is, so far, mostly undocumented (quick,
how do you bump up a number of available file descriptors in current
kernels?).  Therefore portable programs cannot rely on reading
/proc/mounts but have to rely on /etc/mtab (no idea what POSIX has
to say here, if anything at all).  Also lots of various sources
likely predate an existence of /proc, so we have a "legacy" issue here.

As an aside, on my Linux-Intel box I have seen a few times an incident
when /proc "jumped i-node" and all of sudden a contents of /proc
was replaced with a contents of /etc, for example.  Without /etc/mtab
I would not be even able to reboot more or less cleanly.

> I thought
> part of the "Unix Philosophy" was that it provided "enough rope".

To an extent.  You have '-n' options to mount and umount after all. :-)

  Cheers,
  Michal

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

       reply	other threads:[~1996-12-25 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19961225102941.6325.qmail@brouhaha.com>
1996-12-25 16:48 ` Michal Jaegermann [this message]
1996-12-25 10:29 /etc/mtab (was Re: Rescue disk set?) Eric Smith
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox