From owner-freebsd-fs@FreeBSD.ORG Thu Apr 26 15:50:13 2012 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 306C2106564A for ; Thu, 26 Apr 2012 15:50:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1A6E58FC14 for ; Thu, 26 Apr 2012 15:50:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q3QFoCZl031160 for ; Thu, 26 Apr 2012 15:50:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q3QFoCjj031159; Thu, 26 Apr 2012 15:50:12 GMT (envelope-from gnats) Date: Thu, 26 Apr 2012 15:50:12 GMT Message-Id: <201204261550.q3QFoCjj031159@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Anna-Maria Cc: Subject: Re: kern/167272: [zfs] ZFS Disks reordering causes ZFS to pick the wrong drive X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anna-Maria List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 15:50:13 -0000 The following reply was made to PR kern/167272; it has been noted by GNATS. From: Anna-Maria To: bug-followup@FreeBSD.org, david.alves@gmx.fr Cc: Subject: Re: kern/167272: [zfs] ZFS Disks reordering causes ZFS to pick the wrong drive Date: Thu, 26 Apr 2012 17:40:19 +0200 This is a multi-part message in MIME format. --------------060700060302040105000702 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit You can use the "zdb" command to see the guid of the disk, and use that to replace it. eg. children[2]: type: 'disk' id: 2 guid: *713716085525288922* path: '/dev/*da21*' phys_path: '/dev/*da21*' whole_disk: 1 *not_present: 1* metaslab_array: 13154506 metaslab_shift: 25 ashift: 9 asize: 4289200128 is_log: 1 DTL: 13647709 create_txg: 2302081 zpool replace 713716085525288922 da31 Also, I had a barely related problem with 8.2-RELEASE (or may have been the 8-STABLE from April which is in an iso on the ftp site), where rebooting would make ZFS use the wrong disk in the pool. (eg. my hot spare might end up being part of the raidz2, and so constantly create checksum errors until I scrub it or move it back). And then I tried warning others about it, and they would always say that I make no sense, and zfs uses the guid so can't get confused, etc. and only shows the label/device on the command output. So I tried reproducing it, and it was impossible for me to reproduce with 8-STABLE (October 2011). Your problem isn't quite the same, but may be related. Also in 8-STABLE, any time I do weird stuff like you did, the disk shows the guid on the next reboot instead of the old device name, and on the right it will add a comment saying "was da21". (but mostly I use gpt slices, so I might just not have enough experience with that particular problem). So I highly recommend you try 8.3-RELEASE (or 8-STABLE). And one more warning... if you ugrade to newer than 8.2-RELEAE, and have an old pool from 8.2-RELEASE and upgrade it to v28, you still can't remove logs. It is bugged. You need to destroy and recreate. --------------060700060302040105000702 Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit You can use the "zdb" command to see the guid of the disk, and use that to replace it.

eg.

        children[2]:
            type: 'disk'
            id: 2
            guid: 713716085525288922
            path: '/dev/da21'
            phys_path: '/dev/da21'
            whole_disk: 1
            not_present: 1
            metaslab_array: 13154506
            metaslab_shift: 25
            ashift: 9
            asize: 4289200128
            is_log: 1
            DTL: 13647709
            create_txg: 2302081

zpool replace 713716085525288922 da31

Also, I had a barely related problem with 8.2-RELEASE (or may have been the 8-STABLE from April which is in an iso on the ftp site), where rebooting would make ZFS use the wrong disk in the pool. (eg. my hot spare might end up being part of the raidz2, and so constantly create checksum errors until I scrub it or move it back). And then I tried warning others about it, and they would always say that I make no sense, and zfs uses the guid so can't get confused, etc. and only shows the label/device on the command output. So I tried reproducing it, and it was impossible for me to reproduce with 8-STABLE (October 2011). Your problem isn't quite the same, but may be related.

Also in 8-STABLE, any time I do weird stuff like you did, the disk shows the guid on the next reboot instead of the old device name, and on the right it will add a comment saying "was da21". (but mostly I use gpt slices, so I might just not have enough experience with that particular problem).

So I highly recommend you try 8.3-RELEASE (or 8-STABLE).

And one more warning... if you ugrade to newer than 8.2-RELEAE, and have an old pool from 8.2-RELEASE and upgrade it to v28, you still can't remove logs. It is bugged. You need to destroy and recreate.
--------------060700060302040105000702--