# Strange display devices in the zpool mirror



## Violator (Sep 2, 2012)

Zpool mirror was created from ada2p3 Ð¸ ada3p3, but after some action there is only one gptid/rawuuid1:

```
zpool status -v tank
  pool: tank
 state: ONLINE
 scan: scrub repaired 0 in 0h21m with 0 errors on Fri Aug 31 05:12:13 2012
config:

        NAME                                          STATE     READ WRITE CKSUM
        tank                                          ONLINE       0     0     0
          gptid/f901ba83-eb4b-11e1-b499-10bf48d7f3f6  ONLINE       0     0     0
```

Where gptid/f901ba83-eb4b-11e1-b499-10bf48d7f3f6 is ada2p3 :

```
# gpart list
Geom name: ada2
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 5860533134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada2p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   rawuuid: f8f174c9-eb4b-11e1-b499-10bf48d7f3f6
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 1048576
   type: freebsd-boot
   index: 1
   end: 2175
   start: 2048
2. Name: ada2p2
   Mediasize: 17179869184 (16G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1114112
   Mode: r1w1e1
   rawuuid: f8fca44d-eb4b-11e1-b499-10bf48d7f3f6
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 17179869184
   offset: 1114112
   type: freebsd-swap
   index: 2
   end: 33556607
   start: 2176
3. Name: ada2p3
   Mediasize: 2982853656064 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1114112
   Mode: r1w1e2
   rawuuid: f901ba83-eb4b-11e1-b499-10bf48d7f3f6
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 2982853656064
   offset: 17180983296
   type: freebsd-zfs
   index: 3
   end: 5859442654
   start: 33556608
Consumers:
1. Name: ada2
   Mediasize: 3000592982016 (2.7T)
   Sectorsize: 512
   Mode: r2w2e5

Geom name: ada3
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 5860533134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada3p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   rawuuid: f8f174c9-eb4b-11e1-b499-10bf48d7f3f6
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 1048576
   type: freebsd-boot
   index: 1
   end: 2175
   start: 2048
2. Name: ada3p2
   Mediasize: 17179869184 (16G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1114112
   Mode: r0w0e0
   rawuuid: f8fca44d-eb4b-11e1-b499-10bf48d7f3f6
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 17179869184
   offset: 1114112
   type: freebsd-swap
   index: 2
   end: 33556607
   start: 2176
3. Name: ada3p3
   Mediasize: 2982853656064 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1114112
   Mode: r0w0e0
   rawuuid: f901ba83-eb4b-11e1-b499-10bf48d7f3f6
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 2982853656064
   offset: 17180983296
   type: freebsd-zfs
   index: 3
   end: 5859442654
   start: 33556608
Consumers:
1. Name: ada3
   Mediasize: 3000592982016 (2.7T)
   Sectorsize: 512
   Mode: r0w0e0
```
I tried:

```
# zpool attach tank ada2p3 ada3p3
invalid vdev specification
use '-f' to override the following errors:
/dev/ada3p3 is part of active pool 'tank'

# zpool attach tank ada3p3 ada2p3
invalid vdev specification
use '-f' to override the following errors:
/dev/ada2p3 is part of active pool 'tank'

# zpool detach tank /dev/ada3p3
cannot detach /dev/ada3p3: no such device in pool
```

Same results if i write gptid/rawuuid instead of /dev/adaXp3
So zpool thinks ada2p3 ada3p3 is in pool , but cannot detach.

I want to see somethin like this:


```
# zpool status
  pool: tank
 state: ONLINE
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          [B]mirror    [/B]ONLINE       0     0     0
            [B]ada2p3   [/B]ONLINE       0     0     0
            [B]ada3p3   [/B]ONLINE       0     0     0

errors: No known data errors
```

"zpool scrub" is not helps


----------



## Violator (Sep 2, 2012)

I noticed what rawuuid of ad2p3 and ad3p3 the same (f901ba83-eb4b-11e1-b499-10bf48d7f3f6). How it is possible?


----------



## phoenix (Sep 2, 2012)

Add the following to /boot/loader.conf:

```
kern.geom.label.gptid.enable="0"                # Disable the auto-generated GPT UUIDs for disks                                                             
kern.geom.label.ufsid.enable="0"                # Disable the auto-generated UFS UUIDs for filesystems
```

Then reboot.


----------

