From owner-freebsd-geom@FreeBSD.ORG Mon Jan 31 06:04:18 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17A2106566B for ; Mon, 31 Jan 2011 06:04:17 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id B08FE8FC14 for ; Mon, 31 Jan 2011 06:04:17 +0000 (UTC) Received: by iyb26 with SMTP id 26so4633345iyb.13 for ; Sun, 30 Jan 2011 22:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:x-openpgp-key-id :x-openpgp-key-fingerprint:mime-version:content-type; bh=f2OhR+0phmIkay3VY4Ow6qe/HYB7+T7tXv6XR7QghJ4=; b=tX+SYYi2L7IJxGgK0HYXI7rrMK3NnV3nrhiHfbtvhl6l8DAQQwDNGUHwUPuQ4mcVNn xR3ps1aBaqxH1DZk3KbkZi1/0v9JKQuoNdStNRqD1DhzLIyzABYkeQqXXCa+TH3hTGl4 HwX4/FFc41/lTR8uzKi8LaftBVWItH7Hewin4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=nAWGnIB5bjshsyY2Lc7GVfrGMOt9fipx+N7FP0MTHqw8UarUlar6gCUM4RpuB5x/aU txqGJWfKuMzI1u0beKkiG1OYsfPDRuOunvkeEwqm3o1bIunMUrTARU7ifcx7ralA2czj HRpGaTiFH8hfILU/FdEd5UYzVeHr8WXCI/y1Y= Received: by 10.231.32.130 with SMTP id c2mr6165282ibd.35.1296453857200; Sun, 30 Jan 2011 22:04:17 -0800 (PST) Received: from disbatch.dataix.local (adsl-99-119-131-142.dsl.klmzmi.sbcglobal.net [99.119.131.142]) by mx.google.com with ESMTPS id 8sm17597028iba.10.2011.01.30.22.04.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 22:04:14 -0800 (PST) Sender: "J. Hellenthal" Date: Mon, 31 Jan 2011 01:03:52 -0500 From: jhell To: "Vladislav V. Prodan" In-Reply-To: <4D44DF55.6010804@ukr.net> Message-ID: References: <4D3DF4B8.4050901@ukr.net> <4D44DF55.6010804@ukr.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: freebsd-geom@freebsd.org Subject: Re: [ZFS] How to change the geom label for a disk without losing data in the ZFS pool? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2011 06:04:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 29 Jan 2011 22:47, universite@ wrote: > Why does not appear glabel label when connecting to a ZFS pool??? > > # zpool status > pool: tank > state: ONLINE > scrub: scrub in progress for 9h7m, 51,27% done, 8h40m to go > config: > > NAME STATE READ WRITE CKSUM > tank ONLINE 0 0 0 > raidz2 ONLINE 0 0 0 > gpt/disk0 ONLINE 0 0 0 > gpt/disk1 ONLINE 0 0 0 > gpt/disk2 ONLINE 0 0 0 > gpt/disk3 ONLINE 0 0 0 > gpt/disk4 ONLINE 0 0 0 > ad18p1 ONLINE 0 0 0 You are attaching or have attached this disk to the pool. When attached... gpt/* label/* gptid/* remove them self because the provider is now in use. This is expected correct behavior. > > errors: No known data errors > > # zpool offline tank ad18p1 > # glabel list ad18p1 > Geom name: ad18p1 > Providers: > 1. Name: gpt/disk5 Here you have generically labeled a gpt/* already labeled disk which makes no sense... It is already labeled. Labeling it again with a generic label is only going to cause what you found out below. > Mediasize: 750156339712 (699G) > Sectorsize: 512 > Mode: r0w0e0 > secoffset: 0 > offset: 0 > seclength: 1465149101 > length: 750156339712 > index: 0 > Consumers: > 1. Name: ad18p1 > Mediasize: 750156339712 (699G) > Sectorsize: 512 > Mode: r0w0e0 > # zpool online tank ad18p1 Here you have on-lined ad18p1 so therefore gpt/disk5 which you have generically mis-labeled with glabel(8), disappears... as stated earlier, this is expected behavior. > # glabel list ad18p1 > glabel: No such geom: ad18p1. > glabel(8) generic labels are not for use with gpart(8) '-l'. There is no benefit to using both... Choose one or the other, but I would suggest that if you have already been through the trouble of setting up your disks with gpart + GPT then continue to use the gpt/* labels and skip using glabel(8). - -- jhell -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJNRlDVAAoJEJBXh4mJ2FR+Z5AH/1QgaFNFAnmV0OG/lFlYsXV6 HrQ1MvBVuma0KEdnNL4t4kCYCkQ/boqyd6hxKmgriK2SbVXw/EFzTyNPW9uAebEg P22HgCdrYL09Qd47QixPU7l9Kos6Gc8dHr+mFMrDccR1Jt11HrUPdihiDbBh5VJG MRflTRzMDVkk09+lkAQewjl2KQebOuff8WtVyPJA//+5MCWK2I9tClMaKI4Gb1s9 J3u8ykW7P86QamJKh8nTszEK+IgutLH4CwSxXXs42FEcK0kYarVu/S/35faf4sLK dnYhWFcavdtbhpVTwokZVFMoY3o64R/0LHSwDmx8pLrv7QCtWowcsMIBANHjTQE= =GY1U -----END PGP SIGNATURE-----