From owner-freebsd-questions@freebsd.org Wed Aug 17 11:34:32 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B64B2BBC171 for ; Wed, 17 Aug 2016 11:34:32 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01062155B for ; Wed, 17 Aug 2016 11:34:31 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id u7HBYKMx040059; Wed, 17 Aug 2016 21:34:20 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 17 Aug 2016 21:34:19 +1000 (EST) From: Ian Smith To: Jonathan Stewart cc: freebsd-questions@freebsd.org Subject: Re: Lexar flash drive dead? In-Reply-To: Message-ID: <20160817210437.M79687@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2016 11:34:32 -0000 In freebsd-questions Digest, Vol 637, Issue 3, Message: 20 On Tue, 16 Aug 2016 21:31:12 -040 Jonathan Stewart wrote: > (Please CC me as I'm not subscribed right now) And please cc me on any reply; I take the -digest. > I have a Lexar USB3 128GB flash drive that has quit working. I get the > following on the console and in dmesg when I plug the drive in, is there > any hope other than a professional recovery company for this drive? On a > Windows machine it does some kind of disconnect/reconnect loop but just > triggers the text below on FreeBSD. Have you tried it on other FreeBSD boxes too? > ugen1.3: at usbus1 > umass0: on usbus1 > umass0: SCSI over Bulk-Only; quirks = 0x8100 > umass0:9:0:-1: Attached to scbus9 > da4 at umass-sim0 bus 0 scbus9 target 0 lun 0 > da4: Removable Direct Access SPC-4 SCSI device > da4: Serial Number AAUAYQ9QH3OH4ONS > da4: 40.000MB/s transfers > da4: 122104MB (250068992 512 byte sectors: 255H 63S/T 15566C) > da4: quirks=0x2 > (da4:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e e7 bf fe 00 00 01 00 > (da4:umass-sim0:0:0:0): CAM status: SCSI Status Error > (da4:umass-sim0:0:0:0): SCSI status: Check Condition > (da4:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) > (da4:umass-sim0:0:0:0): Error 6, Unretryable error > (da4:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e e7 bf ff 00 00 01 00 > (da4:umass-sim0:0:0:0): CAM status: SCSI Status Error > (da4:umass-sim0:0:0:0): SCSI status: Check Condition > (da4:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) > (da4:umass-sim0:0:0:0): Error 6, Unretryable error > (da4:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 01 00 00 01 00 > (da4:umass-sim0:0:0:0): CAM status: SCSI Status Error > (da4:umass-sim0:0:0:0): SCSI status: Check Condition > (da4:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) > (da4:umass-sim0:0:0:0): Error 6, Unretryable error When that's finished logging, does /dev/da4 still exist? If not, I don't know. 'Medium not present' looks pretty serious. But if so, you may be able to recover most of its contents, less any bad blocks (which will be replaced by NUL bytes), using something like: # dd if=/dev/da4 of=recovered.img conv=noerror,sync bs=512 A blocksize of 512 bytes may be overkill, and it will be slow, but will ensure that any recoverable sectors are recovered. Being flash, actual block size is almost certainly larger, but 512 is safest, and what the drive reported above. If that does work, you may be able to mount it with something like: # unit=`mdconfig -f recovered.img` # mount -t $whatevertypeitis /dev/${unit} /mnt Depending on whether filesystem metadata is good enough to use .. Some others here will know more, and/or know better, I expect. cheers, Ian