Skip site navigation (1)Skip section navigation (2)
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, i=
t
> 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 accur=
ate
> 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=3D0
>
> # Not sure what this does; I assume it means to forget about /dev/gpt/* a=
nd
> probably either show gptid (if not disabled above) or the original device
> name (eg. da0p2)
> #kern.geom.label.gpt.enable=3D0
>
>
> However, that is a lame workaround, disabling a feature to get another ba=
ck.
> 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 =A0 =A0 =A0 =A0 =A0 / =A0 =A0 =A0 =A0 =A0 =A0 =A0 ufs =A0 =
=A0 rw,async,noatime 1 =A0 =A0 =A01
>>
>> 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
>> =A0 =A0Mediasize: 65536 (64k)
>> =A0 =A0Sectorsize: 512
>> =A0 =A0Stripesize: 0
>> =A0 =A0Stripeoffset: 17408
>> =A0 =A0Mode: r0w0e0
>> =A0 =A0rawuuid: 356aefc1-92a7-11e1-ae3f-00270e0fb8e9
>> =A0 =A0rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
>> =A0 =A0label: bootme
>> =A0 =A0length: 65536
>> =A0 =A0offset: 17408
>> =A0 =A0type: freebsd-boot
>> =A0 =A0index: 1
>> =A0 =A0end: 161
>> =A0 =A0start: 34
>> 2. Name: ada2p2
>> =A0 =A0Mediasize: 60022325248 (55G)
>> =A0 =A0Sectorsize: 512
>> =A0 =A0Stripesize: 0
>> =A0 =A0Stripeoffset: 131072
>> =A0 =A0Mode: r1w1e2
>> =A0 =A0rawuuid: 9995b354-92a7-11e1-ae3f-00270e0fb8e9
>> =A0 =A0rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
>> =A0 =A0label: root
>> =A0 =A0length: 60022325248
>> =A0 =A0offset: 131072
>> =A0 =A0type: freebsd-ufs
>> =A0 =A0index: 2
>> =A0 =A0end: 117231359
>> =A0 =A0start: 256
>> Consumers:
>> 1. Name: ada2
>> =A0 =A0Mediasize: 60022480896 (55G)
>> =A0 =A0Sectorsize: 512
>> =A0 =A0Mode: 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. =A0This 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. =A0Even 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. =A0This 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
>> =A0 =A0Mediasize: 1000204851712 (931G)
>> =A0 =A0Sectorsize: 512
>> =A0 =A0Stripesize: 0
>> =A0 =A0Stripeoffset: 17408
>> =A0 =A0Mode: r1w1e1
>> =A0 =A0rawuuid: b06b6337-e511-11e0-9d62-00270e0fb8e9
>> =A0 =A0rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
>> =A0 =A0label: raidz1
>> =A0 =A0length: 1000204851712
>> =A0 =A0offset: 17408
>> =A0 =A0type: freebsd-zfs
>> =A0 =A0index: 1
>> =A0 =A0end: 1953525134
>> =A0 =A0start: 34
>> Consumers:
>> 1. Name: ada0
>> =A0 =A0Mediasize: 1000204886016 (931G)
>> =A0 =A0Sectorsize: 512
>> =A0 =A0Mode: 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.

--=20
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>