[nzlug] 500GB USB External HDD Question

Nevyn nevynh at gmail.com
Wed May 2 05:26:34 NZST 2007


Yuck yuck and yuck....

It took me a while to realise why I couldn't unmount usb keys in Windows -
although Excel had been closed down, as far as Windows was concerned, the
xls file was still open.

In other words, with a Windows machine accessing the drive, chances are
you're going to get all sorts of weird and possibly wonderful (though I
wouldn't count on it) issues.

Those issues aside, smbstatus will tell you when a file's open. It's
probably as simple as writing a script.
I.e.
Is someone using a resource? (smbstatus)
Yes
    Print who's using a resource
No
    Stop Samba
    umount drive
    start samba

On 5/1/07, Andrew Bruce <abruce at hope-st.ath.cx> wrote:
>
> OK, so I took the plunge and bought one.  After connecting it to my
> server, and some initial mucking around to sort out the correct group
> settings and umask settings, I've got it working the way I want (in this
> respect).
>
> Since this is connected to my server, I would like to provide a way for
> my other flatmates to connect to it.  One exclusively uses Windows, the
> other exclusive Linux.  I'm personally between both (more Linux than
> anything), but have to use Windows for school.
>
> I've had a go at getting Samba to work, but of course this brings its
> own problem.
>
> I've mounted the drive up at /mnt/mybook500, and can get the share
> working fine (along with all the others I've got).  Users can connect
> and do whatever they need.  The problem comes if I need to unmount the
> USB drive from the server to take away for any reason.  It tells me the
> drive is in use (which it is, as Samba is sharing it over the network).
>
> Disconnecting the drive at this point means stopping Samba, unmounting
> the drive, and restarting Samba.
>
> Is there any way around this?  Preferably some way that makes sure that
> the drive isn't being written to by Samba, and then cleanly unmounts it.
>
> As part of this, when the drive isn't mounted, I would like some way of
> ensuring that the /mnt/mybook500 folder can't be written to by (dumb)
> network users, as I'm guessing it will still be being shared, even
> though the volume isn't technically there.
>
> Can anyone help with this - so far Google hasn't been much help.
>
> Thanks,
>
> Andrew
>
> Andrew Bruce wrote:
> > I'm probably going to be picking one of these up in the next few days,
> > but first I wanted to ask a couple of quick questions.
> >
> > For the required purposes of this drive, I need to leave it as one
> > single large partition.  Because of this, and the fact that it will
> > frequently be going between Windows and Linux (the Windows machines I
> > won't have control over, therefore I can't use a utility to access an
> > ext filesystem) I'm wondering whether it's possible to even format it
> > as one large FAT32 partition, or if I would be best looking at NTFS
> > combined with NTFS-3G for Linux.
> >
> > Has anyone had any success on using the NTFS-3G program, and would it
> > be recommended for day to day use?  Or alternatively does FAT32
> > support drives this large (I think FAT32 is good for 2TB?) and more
> > importantly, if I do use FAT32 will I have any problems mounting the
> > volume in Windows (I remember reading something about  Windows
> > starting to be a bit picky about what it can and can't do with the FAT
> > filesystem these days, whereas I don't envisage having any problems
> > with Linux).
> >
> > Thanks for any help,
> >
> > Andrew Bruce
> >
> > _______________________________________________
> > NZLUG mailing list NZLUG at linux.net.nz
> > http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
> >
>
> _______________________________________________
> NZLUG mailing list NZLUG at linux.net.nz
> http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
>


More information about the NZLUG mailing list