gpt labels for zfs partitions don't appear in /dev/gpt
Bartosz Stec
bartosz.stec at it4pro.pl
Wed Jun 15 11:43:26 UTC 2011
Hi list,
please take a look at this:
#gpart show
=> 34 80293181 ada0 GPT (38G)
34 128 1 freebsd-boot (64k)
162 2097152 2 freebsd-swap (1.0G)
2097314 76068013 3 freebsd-zfs (36G)
78165327 2127888 - free - (1.0G)
=> 34 78165293 ada1 GPT (37G)
34 128 1 freebsd-boot (64k)
162 2097152 2 freebsd-swap (1.0G)
2097314 76068013 3 freebsd-zfs (36G)
=> 34 80293181 ada2 GPT (38G)
34 128 1 freebsd-boot (64k)
162 2097152 2 freebsd-swap (1.0G)
2097314 76068013 3 freebsd-zfs (36G)
78165327 2127888 - free - (1.0G)
# gpart show -l
=> 34 80293181 ada0 GPT (38G)
34 128 1 (null) (64k)
162 2097152 2 swap0 (1.0G)
2097314 76068013 3 disk0 (36G)
78165327 2127888 - free - (1.0G)
=> 34 78165293 ada1 GPT (37G)
34 128 1 (null) (64k)
162 2097152 2 swap1 (1.0G)
2097314 76068013 3 disk1 (36G)
=> 34 80293181 ada2 GPT (38G)
34 128 1 (null) (64k)
162 2097152 2 swap2 (1.0G)
2097314 76068013 3 disk2 (36G)
78165327 2127888 - free - (1.0G)
As you see I have ada{0-2}p3 labeled as disk{0-2}
All labeled partitions have valid gpt id but zfs partitions don't have
accesible gpt label in /dev/gpt:
# glabel list
Geom name: ada0p1
Providers:
1. Name: gptid/fe8c7129-bc68-11df-8955-0050dad823cd
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 128
length: 65536
index: 0
Consumers:
1. Name: ada0p1
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
Geom name: ada0p2
Providers:
1. Name: gpt/swap0
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 2097152
length: 1073741824
index: 0
Consumers:
1. Name: ada0p2
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e2
Geom name: ada0p3
Providers:
1. Name: gptid/2ea57c66-bc69-11df-8955-0050dad823cd
Mediasize: 38946822656 (36G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1073824768
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 76068013
length: 38946822656
index: 0
Consumers:
1. Name: ada0p3
Mediasize: 38946822656 (36G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1073824768
Mode: r1w1e2
Geom name: ada1p1
Providers:
1. Name: gptid/060c432a-6852-11df-a16c-0050dad823cd
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 128
length: 65536
index: 0
Consumers:
1. Name: ada1p1
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
Geom name: ada1p2
Providers:
1. Name: gpt/swap1
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 2097152
length: 1073741824
index: 0
Consumers:
1. Name: ada1p2
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e2
Geom name: ada1p3
Providers:
1. Name: gptid/5bc92016-6852-11df-a16c-0050dad823cd
Mediasize: 38946822656 (36G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1073824768
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 76068013
length: 38946822656
index: 0
Consumers:
1. Name: ada1p3
Mediasize: 38946822656 (36G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1073824768
Mode: r1w1e2
Geom name: ada2p1
Providers:
1. Name: gptid/c506cc78-bc3a-11df-8066-0050dad823cd
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 128
length: 65536
index: 0
Consumers:
1. Name: ada2p1
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
Geom name: ada2p2
Providers:
1. Name: gpt/swap2
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 2097152
length: 1073741824
index: 0
Consumers:
1. Name: ada2p2
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e2
Geom name: ada2p3
Providers:
1. Name: gptid/87d467cc-bc3b-11df-8066-0050dad823cd
Mediasize: 38946822656 (36G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1073824768
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 76068013
length: 38946822656
index: 0
Consumers:
1. Name: ada2p3
Mediasize: 38946822656 (36G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1073824768
Mode: r1w1e2
And also:
# ls /dev/gpt
swap0 swap1 swap2
I've enabled kern.geom.label.debug=1 and here's what I got during boot:
# dmesg | grep GEOM_LABEL
GEOM_LABEL[1]: MSDOSFS: ada0: FAT12/16 volume not valid.
GEOM_LABEL[1]: MSDOSFS: ada1: FAT12/16 volume not valid.
GEOM_LABEL[1]: MSDOSFS: ada2: FAT12/16 volume not valid.
GEOM_LABEL[1]: MSDOSFS: ada0p1: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada0p1 is
gptid/fe8c7129-bc68-11df-8955-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada0p2: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada0p2 is gpt/swap0.
GEOM_LABEL[1]: Label for provider ada0p2 is
gptid/0c0b5606-bc69-11df-8955-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada0p3: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada0p3 is gpt/disk0.
GEOM_LABEL[1]: Label for provider ada0p3 is
gptid/2ea57c66-bc69-11df-8955-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada1p1: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada1p1 is
gptid/060c432a-6852-11df-a16c-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada1p2: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada1p2 is gpt/swap1.
GEOM_LABEL[1]: Label for provider ada1p2 is
gptid/303e329f-6852-11df-a16c-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada1p3: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada1p3 is gpt/disk1.
GEOM_LABEL[1]: Label for provider ada1p3 is
gptid/5bc92016-6852-11df-a16c-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada2p1: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada2p1 is
gptid/c506cc78-bc3a-11df-8066-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada2p2: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada2p2 is gpt/swap2.
GEOM_LABEL[1]: Label for provider ada2p2 is
gptid/f5ee2146-bc3a-11df-8066-0050dad823cd.
GEOM_LABEL[1]: MSDOSFS: ada2p3: no FAT signature found.
GEOM_LABEL[1]: Label for provider ada2p3 is gpt/disk2.
GEOM_LABEL[1]: Label for provider ada2p3 is
gptid/87d467cc-bc3b-11df-8066-0050dad823cd.
GEOM_LABEL[1]: Label gptid/0c0b5606-bc69-11df-8955-0050dad823cd removed.
GEOM_LABEL[1]: Label gptid/303e329f-6852-11df-a16c-0050dad823cd removed.
GEOM_LABEL[1]: Label gptid/f5ee2146-bc3a-11df-8066-0050dad823cd removed.
GEOM_LABEL[1]: MSDOSFS: mirror/swap: no FAT signature found.
GEOM_LABEL[1]: Label gpt/disk0 removed.
GEOM_LABEL[1]: Label gpt/disk1 removed.
GEOM_LABEL[1]: Label gpt/disk2 removed.
As you see labels was firstly seen, but removed at the end. I tried to
set blank label and then correct one again, but no luck.
Any ideas what's possibly wrong here?
Problem appeared after my pool was broken and I imported it from some
boot CD to fix this by "import -F".
Now I have unreadable output from zpool commands, like this:
NAME STATE READ
WRITE CKSUM
zroot ONLINE
0 0 0
raidz1-0 ONLINE
0 0 0
gptid/2ea57c66-bc69-11df-8955-0050dad823cd ONLINE
0 0 0
gptid/5bc92016-6852-11df-a16c-0050dad823cd ONLINE
0 0 0
gptid/87d467cc-bc3b-11df-8066-0050dad823cd ONLINE
0 0 0
--
Bartosz Stec
More information about the freebsd-stable
mailing list