Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jul 2004 12:43:31 -0400 (EDT)
From:      Incoming Mail List <mailist@whoweb.com>
To:        jon@whoweb.com, kheuer2@gwdg.de
Cc:        questions@freebsd.org
Subject:   Re: mount_smbfs
Message-ID:  <200407301643.i6UGhVTC092694@whoweb.com>
In-Reply-To: <20040730070925.R5646@gwdu60.gwdg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
>Why shouldn't it be?

Because it's counterintuitive.  Unless there's a method to use the multiple
mount points as separate entry points to the file system for specialized
program transactions similar to the Tru64 FFM file system, what's the point
of having it mount itself back over itself on the same mount point?  If
nothing else, it creates more entries in the mount table and wastes
resources.


>And it really doesn't matter whether you mount via smbfs or nfs multiple
>times on the same client or once on multiple clients, does it?

No, it's not a technical issue for the OS, but it can make for painful
system management.  If you create an application that allows users to
mount up a windows share to access it, you could end up with an unlimited
number of mounts for the same file system.  When it comes time to unmount
that file system, if you haven't kept track of how many times it was
mounted you'll have to keep inspecting the mount points to determine when
the last unmount has occured or your file system will still be mounted.
The application can certainly check the mount status when called upon to
mount the file system, but it is convenient to depend upon the mount
system calls (in the case of ufs) to return an error when the file system
is already mounted.

Is there a technical requirement, or benefit, for allowing multiple
smbfs mounts of a windows share on the same mount point?


----------------------

> The mount_smbfs(8) command on 5.2.1 allows multiple mounts using the same
> source and mount point.  This sounds like a bug to me since other file
> systems such as ufs return an error on such attempts.  Anyone know of a
> reason why this is allowed in mount_smbfs?

Why shouldn't it be? The same holds true for nfs. And it really doesn't
matter whether you mount via smbfs or nfs multiple times on the same
client or once on multiple clients, does it?

If you mount one or more times, if you use ufs or any other fs, it is
always possible to write simultaneously to one and the same file leading
to data loss. That's Unix since the early 1970s, isn't it?

Of course you cannot mount a ufs more than once, but that's because the
kernel needs to manage the buffer cache non-ambiguously to preserve data
consistency in the fs structure.

Regards

Konrad Heuer
GWDG, Am Fassberg, 37077 Goettingen, Germany, kheuer2@gwdg.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407301643.i6UGhVTC092694>