Multiple mounts on same mount points

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple mounts on same mount points

Suresh Jayaraman-2
Wondering what could be the reason behind CIFS allowing multiple mounts
on same mount points while other Network File systems (say NFS) does
not.. For e.g.

   mount -t cifs //server/share /mnt/cifs
   mount -t cifs //server/share /mnt/cifs (also succeeds)

where one would expect an -EBUSY error during the second attempt.

Though I do not see any major issues, this behavior could be confusing
for users when they discover the mount is still present after umount
(because they mounted it twice unknowingly) or when they see multiple
mounts on same mount points.


Thanks,

--
Suresh Jayaraman
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Reply | Threaded
Open this post in threaded view
|

Re: Multiple mounts on same mount points

Steve French-2
The existing MultiUserMount feature of cifs (this existing multiuser
support is more limited than what Jeff has proposed for the future)
required multiple mounts in order to pass unique credentials down for
each new uid.

Which local file systems allow multiple mounts to the same device on
same mount point?

I think for the future it would be reasonable to forbid it (e.g. for
smb2 experimental code) assuming we have Jeff's multiuser support (or
something similar) implemented.

On Mon, May 31, 2010 at 7:56 AM, Suresh Jayaraman <[hidden email]> wrote:

> Wondering what could be the reason behind CIFS allowing multiple mounts
> on same mount points while other Network File systems (say NFS) does
> not.. For e.g.
>
>   mount -t cifs //server/share /mnt/cifs
>   mount -t cifs //server/share /mnt/cifs (also succeeds)
>
> where one would expect an -EBUSY error during the second attempt.
>
> Though I do not see any major issues, this behavior could be confusing
> for users when they discover the mount is still present after umount
> (because they mounted it twice unknowingly) or when they see multiple
> mounts on same mount points.
>
>
> Thanks,
>
> --
> Suresh Jayaraman
>



--
Thanks,

Steve
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Reply | Threaded
Open this post in threaded view
|

Re: Multiple mounts on same mount points

Suresh Jayaraman-2
On 05/31/2010 09:25 PM, Steve French wrote:
> The existing MultiUserMount feature of cifs (this existing multiuser
> support is more limited than what Jeff has proposed for the future)
> required multiple mounts in order to pass unique credentials down for
> each new uid.

Ok, thanks for the clarifying.


> Which local file systems allow multiple mounts to the same device on
> same mount point?

I'm not aware of any such disk-based filesystem.

> I think for the future it would be reasonable to forbid it (e.g. for
> smb2 experimental code) assuming we have Jeff's multiuser support (or
> something similar) implemented.

Sounds good.

Thanks,

>
> On Mon, May 31, 2010 at 7:56 AM, Suresh Jayaraman <[hidden email]> wrote:
>> Wondering what could be the reason behind CIFS allowing multiple mounts
>> on same mount points while other Network File systems (say NFS) does
>> not.. For e.g.
>>
>> � mount -t cifs //server/share /mnt/cifs
>> � mount -t cifs //server/share /mnt/cifs (also succeeds)
>>
>> where one would expect an -EBUSY error during the second attempt.
>>
>> Though I do not see any major issues, this behavior could be confusing
>> for users when they discover the mount is still present after umount
>> (because they mounted it twice unknowingly) or when they see multiple
>> mounts on same mount points.
>>
>>
>> Thanks,
>>
>> --
>> Suresh Jayaraman
>>
>
>
>


--
Suresh Jayaraman
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Reply | Threaded
Open this post in threaded view
|

Re: Multiple mounts on same mount points

Jeff Layton-4
On Tue, 01 Jun 2010 16:39:56 +0530
Suresh Jayaraman <[hidden email]> wrote:

> On 05/31/2010 09:25 PM, Steve French wrote:
> > The existing MultiUserMount feature of cifs (this existing multiuser
> > support is more limited than what Jeff has proposed for the future)
> > required multiple mounts in order to pass unique credentials down for
> > each new uid.
>
> Ok, thanks for the clarifying.
>

Yes. We should note however that there's no real requirement with the
old multiuser support that the mounts all be to the same mountpoint. It
may be more convenient to do it that way in some situations however.

>
> > Which local file systems allow multiple mounts to the same device on
> > same mount point?
>
> I'm not aware of any such disk-based filesystem.
>

