From owner-freebsd-stable@FreeBSD.ORG Thu Aug 8 15:46:57 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 5997C6BD for ; Thu, 8 Aug 2013 15:46:57 +0000 (UTC) (envelope-from michael.schuh@gmail.com) Received: from mail-oa0-x234.google.com (mail-oa0-x234.google.com [IPv6:2607:f8b0:4003:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 23F6F2DA0 for ; Thu, 8 Aug 2013 15:46:57 +0000 (UTC) Received: by mail-oa0-f52.google.com with SMTP id n12so5443471oag.39 for ; Thu, 08 Aug 2013 08:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Whi7abrTCaa/oClVFD6HHABCbdshrCHNwZT64Lw7DRc=; b=eNC/GdtCdAifmNe7VvwjifjolmuqAe+aIcIGmcEDJ7mI78j3dys7ygvGEL4dPBCdxI 79oRv2VqP3W3yJ84hzir84yrejHzUik4YhX99S8GWyAYVDbNmoUojUb16uw2jo0Cm1D8 4oTxtnTs3rJAD1UcPmYUfaNXXmk6EuWkH9Fe/P4Pyc/4wB8jRQPkHiMUF4HjlpAjb3Xi WS4OOWxJCGweEZnuFGbdUK0GafZ02ZuZi0TlxWuc8FzZRpZsJmXJ4HBcXnRNRRoriQ1J ySPkOSoxQc/kMIXR9TwMrXg58YEIQWdKJpWRdneMdSr0qUo0xXstTBpi91NCJJc4GnJi JrSA== MIME-Version: 1.0 X-Received: by 10.60.124.14 with SMTP id me14mr4795085oeb.4.1375976816367; Thu, 08 Aug 2013 08:46:56 -0700 (PDT) Received: by 10.60.172.40 with HTTP; Thu, 8 Aug 2013 08:46:56 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 Aug 2013 17:46:56 +0200 Message-ID: Subject: Re: how to remove usb-storage devices without CAM errors From: Michael Schuh To: Alban Hertroys Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Stable 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 15:46:57 -0000 2013/8/8 Alban Hertroys > On 8 August 2013 05:56, Michael Schuh wrote: > >> 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 >> > > 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. > > No. That is not a valid explanation. This happens too if i change the order of the USB-Sticks and pull da2 or da1 instead of da0. The log snippet is exactly from the try and error of your thought.