cannot stop gmirror on 9.2-RELEASE

Miroslav Lachman 000.fbsd at quip.cz
Fri Nov 22 20:44:22 UTC 2013


Hi all,

I created mirror on top of the partitions on two SSDs.
ada1p2 and ada2p2 are mirrored.
I did this on testing system and then I tried to stop the mirror, so I 
can move the disks from one running system and put them in to the 
another machine.
After I use command "gmirror stop", the mirror is immediately started 
again with GPT names instead of device nodes. After next "gmirror stop", 
the mirror is swapped again - the one with GPT names is stopped and new 
with device names is started.

# gmirror status
            Name    Status  Components
mirror/gm1ssdp2  COMPLETE  ada1p2 (ACTIVE)
                            ada2p2 (ACTIVE)


# gmirror stop -v gm1ssdp2
Done.

# gmirror status
            Name    Status  Components
mirror/gm1ssdp2  COMPLETE  gpt/ssd1db (ACTIVE)
                            gpt/ssd0db (ACTIVE)

# gmirror stop -v gm1ssdp2
Done.


# gmirror status
            Name    Status  Components
mirror/gm1ssdp2  COMPLETE  ada2p2 (ACTIVE)
                            ada1p2 (ACTIVE)


This is how it looks in a log

Nov 22 18:36:19 sm kernel: GEOM_MIRROR: Device gm1ssdp2: provider 
mirror/gm1ssdp2 destroyed.
Nov 22 18:36:19 sm kernel: GEOM_MIRROR: Device gm1ssdp2 destroyed.
Nov 22 18:36:19 sm kernel: GEOM_MIRROR: Device mirror/gm1ssdp2 launched 
(2/2).
Nov 22 18:36:47 sm kernel: GEOM_MIRROR: Device gm1ssdp2: provider 
mirror/gm1ssdp2 destroyed.
Nov 22 18:36:47 sm kernel: GEOM_MIRROR: Device gm1ssdp2 destroyed.
Nov 22 18:36:47 sm kernel: GEOM_MIRROR: Device mirror/gm1ssdp2 launched 
(2/2).
Nov 22 18:37:18 sm kernel: GEOM_MIRROR: Device gm1ssdp2: provider 
mirror/gm1ssdp2 destroyed.
Nov 22 18:37:18 sm kernel: GEOM_MIRROR: Device gm1ssdp2 destroyed.
Nov 22 18:37:18 sm kernel: GEOM_MIRROR: Device mirror/gm1ssdp2 launched 
(2/2).



Is there any way to stop GEOM mirror to re-taste providers and start 
mirror again?



The machine is FreeBSD 9.2-RELEASE amd64 GENERIC

SSDs were partitionad like this:

# gpart create -s gpt ada2

# gpart add -t freebsd-ufs -l ssd1db -a 1m -b 1m -s 100g -i 2 ada2
ada2p2 added

Resulting in

# gpart show -p | sed -n -E '/ada[12]/,/^$/p'
=>       34  250069613    ada1  GPT  (119G)
          34       2014          - free -  (1M)
        2048  209715200  ada1p2  freebsd-ufs  (100G)
   209717248   40352399          - free -  (19G)

=>       34  250069613    ada2  GPT  (119G)
          34       2014          - free -  (1M)
        2048  209715200  ada2p2  freebsd-ufs  (100G)
   209717248   40352399          - free -  (19G)


And then mirror was created

# gmirror label -v -b load gm1ssdp2 ada1p2 ada2p2
Metadata value stored on ada1p2.
Metadata value stored on ada2p2.
Done.

Miroslav Lachman


More information about the freebsd-geom mailing list