From owner-freebsd-stable@FreeBSD.ORG Thu Aug 8 03:56:23 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BFD9616A for ; Thu, 8 Aug 2013 03:56:23 +0000 (UTC) (envelope-from michael.schuh@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 429232157 for ; Thu, 8 Aug 2013 03:56:23 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id e12so2132259wgh.21 for ; Wed, 07 Aug 2013 20:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=65Nvp1iB4MKFiTAMgOl0qqYc+6jxc0S450UM/XsE2OI=; b=MmyoAWtm/jZQAPMlbPgWB1s5W/Djfq6Fzd6VhNxEQWDOzP4ny0m7a+D5h3EuJBKgfR pJftjJ004CdTWNH05pHsskZCilx/O17XlCSENo32bw30llcum1rR1YhoAAckcEm5/Mkw BRfPoCeyBGz8GDXUHI6M6rno78tGEkpt5mfXQmkZCbxksSr/9Tgb3BKPYc3ApW6iJkrx T0CsmMNemLxX08AF14yAxjvEjFAPvNhJLbH+M3tTuxtwNlhDc7v9bqM/63Z/U5g6sytp dhSi82jOP3LNtSNEwSg4+4HpbhyNGytk3m/so5zxqXgxbItE7y9zfhlMsQM7s/fN7wFb f7TQ== MIME-Version: 1.0 X-Received: by 10.180.24.130 with SMTP id u2mr3921155wif.40.1375934181584; Wed, 07 Aug 2013 20:56:21 -0700 (PDT) Received: by 10.194.135.84 with HTTP; Wed, 7 Aug 2013 20:56:21 -0700 (PDT) Date: Thu, 8 Aug 2013 05:56:21 +0200 Message-ID: Subject: how to remove usb-storage devices without CAM errors From: Michael Schuh To: FreeBSD Stable Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 03:56:23 -0000 H i@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: at usbus3 umass0: 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: Removable Direct Access SCSI-6 device da0: 40.000MB/s transfers da0: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) da0: quirks=0x2 ugen7.2: at usbus7 umass1: 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: Removable Direct Access SCSI-6 device da1: 40.000MB/s transfers da1: 7385MB (15124992 512 byte sectors: 255H 63S/T 941C) da1: quirks=0x2 (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 02 44 80 00 00 80 00 ugen3.2: 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