From owner-freebsd-stable@FreeBSD.ORG Sat Dec 3 21:32:32 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06C7816A41F for ; Sat, 3 Dec 2005 21:32:32 +0000 (GMT) (envelope-from davidt@yadt.co.uk) Received: from outcold.yadt.co.uk (outcold.yadt.co.uk [81.187.204.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB2EA43D62 for ; Sat, 3 Dec 2005 21:32:30 +0000 (GMT) (envelope-from davidt@yadt.co.uk) Received: from localhost (localhost [127.0.0.1]) by outcold.yadt.co.uk (Postfix) with ESMTP id CA8831DD4AC for ; Sat, 3 Dec 2005 21:32:28 +0000 (GMT) Received: from outcold.yadt.co.uk ([127.0.0.1]) by localhost (outcold.yadt.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 41470-03 for ; Sat, 3 Dec 2005 21:32:26 +0000 (GMT) Received: by outcold.yadt.co.uk (Postfix, from userid 1001) id 73EA91DD4A2; Sat, 3 Dec 2005 21:32:26 +0000 (GMT) Date: Sat, 3 Dec 2005 21:32:26 +0000 From: David Taylor To: freebsd-stable@freebsd.org Message-ID: <20051203213226.GA44199@outcold.yadt.co.uk> Mail-Followup-To: freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: amavisd-new 2.3.3 (20050822) at yadt.co.uk Subject: Data Loss with samba shared USB drive X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 21:32:32 -0000 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. When I've tried this, it results in the contents of the modified file being entirly replaced by a string of 0. This only happens on a USB device, when samba is running. The share does not need to be mounted on the windows PC for this to occur. If anyone has any ideas, or wants any more information, please let me know. uname: FreeBSD outcold.yadt.co.uk 6.0-STABLE FreeBSD 6.0-STABLE #2: Wed Nov 9 14:14:34 GMT 2005 root@outcold.yadt.co.uk:/usr/obj/repo/FreeBSD/FreeBSD-6.x/src/sys/ OUTCOLD amd64 usb drive attach dmesg: umass0: SanDisk Flash Disk, rev 1.10/1.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 1.000MB/s transfers da0: 1048576MB (2147484160 512 byte sectors: 255H 63S/T 133674C) samba version: samba-3.0.20b,1 A free SMB and CIFS client and server for UNIX -- David Taylor