From owner-freebsd-questions@FreeBSD.ORG Mon Oct 24 15:22:03 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 B69B31065675 for ; Mon, 24 Oct 2011 15:22:03 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 90B788FC0A for ; Mon, 24 Oct 2011 15:22:03 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [192.168.100.151] ([96.22.43.18]) by VL-VM-MR006.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0LTK00636TCOJO70@VL-VM-MR006.ip.videotron.ca> for freebsd-questions@freebsd.org; Mon, 24 Oct 2011 11:22:01 -0400 (EDT) Message-id: <4EA582DF.6000006@optiksecurite.com> Date: Mon, 24 Oct 2011 11:23:11 -0400 From: FreeBSD Optik User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 To: Daryl Sayers References: <4EA44085.6060203@optiksecurite.com> <201110240300.p9O30TpG013031@mippet.ci.com.au> In-reply-to: <201110240300.p9O30TpG013031@mippet.ci.com.au> Cc: freebsd-questions@freebsd.org Subject: Re: 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: Mon, 24 Oct 2011 15:22:03 -0000 Le 2011-10-23 23:00, Daryl Sayers a écrit : >>>>>> "=?ISO-8859-1?Q?FreeBSD" == =?ISO-8859-1?Q?FreeBSD Optik S=E9curit=E9?= writes: >> Le 2011-10-18 21:57, Daryl Sayers a écrit : >>> 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. >>> >> Hi! >> I just tried it and had no problem on 9.0-BETA3 AMD64. The labels were >> still intact and used by ZFS after the import. Which FreeBSD version are >> you using? >> Martin > Yeh, Sorry I forgot to highlight the versions. > > FreeBSD 8.2-STABLE amd64 > ZFS filesystem version 5 > ZFS storage pool version 28 > > I don't know what to say except try it with 9.0, if possible. The RC1 just got out. I'm no expert on this, sorry I can't be more helpful. Martin