linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* devfs mounted twice in linux 2.4.19-pre3
@ 2002-03-17 11:19 Felix Braun
  2002-03-18 10:39 ` Denis Vlasenko
  2002-03-20  6:30 ` Richard Gooch
  0 siblings, 2 replies; 9+ messages in thread
From: Felix Braun @ 2002-03-17 11:19 UTC (permalink / raw)
  To: rgooch; +Cc: linux-kernel

Hi Richard,

I just noticed that devfs is listed twice in /proc/mounts in linux
2.4.19-pre3, which confuses my shutdown script. Under 2.4.19-pre my
/proc/mounts looks like this:

devfs /dev devfs rw 0 0
/dev/ide/host0/bus0/target0/lun0/part5 / reiserfs rw 0 0
none /dev devfs rw 0 0
/proc /proc proc rw 0 0
/dev/discs/disc0/part1 /dos vfat rw 0 0
/dev/discs/disc0/part9 /opt reiserfs rw,noatime 0 0
none /dev/pts devpts rw 0 0
/dev/discs/disc0/part7 /usr reiserfs rw 0 0
none /dev/shm tmpfs rw 0 0

whereas under 2.4.18 the first line didn't show up. Is that a
misconfiguration on my part?

Bye
Felix

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-17 11:19 devfs mounted twice in linux 2.4.19-pre3 Felix Braun
@ 2002-03-18 10:39 ` Denis Vlasenko
  2002-03-18 12:38   ` Paul P Komkoff Jr
  2002-03-18 15:36   ` Richard Gooch
  2002-03-20  6:30 ` Richard Gooch
  1 sibling, 2 replies; 9+ messages in thread
From: Denis Vlasenko @ 2002-03-18 10:39 UTC (permalink / raw)
  To: Felix Braun, rgooch; +Cc: linux-kernel

On 17 March 2002 09:19, Felix Braun wrote:
> Hi Richard,
>
> I just noticed that devfs is listed twice in /proc/mounts in linux
> 2.4.19-pre3, which confuses my shutdown script. Under 2.4.19-pre my
> /proc/mounts looks like this:
>
> devfs /dev devfs rw 0 0
> /dev/ide/host0/bus0/target0/lun0/part5 / reiserfs rw 0 0
> none /dev devfs rw 0 0
> /proc /proc proc rw 0 0
> /dev/discs/disc0/part1 /dos vfat rw 0 0
> /dev/discs/disc0/part9 /opt reiserfs rw,noatime 0 0
> none /dev/pts devpts rw 0 0
> /dev/discs/disc0/part7 /usr reiserfs rw 0 0
> none /dev/shm tmpfs rw 0 0
>
> whereas under 2.4.18 the first line didn't show up. Is that a
> misconfiguration on my part?

Maybe you mount devfs manually after kernel did the same?
devfs /dev devfs rw 0 0 - most probably mounted by initscripts
none /dev devfs rw 0 0 - by kernel

