H i at list, i have a simple wuestion caused by a "device loss". is there a special routine for unplugging usb-storage devices? in the meaning: may be settle some commends before unplugging the device other than umount. according to the handbook there ist no special routine. unmounting should be enough and pull the USB-Devie out of the bus. i could not find anything related by the help of the big oracle. i have some usb-sticks that i need to write with prepared disk-images by using dd. two or more drives are already plugged in and da0 is already finished, da1 or da2 still at writing. unplugging da0 causes a CAM error and interrupts the ongoing write. i am not sure if all writes to each different device gets stopped. this is a reproduceable behaviour thats new to me. see the listing below. let me know if i can and what to do to help to further identify and investigate this error. iirc this happens for the first time this way. my last upgrade before this was feb./march. time of svn checkout was 2013-07-22 so its may be already fixed? many thanks in advance regards michael ============== ugen3.2: <Verbatim> at usbus3 umass0: <Verbatim STORE N GO, class 0/0, rev 2.10/1.10, addr 2> on usbus3 umass0: SCSI over Bulk-Only; quirks = 0x0100 umass0:8:0:-1: Attached to scbus8 da0 at umass-sim0 bus 0 scbus8 target 0 lun 0 da0: <Verbatim STORE N GO PMAP> Removable Direct Access SCSI-6 device da0: 40.000MB/s transfers da0: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) da0: quirks=0x2<NO_6_BYTE> ugen7.2: <Verbatim> at usbus7 umass1: <Verbatim STORE N GO, class 0/0, rev 2.10/1.10, addr 2> on usbus7 umass1: SCSI over Bulk-Only; quirks = 0x0100 umass1:9:1:-1: Attached to scbus9 da1 at umass-sim1 bus 1 scbus9 target 0 lun 0 da1: <Verbatim STORE N GO PMAP> Removable Direct Access SCSI-6 device da1: 40.000MB/s transfers da1: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) da1: quirks=0x2<NO_6_BYTE> (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 ugen3.2: <Verbatim> at usbus3 (disconnected) (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error umass0: (da0:at uhub3, port 3, addr 2 (disconnected) umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Error 5, Retries exhausted (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Error 5, Retries exhausted (da0:umass-sim0:0:0:0): got CAM status 0x44 (da0:umass-sim0:0:0:0): fatal error, failed to attach to device (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 5 refs (da0:umass-sim0:0:0:0): removing device entry
On Thu, 08 Aug 2013 05:56:21 +0200, Michael Schuh <michael.schuh at gmail.com> wrote:> H i at list, > > i have a simple wuestion caused by a "device loss". > > is there a special routine for unplugging usb-storage devices? > in the meaning: > may be settle some commends before unplugging the device > other than umount. > according to the handbook there ist no special routine. > unmounting should be enough and pull the USB-Devie out of the bus. > > i could not find anything related by the help of the big oracle. > > > i have some usb-sticks that i need to write with prepared disk-images by > using dd. > two or more drives are already plugged in > and da0 is already finished, da1 or da2 still at writing. > unplugging da0 causes a CAM error and interrupts the ongoing write. > i am not sure if all writes to each different device gets stopped. > this is a reproduceable behaviour thats new to me. > see the listing below. > > let me know if i can and what to do to help to further identify > and investigate this error. > > iirc this happens for the first time this way. > my last upgrade before this was feb./march. > time of svn checkout was 2013-07-22 so its may be already fixed? > > many thanks in advance > > regards > > michaelDoes 'camcontrol eject <device_id>' help? It tells CAM to eject the device. This is usefull for CD's, but maybe to for preventing errors for USB-storage. Ronald.> > ==============> > ugen3.2: <Verbatim> at usbus3 > umass0: <Verbatim STORE N GO, class 0/0, rev 2.10/1.10, addr 2> on usbus3 > umass0: SCSI over Bulk-Only; quirks = 0x0100 > umass0:8:0:-1: Attached to scbus8 > da0 at umass-sim0 bus 0 scbus8 target 0 lun 0 > da0: <Verbatim STORE N GO PMAP> Removable Direct Access SCSI-6 device > da0: 40.000MB/s transfers > da0: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) > da0: quirks=0x2<NO_6_BYTE> > ugen7.2: <Verbatim> at usbus7 > umass1: <Verbatim STORE N GO, class 0/0, rev 2.10/1.10, addr 2> on usbus7 > umass1: SCSI over Bulk-Only; quirks = 0x0100 > umass1:9:1:-1: Attached to scbus9 > da1 at umass-sim1 bus 1 scbus9 target 0 lun 0 > da1: <Verbatim STORE N GO PMAP> Removable Direct Access SCSI-6 device > da1: 40.000MB/s transfers > da1: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) > da1: quirks=0x2<NO_6_BYTE> > (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 > ugen3.2: <Verbatim> at usbus3 (disconnected) > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > umass0: (da0:at uhub3, port 3, addr 2 (disconnected) > umass-sim0:0:0:0): Retrying command > (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (da0:umass-sim0:0:0:0): Retrying command > (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (da0:umass-sim0:0:0:0): Error 5, Retries exhausted > (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 > 00 > 00 00 > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (da0:umass-sim0:0:0:0): Retrying command > (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 > 00 > 00 00 > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (da0:umass-sim0:0:0:0): Error 5, Retries exhausted > (da0:umass-sim0:0:0:0): got CAM status 0x44 > (da0:umass-sim0:0:0:0): fatal error, failed to attach to device > (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 5 refs > (da0:umass-sim0:0:0:0): removing device entry > _______________________________________________ > freebsd-stable at freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
On 8 August 2013 05:56, Michael Schuh <michael.schuh at gmail.com> wrote:> ugen3.2: <Verbatim> at usbus3 > umass0: <Verbatim STORE N GO, class 0/0, rev 2.10/1.10, addr 2> on usbus3 > umass0: SCSI over Bulk-Only; quirks = 0x0100 > umass0:8:0:-1: Attached to scbus8 > da0 at umass-sim0 bus 0 scbus8 target 0 lun 0 > da0: <Verbatim STORE N GO PMAP> Removable Direct Access SCSI-6 device > da0: 40.000MB/s transfers > da0: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) > da0: quirks=0x2<NO_6_BYTE> >> ugen7.2: <Verbatim> at usbus7 > umass1: <Verbatim STORE N GO, class 0/0, rev 2.10/1.10, addr 2> on usbus7 > umass1: SCSI over Bulk-Only; quirks = 0x0100 > umass1:9:1:-1: Attached to scbus9 > da1 at umass-sim1 bus 1 scbus9 target 0 lun 0 > da1: <Verbatim STORE N GO PMAP> Removable Direct Access SCSI-6 device > da1: 40.000MB/s transfers > da1: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) > da1: quirks=0x2<NO_6_BYTE> >> (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 > ugen3.2: <Verbatim> at usbus3 (disconnected) > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > umass0: (da0:at uhub3, port 3, addr 2 (disconnected) > umass-sim0:0:0:0): Retrying command > (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 > (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (da0:umass-sim0:0:0:0): Retrying command >I'm mostly guessing, but what I suspect that happens is that after you successfully remove da0, the former da1 becomes da0 and any operations on da1 (or da2 that now became da1) get aborted. That you just happen to have exactly identical USB sticks in this case does not help diagnosing whether that's the case though. I'm really hoping this isn't actually what happens here, but it would explain what you're seeing. -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.