Bug 215119 - gmirror stop not possible when labels present
Summary: gmirror stop not possible when labels present
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-07 14:11 UTC by Poul-Henning Kamp
Modified: 2017-01-11 21:46 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Poul-Henning Kamp freebsd_committer freebsd_triage 2016-12-07 14:11:48 UTC
I have mirrored two disks which present their hw-serial numbers as diskid labels.

When I stop this mirror, it is immediately picked up again via the labels.

When I stop that instance of the mirror, it is immediately picked up via the main providers:

        root@hex:/ # gmirror status
             Name    Status  Components
        mirror/m2  COMPLETE  ada4 (ACTIVE)
                             ada6 (ACTIVE)
        root@hex:/ # gmirror stop m2
        root@hex:/ # gmirror status
             Name    Status  Components
        mirror/m2  COMPLETE  diskid/DISK-9XF0GDQ7 (ACTIVE)
                             diskid/DISK-9SP13XMP (ACTIVE)
        root@hex:/ # gmirror stop m2
        root@hex:/ # gmirror status
             Name    Status  Components
        mirror/m2  COMPLETE  ada4 (ACTIVE)
                             ada6 (ACTIVE)

Workaround: `gmirror configure -h m2` configures the provider name in the gmirror metadata and prevents this.
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2016-12-07 18:36:05 UTC
(In reply to Poul-Henning Kamp from comment #0)
> I have mirrored two disks which present their hw-serial numbers as diskid
> labels.
> 
> When I stop this mirror, it is immediately picked up again via the labels.
> 
> When I stop that instance of the mirror, it is immediately picked up via the
> main providers:

Yeah, someone has designed this automatic tasting and called this as feature :)

> Workaround: `gmirror configure -h m2` configures the provider name in the
> gmirror metadata and prevents this.

Also you can use `gmirror destroy` or just disable unneeded/unused glabel types.
Comment 2 Miroslav Lachman 2016-12-11 15:43:37 UTC
I met this many years ago and it was really annoying "feature". I think this problem exist with gjournal too.
It would be really nice if this auto-tasting can be disabled by some sysctl.

I stopped using labels because of this feature/bug.