I have a system set up with a mirrored ZFS root pool, on top of GPT partitions. I created seperate GPT partitions for swap:
I've been using the two swap partitions as individual swap spaces so far, but now I want to mirror them.
However, I made a mistake in the command to create the mirror, missing out its name. Instead of typing
I typed
I now have a mirror device named /dev/mirror/ada0p2 containing only one provider, /dev/ada1p2.
I want to destroy this device and start over, but no matter what gmirror command I invoke, I just can't get that mirror device to go away.
It appears that each time I try to invoke
it's working, but then it is immediately relaunching the mirror after redetecting the ada1p2 provider, by its gptid instead:
The kernel messages show:
Repeated attempts to stop the mirror just result in it redetecting the ada1p2 provider by alternating between its device name and its gptid and relaunching the mirror.
What's the proper way to resolve this?
Code:
=> 34 488281183 ada0 GPT (232G)
34 94 - free - (47k)
128 128 1 freebsd-boot (64k)
256 8388608 2 freebsd-swap (4.0G)
8388864 479892353 3 freebsd-zfs (228G)
=> 34 488281183 ada1 GPT (232G)
34 94 - free - (47k)
128 128 1 freebsd-boot (64k)
256 8388608 2 freebsd-swap (4.0G)
8388864 479892353 3 freebsd-zfs (228G)
I've been using the two swap partitions as individual swap spaces so far, but now I want to mirror them.
However, I made a mistake in the command to create the mirror, missing out its name. Instead of typing
# gmirror label -b round-robin swap ada0p2 ada1p2
I typed
# gmirror label -b round-robin ada0p2 ada1p2
I now have a mirror device named /dev/mirror/ada0p2 containing only one provider, /dev/ada1p2.
I want to destroy this device and start over, but no matter what gmirror command I invoke, I just can't get that mirror device to go away.
It appears that each time I try to invoke
# gmirror stop ada0p2
it's working, but then it is immediately relaunching the mirror after redetecting the ada1p2 provider, by its gptid instead:
Code:
root@beastie:/root # gmirror status
Name Status Components
mirror/ada0p2 COMPLETE ada1p2 (ACTIVE)
root@beastie:/root # gmirror stop ada0p2
root@beastie:/root # gmirror status
Name Status Components
mirror/ada0p2 COMPLETE gptid/0edb2906-4393-11e2-a1f3-bc305bdab396 (ACTIVE)
Code:
GEOM_MIRROR: Device ada0p2: provider mirror/ada0p2 destroyed.
GEOM_MIRROR: Device ada0p2 destroyed.
GEOM_MIRROR: Device mirror/ada0p2 launched (1/1).
Repeated attempts to stop the mirror just result in it redetecting the ada1p2 provider by alternating between its device name and its gptid and relaunching the mirror.
What's the proper way to resolve this?