Skip to contentSkip to conversation

2.4.9-ac1/2/3 allows multiple mounts of NFS filesystem on same mountpoint

DISCUSSION Kevin P. Fleming 5 participants 6 messages Aug 30, 2001 – Aug 31, 2001

lore
Share & tools
lore
#0 lore raw

Accidentally <G> I mounted a filesystem from my server onto my workstation twice. Mount gave me no error....

Both machines are kernel 2.4.9-ac3, both have NFSv3 support, server is using knfsd, mount is version 2.11b. I export /storage on the server, and mount it on /storage on my workstation.

When I boot the workstation, it automatically mounts /storage, so everything's fine. If I then issue a "mount /storage" command, I don't get any error. df then reports two identical mounts for /storage. I can continue to multiple mount (tried up to five mounts). Each "umount /storage" takes away the most recent mount, with the last one performing a real unmount.

I can't, however, multiple mount any local filesystems (hard disk or CD-ROM based), and don't have anything else handy to try.

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Kevin P Fleming <[email protected]> writes:

> Accidentally <G> I mounted a filesystem from my server onto my > workstation twice. Mount gave me no error....

That's right. The 2.4 VFS removed the global restriction on the number of mounts on a single mountpoint. So?

If people expect this to be an error, then the correct thing is for the VFS restriction to be reinstated. I see no reason why it should be the responsibility of the filesystem to check for this sort of thing. A mountpoint is after all the one place where the VFS is actually *designed* to override the filesystem.

Cheers,
Trond

#2 lore raw
In reply to Kevin P. Fleming

Em Qui, 30 de Ago de 2001 16:12, Trond Myklebust escreveu:

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Kevin P Fleming <[email protected]> writes:

> Accidentally <G> I mounted a filesystem from my server onto my > workstation twice. Mount gave me no error....

Quoted 8 lines

That's right. The 2.4 VFS removed the global restriction on the number of mounts on a single mountpoint. So?

If people expect this to be an error, then the correct thing is for the VFS restriction to be reinstated. I see no reason why it should be the responsibility of the filesystem to check for this sort of thing. A mountpoint is after all the one place where the VFS is actually *designed* to override the filesystem.

I think it should be reinstated. We must have in mind, that currently, the most part of end-users are newbies, and if we want Linux to be a true Desktop Enviroment, we must allow people that do not want to understand it, to run it.

Just IMHO.

Regards,
Thiago Vinhas

#3 lore raw
Quoted 3 lines · Thiago Vinhas de Moraes

I think it should be reinstated. We must have in mind, that currently, the most part of end-users are newbies, and if we want Linux to be a true Desktop Enviroment, we must allow people that do not want to understand it, to run it.

Couldn't this be implemented in mount instead of the kernel? Should be easy to check /proc/mounts whether anything is already mounted on a given mountpoint.

Signature · 3 lines
Ciao, Pascal

-<[ [email protected], netmail 2:241/215.72, home http://cobol.cjb.net/) ]>-
#4 lore raw
In reply to Kevin P. Fleming

I was expecting it to be an error, but I'm not upset that it's not. Just kind of weird to see five mounts with the exact same information in /etc/mtab.

I can see why it would be useful to have multiple things mounted on the same mountpoint, but is there any reason to allow the _same_ filesystem to be mounted multiple times at the same mountpoint?

----- Original Message -----
From: "Trond Myklebust" <[email protected]>
To: "Kevin P. Fleming" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, August 30, 2001 12:12 PM
Subject: Re: 2.4.9-ac1/2/3 allows multiple mounts of NFS filesystem on same mountpoint

Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Kevin P Fleming <[email protected]> writes:

> Accidentally <G> I mounted a filesystem from my server onto my > workstation twice. Mount gave me no error....

That's right. The 2.4 VFS removed the global restriction on the number of mounts on a single mountpoint. So?

If people expect this to be an error, then the correct thing is for the VFS restriction to be reinstated. I see no reason why it should be the responsibility of the filesystem to check for this sort of thing. A mountpoint is after all the one place where the VFS is actually *designed* to override the filesystem.

Cheers,
Trond

#5 lore raw
Quoted 7 lines · Kevin P. Fleming

I was expecting it to be an error, but I'm not upset that it's not. Just kind of weird to see five mounts with the exact same information in /etc/mtab.

I can see why it would be useful to have multiple things mounted on the same mountpoint, but is there any reason to allow the _same_ filesystem to be mounted multiple times at the same mountpoint?

How do you tell if it's the same filesystem? Frankly, I'd rather get rid of mounting several things at one mountpoint, different or not - that would make life much easier, but it means that we need to implement mount-traps to make autofs folks happy. It _may_ be doable in 2.4, but I susupect that it will end up as 2.5 project.