Hello all, i used to have disk configured with gpart and gmirror. But with the latest 8.2, my server will not boot anymore if i label the disk with gmirror. Gpart status Name Status Components ad4p1 OK ad4 Then gpart list ad4 Geom name: ad4 state: OK fwheads: 16 fwsectors: 63 last: 488397134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ad4p1 Mediasize: 65536 (64K) Sectorsize: 512 Mode: r0w0e0 rawuuid: 91d53f12-bf3b-11df-a74d-18a905477e61 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 17408 type: freebsd-boot index: 1 end: 161 start: 34 2. Name: ad4p2 Mediasize: 2147483648 (2.0G) Sectorsize: 512 Mode: r1w1e1 rawuuid: b2266ed2-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 2147483648 offset: 82944 type: freebsd-ufs index: 2 end: 4194465 start: 162 3. Name: ad4p3 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Mode: r1w1e0 rawuuid: cf4a2a91-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 4294967296 offset: 2147566592 type: freebsd-swap index: 3 end: 12583073 start: 4194466 4. Name: ad4p4 Mediasize: 21474836480 (20G) Sectorsize: 512 Mode: r1w1e1 rawuuid: d980f19c-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 21474836480 offset: 6442533888 type: freebsd-ufs index: 4 end: 54526113 start: 12583074 5. Name: ad4p5 Mediasize: 10737418240 (10G) Sectorsize: 512 Mode: r1w1e1 rawuuid: e11bebff-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 10737418240 offset: 27917370368 type: freebsd-ufs index: 5 end: 75497633 start: 54526114 6. Name: ad4p6 Mediasize: 211404544512 (197G) Sectorsize: 512 Mode: r1w1e1 rawuuid: e70a8e2a-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 211404544512 offset: 38654788608 type: freebsd-ufs index: 6 end: 488397134 start: 75497634 Consumers: 1. Name: ad4 Mediasize: 250059350016 (233G) Sectorsize: 512 Mode: r5w5e9 Then i do a gmirror label -v -b load gm0 /dev/ad4 Edit /etc/fstab And change /dev/ad4px to /dev/mirror/gm0px I reboot, and it hangs when tring to Mount the root device. I get an error about an corrupt gpt label. I can correct this with the fixit option from the live cd If i do gpart status from the live cd i get Name Status Components ad4p1 CORRUPT ad4 ufsid/4b9545d7d72d5019p1 CORRUPT ufsid/4b9545d7d72d5019 if a do a gpart list from the fixit cd i get Geom name: ad4 state: CORRUPT fwheads: 16 fwsectors: 63 last: 488397134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ad4p1 Mediasize: 65536 (64K) Sectorsize: 512 Mode: r0w0e0 rawuuid: 91d53f12-bf3b-11df-a74d-18a905477e61 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 17408 type: freebsd-boot index: 1 end: 161 start: 34 2. Name: ad4p2 Mediasize: 2147483648 (2.0G) Sectorsize: 512 Mode: r0w0e0 rawuuid: b2266ed2-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 2147483648 offset: 82944 type: freebsd-ufs index: 2 end: 4194465 start: 162 3. Name: ad4p3 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Mode: r0w0e0 rawuuid: cf4a2a91-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 4294967296 offset: 2147566592 type: freebsd-swap index: 3 end: 12583073 start: 4194466 4. Name: ad4p4 Mediasize: 21474836480 (20G) Sectorsize: 512 Mode: r0w0e0 rawuuid: d980f19c-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 21474836480 offset: 6442533888 type: freebsd-ufs index: 4 end: 54526113 start: 12583074 5. Name: ad4p5 Mediasize: 10737418240 (10G) Sectorsize: 512 Mode: r0w0e0 rawuuid: e11bebff-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 10737418240 offset: 27917370368 type: freebsd-ufs index: 5 end: 75497633 start: 54526114 6. Name: ad4p6 Mediasize: 211404544512 (197G) Sectorsize: 512 Mode: r0w0e0 rawuuid: e70a8e2a-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 211404544512 offset: 38654788608 type: freebsd-ufs index: 6 end: 488397134 start: 75497634 Consumers: 1. Name: ad4 Mediasize: 250059350016 (233G) Sectorsize: 512 Mode: r0w0e0 Geom name: ufsid/4b9545d7d72d5019 state: CORRUPT fwheads: 16 fwsectors: 63 last: 488397134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ufsid/4b9545d7d72d5019p1 Mediasize: 65536 (64K) Sectorsize: 512 Mode: r0w0e0 rawuuid: 91d53f12-bf3b-11df-a74d-18a905477e61 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 17408 type: freebsd-boot index: 1 end: 161 start: 34 2. Name: ufsid/4b9545d7d72d5019p2 Mediasize: 2147483648 (2.0G) Sectorsize: 512 Mode: r0w0e0 rawuuid: b2266ed2-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 2147483648 offset: 82944 type: freebsd-ufs index: 2 end: 4194465 start: 162 3. Name: ufsid/4b9545d7d72d5019p3 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Mode: r0w0e0 rawuuid: cf4a2a91-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 4294967296 offset: 2147566592 type: freebsd-swap index: 3 end: 12583073 start: 4194466 4. Name: ufsid/4b9545d7d72d5019p4 Mediasize: 21474836480 (20G) Sectorsize: 512 Mode: r0w0e0 rawuuid: d980f19c-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 21474836480 offset: 6442533888 type: freebsd-ufs index: 4 end: 54526113 start: 12583074 5. Name: ufsid/4b9545d7d72d5019p5 Mediasize: 10737418240 (10G) Sectorsize: 512 Mode: r0w0e0 rawuuid: e11bebff-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 10737418240 offset: 27917370368 type: freebsd-ufs index: 5 end: 75497633 start: 54526114 6. Name: ufsid/4b9545d7d72d5019p6 Mediasize: 211404544512 (197G) Sectorsize: 512 Mode: r0w0e0 rawuuid: e70a8e2a-bf3b-11df-a74d-18a905477e61 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 211404544512 offset: 38654788608 type: freebsd-ufs index: 6 end: 488397134 start: 75497634 Consumers: 1. Name: ufsid/4b9545d7d72d5019 Mediasize: 250059350016 (233G) Sectorsize: 512 Mode: r0w0e0 Then i do gpart recover, edit the fstab file back to /dev/ad4px , and reboot. Then all is fine, but the gmirror Metadata is gone. Regards, Johan Hendriks
On 19/01/2011 12:30, Johan Hendriks wrote:> Hello all, i used to have disk configured with gpart and gmirror. > > > > But with the latest 8.2, my server will not boot anymore if i label the > disk with gmirror. > > > > Gpart status > > Name Status Components > > ad4p1 OK ad4> > Then i do a gmirror label -v -b load gm0 /dev/ad4 > > > Edit /etc/fstab > > And change /dev/ad4px to /dev/mirror/gm0px > > > I reboot, and it hangs when tring to Mount the root device. > > I get an error about an corrupt gpt label.Yes, GPT has the unfortunate property that it records its data both at the beginning of a drive and at the end, so you cannot use it this way (because gmirror wants the last sector for itself). I haven't tried it but I think from the GPT specification that it records where the secondary table is, so maybe you could do it the other way around: first do a gmirror configuration, then create GPT partitions within the gmirror device (i.e. on /dev/mirror/gm0, not on /dev/ad4).