From owner-freebsd-fs@FreeBSD.ORG Sun Jan 1 12:45:26 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5691E106564A for ; Sun, 1 Jan 2012 12:45:26 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C73498FC0C for ; Sun, 1 Jan 2012 12:45:24 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so20417767vbb.13 for ; Sun, 01 Jan 2012 04:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=SxerGOkfGaol6HQeZRf0Cqrr/T76rLbsOQInA26Z7ho=; b=CTQWezeeSqD0cZovEortUZ71wlqpTGLmT5lA37Aki8aPn/GVC8dfw7m734oWpRP6Dg HtdhE0tA3vJ4xHC8imi3RWYNmcLPv5oRjUVnqIoGGKMv8xfkaOAVJU7QJLtjhKD/D45A 7T60bpP/5CuTU6v3o6+yLzEIjN0AqDIE8bGvE= MIME-Version: 1.0 Received: by 10.52.17.139 with SMTP id o11mr23563795vdd.62.1325421923988; Sun, 01 Jan 2012 04:45:23 -0800 (PST) Received: by 10.220.194.131 with HTTP; Sun, 1 Jan 2012 04:45:23 -0800 (PST) In-Reply-To: <4F00522F.6020700@dannysplace.net> References: <4F003EB8.6080006@dannysplace.net> <4F00522F.6020700@dannysplace.net> Date: Sun, 1 Jan 2012 04:45:23 -0800 Message-ID: From: Freddie Cash To: Dan Carroll Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: ZFS With Gpart partitions X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2012 12:45:26 -0000 On Sun, Jan 1, 2012 at 4:31 AM, Dan Carroll wrote: > On 1/01/2012 10:08 PM, Freddie Cash wrote: >> >> When in doubt, read the man page: =C2=A0man gpart >> >> The option you are looking for is "-l": >> >> # gpart show -l da8 >> >> That will show the labels set in the GPT for each partition. >> >> And labels are created using "-l" in the "gpart add" command, as well. > > Ok, so the label is still there. =C2=A0 Two things are still strange. > 1) =C2=A0data2 is not in /dev/gpt/ > 2) =C2=A0"glabel list da8p1" does not find anything. =C2=A0 But it does f= or other > drives. You may need to offline the disk in the zfs pool, then "gpart destroy da8" to clear out the primary GPT table at the start of the disk, and the secondary GPT table at the end of the disk. That will also clear out the /dev/da8p* entries, and related /dev/gpt/ entry. Then create the GPT from scratch, including the label. Then, finally, add/replace the disk to the ZFS pool. The [kernel|GEOM|whatever] doesn't do a very good job of re-checking the disks for changed GPT tables, instead using the ones in memory. Or something along those lines. You have to destroy the existing table, then create it, which causes the [kernel|GEOM|whatever] to re-taste the disk and load the GPT off the disk, thus creating the /dev/gpt/ entry. > Also, is there a difference (for ZFS) acessing the drive via /dev/da8p1 o= r > /dev/gpt/data2 As far as ZFS is concerned, no. When importing the pool, ZFS checks for ZFS metadata to determine which disk belongs to which vdev in which pool, and gets all the pathing sorted out automatically. However, since disk device nodes can change at boot (add a new controller, boot with a dead drive, do a BIOS update that reverses the PCI scan order, etc), it makes it easier on the admin to have labels. For example, in our 16-bay storage servers, I've set up a coordinate system where columns are letters A-D, and rows are numbers 1-4. Then I've labelled each disk according to where it is in the chassis: /dev/gpt/disk-a1 /dev/gpt/disk-a2 /dev/gpt/disk-a3 /dev/gpt/disk-a4 etc That way, no matter how the drives are actually enumerated by the BIOS, loader, kernel, drivers, etc, I always know which disk is having issues. :) --=20 Freddie Cash fjwcash@gmail.com