There may be some, but in general it's discouraged in favor of bind
mounts...particularly now that you can do a r/o bind mount.

> > I think for the future it would be reasonable to forbid it (e.g. for
> > smb2 experimental code) assuming we have Jeff's multiuser support (or
> > something similar) implemented.
>
> Sounds good.
>

Agreed. What may be a good idea is that once that support goes in, to
have some patches that spew warnings that we're going to deprecate the
old multiuser mount code in a couple of releases. Then do so in that
timeframe. Forbidding this could be part of that deprecation process.

--
Jeff Layton <[hidden email]>
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Reply | Threaded
Open this post in threaded view
|

Re: Multiple mounts on same mount points

Suresh Jayaraman-2
On 06/01/2010 04:54 PM, Jeff Layton wrote:

> On Tue, 01 Jun 2010 16:39:56 +0530
> Suresh Jayaraman <[hidden email]> wrote:
>
>> On 05/31/2010 09:25 PM, Steve French wrote:
>>> The existing MultiUserMount feature of cifs (this existing multiuser
>>> support is more limited than what Jeff has proposed for the future)
>>> required multiple mounts in order to pass unique credentials down for
>>> each new uid.
>>
>> Ok, thanks for the clarifying.
>>
>
> Yes. We should note however that there's no real requirement with the
> old multiuser support that the mounts all be to the same mountpoint. It
> may be more convenient to do it that way in some situations however.
>

Could you please enlighten me on one or more of those situations? I
could not think of one.

Thanks,


--
Suresh Jayaraman
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Reply | Threaded
Open this post in threaded view
|

Re: Multiple mounts on same mount points

Jeff Layton-4
On Tue, 01 Jun 2010 16:58:21 +0530
Suresh Jayaraman <[hidden email]> wrote:

> On 06/01/2010 04:54 PM, Jeff Layton wrote:
> > On Tue, 01 Jun 2010 16:39:56 +0530
> > Suresh Jayaraman <[hidden email]> wrote:
> >
> >> On 05/31/2010 09:25 PM, Steve French wrote:
> >>> The existing MultiUserMount feature of cifs (this existing multiuser
> >>> support is more limited than what Jeff has proposed for the future)
> >>> required multiple mounts in order to pass unique credentials down for
> >>> each new uid.
> >>
> >> Ok, thanks for the clarifying.
> >>
> >
> > Yes. We should note however that there's no real requirement with the
> > old multiuser support that the mounts all be to the same mountpoint. It
> > may be more convenient to do it that way in some situations however.
> >
>
> Could you please enlighten me on one or more of those situations? I
> could not think of one.
>
> Thanks,
>
>

The "convenience" here is pretty trivial. You can essentially just use
this mis-feature to avoid creating a bunch of mountpoints to mount
shares on for each different user by layering them all onto the same one.

--
Jeff Layton <[hidden email]>
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Reply | Threaded
Open this post in threaded view
|

Re: Multiple mounts on same mount points

Steve French-2
In reply to this post by Suresh Jayaraman-2
On Tue, Jun 1, 2010 at 6:28 AM, Suresh Jayaraman <[hidden email]> wrote:

> On 06/01/2010 04:54 PM, Jeff Layton wrote:
>> On Tue, 01 Jun 2010 16:39:56 +0530
>> Suresh Jayaraman <[hidden email]> wrote:
>>
>>> On 05/31/2010 09:25 PM, Steve French wrote:
>>>> The existing MultiUserMount feature of cifs (this existing multiuser
>>>> support is more limited than what Jeff has proposed for the future)
>>>> required multiple mounts in order to pass unique credentials down for
>>>> each new uid.
>>>
>>> Ok, thanks for the clarifying.
>>>
>>
>> Yes. We should note however that there's no real requirement with the
>> old multiuser support that the mounts all be to the same mountpoint. It
>> may be more convenient to do it that way in some situations however.
>>
>
> Could you please enlighten me on one or more of those situations? I
> could not think of one.

User wants files created on a share to be owned by different users.

An example,  user1 mounts /mnt to \\server\user1 using his username
He has a program running as user2 that needs to create files on the
same share, but with different credentials, so user2 mounts
\\server\user2 (also to /mnt)

This approach is more limited than what is possible with Jeff's
multiuser patches but gives an example.



--
Thanks,

Steve
_______________________________________________
linux-cifs-client mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux-cifs-client