From owner-freebsd-questions@FreeBSD.ORG Wed Oct 19 02:08:45 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8018C106564A for ; Wed, 19 Oct 2011 02:08:45 +0000 (UTC) (envelope-from darylXYZ@ci.com.au) Received: from mippet.ci.com.au (mippet.ci.com.au [192.65.182.30]) by mx1.freebsd.org (Postfix) with ESMTP id 1C32E8FC08 for ; Wed, 19 Oct 2011 02:08:44 +0000 (UTC) Received: from mippet.ci.com.au (localhost [127.0.0.1]) by mippet.ci.com.au (8.14.4/8.14.4/CE101231/cmlga) with ESMTP id p9J1vwMl088694 for ; Wed, 19 Oct 2011 12:57:59 +1100 (EST) (envelope-from darylXYZ@ci.com.AU) Received: (from daryl@localhost) by mippet.ci.com.au (8.14.4/8.14.4/Submit) id p9J1vwRL088691; Wed, 19 Oct 2011 12:57:58 +1100 (EST) (envelope-from darylXYZ@ci.com.AU) X-Authentication-Warning: mippet.ci.com.au: daryl set sender to darylXYZ@ci.com.AU using -f Sender: daryl@ci.com.AU To: freebsd-questions@freebsd.org From: Daryl Sayers Date: 19 Oct 2011 12:57:58 +1100 Message-ID: Lines: 77 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.68 on 192.65.182.30 Subject: ZFS and glabels when export/importing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 02:08:45 -0000 Had a prblem when I needed to export a zpool and import again. The pool used glabels for each device but after the import the pool is now using the raw devices names. sandbox# zpool create -f tank3 raidz1 /dev/label/012 /dev/label/066 label/040 label/064 sandbox# zpool status pool: tank3 state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM tank3 ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 label/012 ONLINE 0 0 0 label/066 ONLINE 0 0 0 label/040 ONLINE 0 0 0 label/064 ONLINE 0 0 0 sandbox# glabel list | grep Name 1. Name: label/012 1. Name: ada0 1. Name: label/066 1. Name: ada1 1. Name: label/040 1. Name: ada2 1. Name: label/064 1. Name: ada3 sandbox# zpool export tank3 sandbox# glabel list | grep Name 1. Name: label/012 1. Name: ada0 1. Name: label/066 1. Name: ada1 1. Name: label/040 1. Name: ada2 1. Name: label/064 1. Name: ada3 sandbox# zpool import tank3 sandbox# glabel list sandbox# zpool status pool: tank3 state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM tank3 ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 ada0 ONLINE 0 0 0 ada1 ONLINE 0 0 0 ada2 ONLINE 0 0 0 ada3 ONLINE 0 0 0 ------------------------------------------------------------------ The only way I could get zfs to use the glabels without destroying the pool was to install a new drive, glabel it and then replace that with the first drive, then do the same for each drive. sandbox# zpool replace -f tank3 /dev/ada0 label/014 ... wait for completion sandbox# zpool replace -f tank3 /dev/ada1 label/012 ... wait for completion Note that I did not need to glabel any drive (except the newly installed spare) so the label was still intact on each drive. So, How do I do an export and import and still keep the glabels that the original pool was created with. -- Daryl Sayers To reply please remove the XYZ from the email address.