Look into /var/log/messages for:
kernel: VFS: Mounted root (nfs filesystem).
kernel: Mounted devfs on /dev   <============ do yo have this?
--
vda

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-18 10:39 ` Denis Vlasenko
@ 2002-03-18 12:38   ` Paul P Komkoff Jr
  2002-03-18 15:36   ` Richard Gooch
  1 sibling, 0 replies; 9+ messages in thread
From: Paul P Komkoff Jr @ 2002-03-18 12:38 UTC (permalink / raw)
  To: linux-kernel

Replying to Denis Vlasenko:
> > whereas under 2.4.18 the first line didn't show up. Is that a
> > misconfiguration on my part?
> 
> Maybe you mount devfs manually after kernel did the same?
> devfs /dev devfs rw 0 0 - most probably mounted by initscripts
> none /dev devfs rw 0 0 - by kernel

no - this is known bug at init/do_mounts.c - fixed in latest ac

-- 
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar
  PPKJ1-RIPE // (smtp)i@stingr.net // (http)stingr.net // (pgp)0xA4B4ECA4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-18 10:39 ` Denis Vlasenko
  2002-03-18 12:38   ` Paul P Komkoff Jr
@ 2002-03-18 15:36   ` Richard Gooch
  2002-03-18 15:58     ` Alexander Viro
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Gooch @ 2002-03-18 15:36 UTC (permalink / raw)
  To: vda; +Cc: Felix Braun, linux-kernel

Denis Vlasenko writes:
> On 17 March 2002 09:19, Felix Braun wrote:
> > Hi Richard,
> >
> > I just noticed that devfs is listed twice in /proc/mounts in linux
> > 2.4.19-pre3, which confuses my shutdown script. Under 2.4.19-pre my
> > /proc/mounts looks like this:
> >
> > devfs /dev devfs rw 0 0
> > /dev/ide/host0/bus0/target0/lun0/part5 / reiserfs rw 0 0
> > none /dev devfs rw 0 0
> > /proc /proc proc rw 0 0
> > /dev/discs/disc0/part1 /dos vfat rw 0 0
> > /dev/discs/disc0/part9 /opt reiserfs rw,noatime 0 0
> > none /dev/pts devpts rw 0 0
> > /dev/discs/disc0/part7 /usr reiserfs rw 0 0
> > none /dev/shm tmpfs rw 0 0
> >
> > whereas under 2.4.18 the first line didn't show up. Is that a
> > misconfiguration on my part?
> 
> Maybe you mount devfs manually after kernel did the same?
> devfs /dev devfs rw 0 0 - most probably mounted by initscripts
> none /dev devfs rw 0 0 - by kernel
> 
> Look into /var/log/messages for:
> kernel: VFS: Mounted root (nfs filesystem).
> kernel: Mounted devfs on /dev   <============ do yo have this?

No, I don't think that's the problem. I now also have two devfs
entries in /proc/mounts with 2.4.19-pre3. My boot scripts don't mount
devfs. I'm looking into the problem. It seems to have something to do
with Al's changes to the boot sequence code.

				Regards,

					Richard....
Permanent: rgooch@atnf.csiro.au
Current:   rgooch@ras.ucalgary.ca

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-18 15:36   ` Richard Gooch
@ 2002-03-18 15:58     ` Alexander Viro
  2002-03-18 16:08       ` Richard Gooch
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Viro @ 2002-03-18 15:58 UTC (permalink / raw)
  To: Richard Gooch; +Cc: vda, Felix Braun, linux-kernel



On Mon, 18 Mar 2002, Richard Gooch wrote:

> No, I don't think that's the problem. I now also have two devfs
> entries in /proc/mounts with 2.4.19-pre3. My boot scripts don't mount
> devfs. I'm looking into the problem. It seems to have something to do
> with Al's changes to the boot sequence code.

It has and it will go away when the next series is merged.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-18 15:58     ` Alexander Viro
@ 2002-03-18 16:08       ` Richard Gooch
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Gooch @ 2002-03-18 16:08 UTC (permalink / raw)
  To: Alexander Viro; +Cc: vda, Felix Braun, linux-kernel

Alexander Viro writes:
> On Mon, 18 Mar 2002, Richard Gooch wrote:
> 
> > No, I don't think that's the problem. I now also have two devfs
> > entries in /proc/mounts with 2.4.19-pre3. My boot scripts don't mount
> > devfs. I'm looking into the problem. It seems to have something to do
> > with Al's changes to the boot sequence code.
> 
> It has and it will go away when the next series is merged.

Are you talking about this patch:
+++ linux.19pre3-ac1/init/do_mounts.c   Thu Mar 14 23:01:31 2002
@@ -375,7 +375,7 @@
 done:
        putname(fs_names);
        if (do_devfs)
-               sys_umount(".", 0);
+               sys_umount(".", MNT_DETACH);
 }
 
 #ifdef CONFIG_BLK_DEV_INITRD

I tried that and it didn't fix the problem.

				Regards,

					Richard....
Permanent: rgooch@atnf.csiro.au
Current:   rgooch@ras.ucalgary.ca

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-17 11:19 devfs mounted twice in linux 2.4.19-pre3 Felix Braun
  2002-03-18 10:39 ` Denis Vlasenko
@ 2002-03-20  6:30 ` Richard Gooch
  2002-03-25  0:08   ` Richard Gooch
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Gooch @ 2002-03-20  6:30 UTC (permalink / raw)
  To: Felix Braun; +Cc: viro, linux-kernel

Felix Braun writes:
> Hi Richard,
> 
> I just noticed that devfs is listed twice in /proc/mounts in linux
> 2.4.19-pre3, which confuses my shutdown script. Under 2.4.19-pre my
> /proc/mounts looks like this:
> 
> devfs /dev devfs rw 0 0
> /dev/ide/host0/bus0/target0/lun0/part5 / reiserfs rw 0 0
> none /dev devfs rw 0 0
> /proc /proc proc rw 0 0
> /dev/discs/disc0/part1 /dos vfat rw 0 0
> /dev/discs/disc0/part9 /opt reiserfs rw,noatime 0 0
> none /dev/pts devpts rw 0 0
> /dev/discs/disc0/part7 /usr reiserfs rw 0 0
> none /dev/shm tmpfs rw 0 0
> 
> whereas under 2.4.18 the first line didn't show up. Is that a
> misconfiguration on my part?

No, this is due to a change in the kernel (presumably done by Al).
What seems to be happening is that the kernel temporarily mounts devfs
and then detaches it again using MNT_DETACH (actually, you need
2.4.19-pre3-ac2 to get the fix that adds MNT_DETACH). However,
detached filesystems still appear to be listed in /proc/mounts.
Arguably, this is incorrect.

If you were to reboot single-user, and with devfs=nomount, inspection
of /proc/mounts would show the line:
devfs /dev devfs rw 0 0

However, if you listed /dev, you would see that it doesn't actually
contain a devfs. Thus, /proc/mounts is deceiving you.

Al: what is the intended behaviour of MNT_DETACH wrt. /proc/mounts?

				Regards,

					Richard....
Permanent: rgooch@atnf.csiro.au
Current:   rgooch@ras.ucalgary.ca

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
  2002-03-20  6:30 ` Richard Gooch
