Data Loss with samba shared USB drive

Brian Fundakowski Feldman green at freebsd.org
Thu Dec 8 16:48:02 PST 2005


On Sat, Dec 03, 2005 at 09:46:05PM +0000, David Taylor wrote:
> On Sat, 03 Dec 2005, David Taylor wrote:
> 
> > I have a USB drive (SanDisk 1GB flash drive), which I have mounted
> > on a windows PC using samba 3.0.
> > 
> > I recently discovered the copy of my files on my USB device were
> > corrupted (thankfully I had a backup), being filled entirely with
> > 0's (that's ASCII '0', not NUL).
> > 
> > I have managed to reproduce the problem with these steps.  
> > 
> > 1. Mount USB drive on (say) /usb
> > 2. Share /usb over samba
> > 3. (Optional) On windows PC mount \\server\usb as (say) U:
> > 4. Change something on /usb drive (from windows or freebsd)
> > 5. On FreeBSD machine type "umount /usb" -- get "Device busy" error
> > 6. View changed file.
> 
> I should probably mention that this is with the drive formatted with
> a FAT filesystem.

Do you also know that nothing has /usb or a subdirectory of it open
as a current working directory, and that no files are open?  You're
saying that the umount fails and the file also turns out to be
corrupted, right?

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\


More information about the freebsd-stable mailing list