From owner-freebsd-fs@FreeBSD.ORG Wed May 2 06:39:39 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 C75051065676 for ; Wed, 2 May 2012 06:39:39 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nskntmtas03p.mx.bigpond.com (nskntmtas03p.mx.bigpond.com [61.9.168.143]) by mx1.freebsd.org (Postfix) with ESMTP id 6AB798FC15 for ; Wed, 2 May 2012 06:39:39 +0000 (UTC) Received: from nskntotgx03p.mx.bigpond.com ([124.188.161.100]) by nskntmtas03p.mx.bigpond.com with ESMTP id <20120502063937.SLOJ10464.nskntmtas03p.mx.bigpond.com@nskntotgx03p.mx.bigpond.com> for ; Wed, 2 May 2012 06:39:37 +0000 Received: from johnny.reilly.home ([124.188.161.100]) by nskntotgx03p.mx.bigpond.com with ESMTP id <20120502063937.GLIU2714.nskntotgx03p.mx.bigpond.com@johnny.reilly.home> for ; Wed, 2 May 2012 06:39:37 +0000 Date: Wed, 2 May 2012 16:39:27 +1000 From: Andrew Reilly To: freebsd-fs@freebsd.org Message-ID: <20120502063927.GA9559@johnny.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-SIH-MSG-ID: ohw1Etf5TAD0zmQs0WyzOwJxyArnqyN48Z4QX81loRIGTUDCp8DeQ9rEJvdRvN+vxC5OJhqDNGIpaa/jTY3Rs9uK Subject: gpart labels - why arent't some showing up in /dev/gpt/? 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: Wed, 02 May 2012 06:39:40 -0000 Hi there, I like being able to label my drives and partitions with gpart, so that I can (putatively) replace drives or move them around or have the new ata drivers move them around for me, and still have fstab find them. So, for example, I have (in fstab): /dev/gpt/root / ufs rw,async,noatime 1 1 Which derives from an appropriate label on ada2p1: Geom name: ada2 modified: false state: OK fwheads: 16 fwsectors: 63 last: 117231374 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada2p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 17408 Mode: r0w0e0 rawuuid: 356aefc1-92a7-11e1-ae3f-00270e0fb8e9 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: bootme length: 65536 offset: 17408 type: freebsd-boot index: 1 end: 161 start: 34 2. Name: ada2p2 Mediasize: 60022325248 (55G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 131072 Mode: r1w1e2 rawuuid: 9995b354-92a7-11e1-ae3f-00270e0fb8e9 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: root length: 60022325248 offset: 131072 type: freebsd-ufs index: 2 end: 117231359 start: 256 Consumers: 1. Name: ada2 Mediasize: 60022480896 (55G) Sectorsize: 512 Mode: r1w1e3 Back when I first built this computer, I similarly labelled the four freebsd-zfs partitions on my four main spinning disks, with the intention that I could use these names in a non-confusing way in subsequent zpool create commands. This did work *once*, but after using the /dev/gpt/raidz0... names to create a raidz tank, they disappeared from /dev/gpt, and the names that showed up in zpool status output were the long strings of digits from the /dev/gptid/ directory. This week I had to blow my raid array and start from scratch, after zpool scrub proved itself incapable of fixing or removing the corruption that I have mentioned here earlier. Even after clearing the disks of their zpool, the gpt names did not show up under /dev/gpt, so I have had to rebuild my zfs array with old-school partition names, like ada0p1 and so on. This does work, but it seems a bit sub-optimal. Anyone know why the /dev/gpt/label name seems so tempramental, and what might be done to make it behave as I've expected? FWIW here is a gpart list of the first of the raid drives (the other three are essentially the same, but with the label digit incremented): Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 1953525134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada0p1 Mediasize: 1000204851712 (931G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 17408 Mode: r1w1e1 rawuuid: b06b6337-e511-11e0-9d62-00270e0fb8e9 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: raidz1 length: 1000204851712 offset: 17408 type: freebsd-zfs index: 1 end: 1953525134 start: 34 Consumers: 1. Name: ada0 Mediasize: 1000204886016 (931G) Sectorsize: 512 Mode: r1w1e2 and here's the entire contents of /dev/gpt: altroot backup backup3g bootme bootme2 root (no raidz1, etc.) Cheers, -- Andrew