@ 2002-03-25  0:08   ` Richard Gooch
       [not found]     ` <200203250852.g2P8qr503025@ns.caldera.de>
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Gooch @ 2002-03-25  0:08 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel

  Hi, Al. What is the intended behaviour of MNT_DETACH
wrt. /proc/mounts? It appears that detaching a FS leaves behind an
apparently stale entry in /proc/mounts. Is this intentional?

This question came up after the following exchange:

I wrote:
> Felix Braun writes:
> > Hi Richard,
> > 
> > I just noticed that devfs is listed twice in /proc/mounts in linux
> > 2.4.19-pre3, which confuses my shutdown script. Under 2.4.19-pre my
> > /proc/mounts looks like this:
> > 
> > devfs /dev devfs rw 0 0
> > /dev/ide/host0/bus0/target0/lun0/part5 / reiserfs rw 0 0
> > none /dev devfs rw 0 0
> > /proc /proc proc rw 0 0
> > /dev/discs/disc0/part1 /dos vfat rw 0 0
> > /dev/discs/disc0/part9 /opt reiserfs rw,noatime 0 0
> > none /dev/pts devpts rw 0 0
> > /dev/discs/disc0/part7 /usr reiserfs rw 0 0
> > none /dev/shm tmpfs rw 0 0
> > 
> > whereas under 2.4.18 the first line didn't show up. Is that a
> > misconfiguration on my part?
> 
> No, this is due to a change in the kernel (presumably done by Al).
> What seems to be happening is that the kernel temporarily mounts devfs
> and then detaches it again using MNT_DETACH (actually, you need
> 2.4.19-pre3-ac2 to get the fix that adds MNT_DETACH). However,
> detached filesystems still appear to be listed in /proc/mounts.
> Arguably, this is incorrect.
> 
> If you were to reboot single-user, and with devfs=nomount, inspection
> of /proc/mounts would show the line:
> devfs /dev devfs rw 0 0
> 
> However, if you listed /dev, you would see that it doesn't actually
> contain a devfs. Thus, /proc/mounts is deceiving you.
> 
> Al: what is the intended behaviour of MNT_DETACH wrt. /proc/mounts?

				Regards,

					Richard....
Permanent: rgooch@atnf.csiro.au
Current:   rgooch@ras.ucalgary.ca

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: devfs mounted twice in linux 2.4.19-pre3
       [not found]       ` <200203251658.g2PGwf228854@vindaloo.ras.ucalgary.ca>
@ 2002-03-25 17:06         ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2002-03-25 17:06 UTC (permalink / raw)
  To: Richard Gooch; +Cc: viro, linux-kernel

On Mon, Mar 25, 2002 at 09:58:41AM -0700, Richard Gooch wrote:
> This is not a problem with mount(8). It's a kernel problem. When
> sys_umount(..., MNT_DETACH) is called from kernel space, it doesn't
> clean up /proc/mounts.

Oh - I though about /etc/mtab, sorry for misreading..


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-03-25 17:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-17 11:19 devfs mounted twice in linux 2.4.19-pre3 Felix Braun
2002-03-18 10:39 ` Denis Vlasenko
2002-03-18 12:38   ` Paul P Komkoff Jr
2002-03-18 15:36   ` Richard Gooch
2002-03-18 15:58     ` Alexander Viro
2002-03-18 16:08       ` Richard Gooch
2002-03-20  6:30 ` Richard Gooch
2002-03-25  0:08   ` Richard Gooch
     [not found]     ` <200203250852.g2P8qr503025@ns.caldera.de>
     [not found]       ` <200203251658.g2PGwf228854@vindaloo.ras.ucalgary.ca>
2002-03-25 17:06         ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).