From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 28 15:50:02 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.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 E24A8492 for ; Mon, 28 Oct 2013 15:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C22D328AF for ; Mon, 28 Oct 2013 15:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9SFo29E019403 for ; Mon, 28 Oct 2013 15:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9SFo2nl019402; Mon, 28 Oct 2013 15:50:02 GMT (envelope-from gnats) Resent-Date: Mon, 28 Oct 2013 15:50:02 GMT Resent-Message-Id: <201310281550.r9SFo2nl019402@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Gmelin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CDA2C276 for ; Mon, 28 Oct 2013 15:42:55 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB7302863 for ; Mon, 28 Oct 2013 15:42:55 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9SFgt7p066182 for ; Mon, 28 Oct 2013 15:42:55 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9SFgt4t066181; Mon, 28 Oct 2013 15:42:55 GMT (envelope-from nobody) Message-Id: <201310281542.r9SFgt4t066181@oldred.freebsd.org> Date: Mon, 28 Oct 2013 15:42:55 GMT From: Michael Gmelin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/183406: gpart label not accessible after reseating disk X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2013 15:50:02 -0000 >Number: 183406 >Category: kern >Synopsis: gpart label not accessible after reseating disk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 28 15:50:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Michael Gmelin >Release: 10.0-BETA2 >Organization: Grem Equity GmbH >Environment: FreeBSD 10.0-BETA2 FreeBSD 10.0-BETA2 #0 r257166: Sat Oct 26 19:23:22 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: When pulling a drive and reseating it in another slot, gpart doesn't show the drive's partition table anymore. When returning the drive to its original slot, it shows up again just fine. Controller is LSI SAS 2008 based 9211i-IT (mps(4) driver), running all attached drives as JBODs. After reseating the drive to the correct slot, resilvering ZFS works fine as well. When it remains in the other slot, all kinds of terrible things start happening (including gpart segfaulting at some point). A reboot fixes all those issues. camcontrol rescan all etc. won't help. I'm not certain if this is due to the mps(4) driver (the drive always shows up as the same lun target, regardless of which slot) or an issue in gpart/geom, therefore I didn't specify in the synopsis. >How-To-Repeat: Hotswap a drive to a new bay. Example procedure: Show partition table (disk da1 is a spare): [root@ ~]# gpart show -l => 34 585937433 da0 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay0 (32G) 67109026 518828441 3 databay0 (247G) => 34 585937433 da1 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) => 34 585937433 da2 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay1 (32G) 67109026 518828441 3 databay1 (247G) => 34 585937433 diskid/DISK-6SJ4HSQR0000N23132VX GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) Pull drive da2: Oct 28 15:11:34 kernel: da2 at mps0 bus 0 scbus7 target 0 lun 0 Oct 28 15:11:34 kernel: da2: s/n 6SJ2ZBP00000N2318ZSS detached Oct 28 15:11:34 kernel: (da2: Oct 28 15:11:34 kernel: mps0:0:0: Oct 28 15:11:34 kernel: 0): Periph destroyed Also disappeared from gpart (as expected): [root@ ~]# gpart show -l => 34 585937433 da0 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay0 (32G) 67109026 518828441 3 databay0 (247G) => 34 585937433 da1 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) => 34 585937433 diskid/DISK-6SJ4HSQR0000N23132VX GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) Reseat drive in a different slot: Oct 28 15:12:08 kernel: da2 at mps0 bus 0 scbus7 target 0 lun 0 Oct 28 15:12:08 kernel: da2: Fixed Direct Access SCSI-5 device Oct 28 15:12:08 kernel: da2: Serial Number 6SJ2ZBP00000N2318ZSS Oct 28 15:12:08 kernel: da2: 600.000MB/s transfers Oct 28 15:12:08 kernel: da2: Command Queueing enabled Oct 28 15:12:08 kernel: da2: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) And give it some time to spin up... still, it won't show up in gpart [root@ ~]# gpart show -l => 34 585937433 da0 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay0 (32G) 67109026 518828441 3 databay0 (247G) => 34 585937433 da1 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) => 34 585937433 diskid/DISK-6SJ4HSQR0000N23132VX GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) [root@ ~]# gpart status Name Status Components da0p1 OK da0 da0p2 OK da0 da0p3 OK da0 da1p1 OK da1 da1p2 OK da1 da1p3 OK da1 diskid/DISK-6SJ4HSQR0000N23132VXp1 OK diskid/DISK-6SJ4HSQR0000N23132VX diskid/DISK-6SJ4HSQR0000N23132VXp2 OK diskid/DISK-6SJ4HSQR0000N23132VX diskid/DISK-6SJ4HSQR0000N23132VXp3 OK diskid/DISK-6SJ4HSQR0000N23132VX Remove the drive and reseat it in the original drive bay, wait a few seconds at it shows up in gpart just fine: [root@ ~]# gpart show -l => 34 585937433 da0 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay0 (32G) 67109026 518828441 3 databay0 (247G) => 34 585937433 da1 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) => 34 585937433 diskid/DISK-6SJ4HSQR0000N23132VX GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay2 (32G) 67109026 518828441 3 databay2 (247G) => 34 585937433 da2 GPT (279G) 34 128 1 (null) (64K) 162 67108864 2 swapbay1 (32G) 67109026 518828441 3 databay1 (247G) >Fix: na >Release-Note: >Audit-Trail: >Unformatted: