gpart labels - why arent't some showing up in /dev/gpt/?
Andrew Reilly
areilly at bigpond.net.au
Wed May 2 06:39:40 UTC 2012
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
More information about the freebsd-fs
mailing list