[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: smbmount and PAM



 my $0.02 (CAD) :

 On the topic of detecting mounted filesystems not-in-use anymore :

 I think `fuser -m /the/smb/mount/point` tells you whether the mounted FS
is still used or not. So there would have to be some sort of periodic
cleanup process that umounts it.

      Jan

On Mon, 27 Mar 2000, Steve Langasek wrote:

> On Mon, 27 Mar 2000, Mihai Ibanescu wrote:
> 
> > 	Just my 0.02$: care should be taken to avoid mounting the same
> > volume multiple times; also, to decide when a volume should be
> > unmounted. Unfortunately, there is no way you can be sure a session is
> > closed (logging out cleanly may do, but a crashed connection -- I don't
> > know). Maybe you may consider using autofs for this (so that the mount to
> > expire after some time). autofs would greatly simplify things, IMHO.
> 
> I don't see crashed connections being a problem: so long as the login process
> exits normally (i.e., no 'kill -9'), each session will clean up after itself.
> The point about unmounting shares that are still in use is well-taken,
> however.  I think this can be dealt with in one of two ways, either by
> creating a file for storing a reference count and only having the share
> unmounted when the refcount reaches zero, and adding a job to the startup
> scripts to clean up any Worst Case Scenarios; or by having the PAM module
> ignore all errors from mount/umount, and just run a cron job periodically to
> unmount any resources that are no longer in use (presuming, of course, that if
> the mount point is still in use, the 'umount' will fail).
> 
> Steve Langasek
> postmodern programmer
> 
> 

-- 
-- Gospel of Jesus is the saving power of God for all who believe --
               ## To some, nothing is impossible. ##
                  http://Vicherek.Waterloo.on.ca/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []