# Release 9 mirror: 1 drive has a bad label



## gjpc (Mar 7, 2012)

I am doing a fresh install of freeBSD FreeBSD 9.0 and have a problem with booting my mirrored volume. The /dev/ada1 disk boots,  but the loader reports /dev/ada0 has a bad label:

```
disk0: BIOS drive C:
    ffs bad disk label
DISK1: bios DRIVE D:
    (all the partitions are listed properly)
```
How can I fix the label on /dev/ada0?

Here is the output of the glabel list:

```
glabel list          
Geom name: ada0p1
Providers:
1. Name: gptid/67b84d17-6869-11e1-8133-14dae971c26e
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 128
   length: 65536
   index: 0
Consumers:
1. Name: ada0p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0

Geom name: ada1p1
Providers:
1. Name: gptid/e28f1cfa-6880-11e1-8140-14dae971c26e
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 128
   length: 65536
   index: 0
Consumers:
1. Name: ada1p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
```

Here is the gpart:

```
gpart list
last: 1953525134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: 67b84d17-6869-11e1-8133-14dae971c26e
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 167
   start: 40
2. Name: ada0p2
   Mediasize: 991063703552 (923G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: aefaef11-6869-11e1-8133-14dae971c26e
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 991063703552
   offset: 86016
   type: freebsd-ufs
   index: 2
   end: 1935671463
   start: 168
3. Name: ada0p3
   Mediasize: 9140436992 (8.5G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: bb9530eb-6869-11e1-8133-14dae971c26e
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 9140436992
   offset: 991063789568
   type: freebsd-swap
   index: 3
   end: 1953523879
   start: 1935671464
Consumers:
1. Name: ada0
   Mediasize: 1000204886016 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e4

Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 1953525134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada1p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: e28f1cfa-6880-11e1-8140-14dae971c26e
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 167
   start: 40
2. Name: ada1p2
   Mediasize: 991063703552 (923G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: e2b12226-6880-11e1-8140-14dae971c26e
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 991063703552
   offset: 86016
   type: freebsd-ufs
   index: 2
   end: 1935671463
   start: 168
3. Name: ada1p3
   Mediasize: 9140436992 (8.5G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: e2b732c6-6880-11e1-8140-14dae971c26e
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 9140436992
   offset: 991063789568
   type: freebsd-swap
   index: 3
   end: 1953523879
   start: 1935671464
Consumers:
1. Name: ada1
   Mediasize: 1000204886016 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e4
```

The mirror is working:

```
gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ada0p2 (ACTIVE)
                       ada1p2 (ACTIVE)
mirror/swap  COMPLETE  ada0p3 (ACTIVE)
                       ada1p3 (ACTIVE)
```
`uname -a`

```
FreeBSD cserve 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     
[email]root@farrell.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## gjpc (Mar 10, 2012)

Solved: http://blather.michaelwlucas.com/archives/1071

pay attention to Deepak Padliya's comments


----------



## wblock@ (Mar 10, 2012)

Well...

```
[del]kern.geom.debugflags=17[/del]
```
Don't do that.  Certainly don't put it in /etc/sysctl.conf, and better to never do it at all.  It's only needed if you are changing the geom on a mounted partition.  As you might expect, that's a dangerous situation to be avoided.


```
kern.geom.part.check_integrity=0
```
This is a workaround, turning off the safety check.  It's in the release notes.  If your system needs it to boot, it means there is something wrong with the partition layout, and a full backup, repartition, and restore is a good idea.


----------

