Date: Wed, 2 May 2012 12:11:41 +0300 From: George Kontostanos <gkontos.mail@gmail.com> To: freebsd-fs@freebsd.org Subject: Re: gpart labels - why arent't some showing up in /dev/gpt/? Message-ID: <CA%2BdUSyoCkYRrB4d-oDBOHEQP%2B%2BMEkYVRaW84=Ut5J1%2BCNEobVA@mail.gmail.com> In-Reply-To: <4FA0D844.8090105@brockmann-consult.de> References: <20120502063927.GA9559@johnny.reilly.home> <4FA0D844.8090105@brockmann-consult.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 2, 2012 at 9:46 AM, Peter Maloney <peter.maloney@brockmann-consult.de> wrote: > I have the same problem. Any time you boot off a CD/DVD and use import -f > (and then don't export), or I guess use import -f a pool from anywhere, it > does that. I don't know any non-zfs causes for the problem. > > Here are some relevant /boot/loader.conf settings (I don't know how accurate > the comments are... I wrote them myself, without fully testing them): > > # Setting this to 0 will get rid of the /dev/gptid directory and you will > see your /dev/gpt directory again if it bugged out and gpt labels > disappeared. > #kern.geom.label.gptid.enable=0 > > # Not sure what this does; I assume it means to forget about /dev/gpt/* and > probably either show gptid (if not disabled above) or the original device > name (eg. da0p2) > #kern.geom.label.gpt.enable=0 > > > However, that is a lame workaround, disabling a feature to get another back. > I would love to see a good fix. > > > > On 05/02/2012 08:39 AM, Andrew Reilly wrote: >> >> 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, >> > > > -- > > -------------------------------------------- > Peter Maloney > Brockmann Consult > Max-Planck-Str. 2 > 21502 Geesthacht > Germany > Tel: +49 4152 889 300 > Fax: +49 4152 889 333 > E-mail: peter.maloney@brockmann-consult.de > Internet: http://www.brockmann-consult.de > -------------------------------------------- > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" You can always use: gpart show -l That should display the label. -- George Kontostanos Aicom telecoms ltd http://www.aisecure.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BdUSyoCkYRrB4d-oDBOHEQP%2B%2BMEkYVRaW84=Ut5J1%2BCNEobVA>
