Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2014 12:13:53 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Arthur Chance <freebsd@qeng-ho.org>
Cc:        freeBSD-Questions <freebsd-questions@freebsd.org>
Subject:   Re: zpool component names - gpt vs. gptid
Message-ID:  <alpine.BSF.2.11.1411051159030.1380@mail.fig.ol.no>
In-Reply-To: <545A0067.1090005@qeng-ho.org>
References:  <5459E89F.7080801@qeng-ho.org> <alpine.BSF.2.11.1411051026360.1376@mail.fig.ol.no> <545A0067.1090005@qeng-ho.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Nov 2014 10:48-0000, Arthur Chance wrote:

> On 05/11/2014 09:27, Trond Endrestøl wrote:
> > On Wed, 5 Nov 2014 09:06-0000, Arthur Chance wrote:
> > 
> > > These days I use GPT labelled partitions (/dev/gpt/<label>) exclusively
> > > when
> > > creating zfs pools. However, on my latest box, where I have two pools each
> > > with a single component, "zpool status" lists the components as
> > > gptid/<uuid>
> > > rather than gpt/<label>
> > > 
> > > Is there any way to persuade zfs/zpool to use the GPT label devices rather
> > > than the gptid devices? Failing that, how do you map gptid's back to the
> > > underlying disk partitions? It's obvious in this case, but I'm building a
> > > new
> > > file server with eight identical disks in a raidz2 set up and am worried
> > > how
> > > I'll identify which disk has problems in the future.
> > 
> > Look at: zpool import -d /dev/gpt some-zpool
> > 
> 
> I tried that before (after exporting the zpool of course) and it failed.
> Looking a bit harder, the /dev/gpt device had ceased to exist because the
> corresponding /dev/gptid device was active. Retasting the disk brought the gpt
> dive back, and importing with -d worked for one zpool. However, the other has
> root on it and I'd have to do it from a live memory stick.
> 
> However, none of this explains why zpool was using the gptid disks - I'd
> created the pools using gpt labelled disks and that got lost over some reboot,
> and I'd like to stop that happening again. The problem is that I don't know
> why it happened. I recently started using boot environments in order to switch
> from 10.1-RC3 to -RC4, but I'm not sure if that's connected - /boot and the
> zfs cache are within the b.e. and should have been copied over.

Hmm, I don't believe the cache file is used much these days, unless 
you:

1. Re-import all your zpools from a live memory stick:

zpool import -d /dev/gpt -o cachefile=/tmp/zpool.cache zpool1
zpool import -d /dev/gpt -o cachefile=/tmp/zpool.cache zpool2

2. Copy /tmp/zpool.cache to your b.e.'s /boot/zfs/zpool.cache while 
still running from the live memory stick.

3. Enable the kernel to consult /boot/zfs/zpool.cache by having these 
three lines in /boot/loader.conf:

zpool_cache_load="YES"
zpool_cache_type="/boot/zfs/zpool.cache"
zpool_cache_name="/boot/zfs/zpool.cache"

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-questions@FreeBSD.ORG  Wed Nov  5 14:27:05 2014
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 172C9C5E
 for <freebsd-questions@freebsd.org>; Wed,  5 Nov 2014 14:27:05 +0000 (UTC)
Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com
 [209.85.216.172])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id C8576177
 for <freebsd-questions@freebsd.org>; Wed,  5 Nov 2014 14:27:04 +0000 (UTC)
Received: by mail-qc0-f172.google.com with SMTP id i17so590485qcy.17
 for <freebsd-questions@freebsd.org>; Wed, 05 Nov 2014 06:26:57 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
 :subject:references:in-reply-to:content-type
 :content-transfer-encoding;
 bh=EKmtaNp9eBAnK4AggPLb0zHU9mZWT3YMMMA8o2qgkoE=;
 b=bLYXqNssGtnkDbKecBelTwmEPv7CkXUk2pdKG62wDgtoT/y4R+VZPrjulfGog3HFTT
 XfArvAC4q/iWyd545k2c17EJkkVoEiGKvpAJIlLhIaOGgb8aUGMrBUTg0yz6SFBGb/cT
 v3mLPyHKbCxI/kTdy861FhsKou/HdXen7XOoh4jRPucQjK6Ie6QT5xb1dPSXBLWo2Got
 j0diKJaTTVwV5auKkU846ZKpXB/ly2qdjX4xx+Qn6MbW34cyCKhZjsGOgsxyfAtf6Jo4
 Y7emWJhyoIZ8ruL8HyyyBJOx9EeBxviP8mBaf4xv4Ewul3yqDaD9vC5G7P7p/1m6E9yJ
 JQOw==
X-Gm-Message-State: ALoCoQno1baHpDDo73EmLjVII8pOSDvbQHZtsWBOWa9Ma2L9rfI4qT4l5S8XnRFo0G5LKK3GYJ+e
X-Received: by 10.224.23.9 with SMTP id p9mr19981843qab.92.1415197125760;
 Wed, 05 Nov 2014 06:18:45 -0800 (PST)
Received: from mbp-1.thecreativeadvantage.com (mail.thecreativeadvantage.com.
 [96.236.20.34])
 by mx.google.com with ESMTPSA id z4sm3240765qal.6.2014.11.05.06.18.44
 for <freebsd-questions@freebsd.org>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 05 Nov 2014 06:18:45 -0800 (PST)
Message-ID: <545A31C4.6010705@kraus-haus.org>
Date: Wed, 05 Nov 2014 09:18:44 -0500
From: Paul Kraus <paul@kraus-haus.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9;
 rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: freebsd-questions@freebsd.org
Subject: Re: zpool component names - gpt vs. gptid
References: <5459E89F.7080801@qeng-ho.org>
In-Reply-To: <5459E89F.7080801@qeng-ho.org>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Nov 2014 14:27:05 -0000

On 11/5/14 4:06, Arthur Chance wrote:

> Is there any way to persuade zfs/zpool to use the GPT label devices
> rather than the gptid devices? Failing that, how do you map gptid's back
> to the underlying disk partitions? It's obvious in this case, but I'm
> building a new file server with eight identical disks in a raidz2 set up
> and am worried how I'll identify which disk has problems in the future.

I have taken to putting a physical label on the outside of the disk 
bracket (I use hot or cold swap disk brackets) with the last four digits 
of the unique ID (usually based on drive S/N). I had managed lots of 
Fibre-Channel drives in a previous life and the _only_ drive ID there is 
the WWN, which better vendors included on the exterior mounting bracket.

-- 
--
Paul Kraus    paul@kraus-haus.org
Co-Chair Albacon 2014.5 http://www.albacon.org/2014/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1411051159030.1380>