From owner-freebsd-current@FreeBSD.ORG Fri Dec 5 20:45:57 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4F3F1065675 for ; Fri, 5 Dec 2008 20:45:57 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id 4994D8FC0A for ; Fri, 5 Dec 2008 20:45:56 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from localhost by koef.zs64.net (8.14.3/8.14.3) with ESMTP id mB5KjtnH068271 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 5 Dec 2008 21:45:55 +0100 (CET) (envelope-from stb@lassitu.de) (authenticated as stb) Message-Id: From: Stefan Bethke To: FreeBSD Current Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Fri, 5 Dec 2008 21:45:54 +0100 X-Mailer: Apple Mail (2.929.2) Subject: Labeling disks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 20:45:57 -0000 I'm trying to set up a new machine with three disks, which should host a root ufs file system, swap space, and a raidz zfs pool. Doing this the old-fashioned way with fdisk and bsdlabel (and gmirror for the a and b slices) works just fine, but I figured I might use the opportunity and try a GPT partition table. Also, I'd like to label the disks, and use the labels to reference the disks and contained partitions, instead of the ATA disk device. If I need to swap disks, I then don't have to take care to reinsert them into the exact same spots. Unfortunatly, I'm coming up short: - Using glabel to label the disks, and then fdisk/bsdlabel partioning them, works nicely. As soon as I put a gmirror on the label/disk?s1a partitions, *all* labels disappear. Huh? I can understand removing the labels for the partitions that are now the providers used by the gmirror, but why to the other get removed? Also, it seems that gmirror references the actual disks (see gmirror output below) instead of the labels. I was under the impression that glabel would consume a provider and provide it minus the last sector, so /dev/label/foo and / dev/ad22 are not the same device (but do overlap). - I did manage to create a GPT partitioned USB stick, but the partition label doesn't show up. I would be grateful if someone could commit kern/128398 or similar. (Unless I'm misunderstanding how GPT labels should show up.) Am I going about this the wrong way? Is there another way to configure gmirror and ZFS to use specific disks as opposed to certain channels on certain controllers? Thanks, Stefan $ gmirror list Geom name: root State: COMPLETE Components: 3 Balance: load Slice: 4096 Flags: NONE GenID: 0 SyncID: 1 ID: 1289874545 Providers: 1. Name: mirror/root Mediasize: 4294966784 (4.0G) Sectorsize: 512 Mode: r1w1e1 Consumers: 1. Name: ad6s1a Mediasize: 4294967296 (4.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 0 SyncID: 1 ID: 148493928 2. Name: ad8s1a Mediasize: 4294967296 (4.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 1 Flags: DIRTY GenID: 0 SyncID: 1 ID: 1518735210 3. Name: ad10s1a Mediasize: 4294967296 (4.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 2 Flags: DIRTY GenID: 0 SyncID: 1 ID: 291618695 -- Stefan Bethke Fon +49 170 346 0140