Date: Mon, 30 Jan 2017 18:06:05 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-geom@FreeBSD.org Subject: Re: gmirror and a flaky member Message-ID: <d807d1f8-8ee9-68ff-4e85-2ce61adc6a1f@FreeBSD.org> In-Reply-To: <586FB32D.7050902@quip.cz> References: <7e4164bd-9804-02d5-5990-bc15354989e9@FreeBSD.org> <77c40117-35ab-2430-07f8-e1df6b87fe1c@FreeBSD.org> <586FB32D.7050902@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/01/2017 17:09, Miroslav Lachman wrote: > Andriy Gapon wrote on 2017/01/06 11:12: >> On 06/01/2017 11:54, Andriy Gapon wrote: >>> >>> Can a geom mirror handle a member that gets disconnected and then reappears >>> again? >>> >>> What I am seeing right now is that the mirror does not pick up the member when >>> it reappears. I have to add it back manually. > > It is intentional to mark disappeared device as broken. > If you want to remove working device from gmirror, you must use gmirror remove > command (or gmirror deactivate). > >> To add more substance, here is what gets logged when the disk disappears: >> >> GEOM_MIRROR: Request failed (error=6). ada0p2[READ(offset=2517700608, >> length=4096)] >> GEOM_MIRROR: Device swap: provider ada0p2 disconnected. >> >> And here's what gets logged when the disk reappears: >> GEOM_MIRROR: Component ada0p2 (device swap) broken, skipping. >> GEOM_MIRROR: Cannot add disk ada0p2 to swap (error=22). > > Was the disk removed by user or was it by some bad event? The latter. I suspect some problem with an SSD's controller or firmware. Basically, the disk disappeared and then re-appeared half a minute later. > >>> Even worse, the commands I have >>> to execute are: >>> $ gmirror forget ... >>> $ gmirror insert ... >>> >>> This does not appear to be a graceful way of reactivating the member. > > You can re-activate only member which was correctly deactivated. Not one yanked > out without any "graceful" command. I see. > And as gmirror doesn't work as ZFS mirror (cannot do resilver) the re-added > device is always fully rebuilt. Indeed. But it would be nice if gmirror was able to handle my situation automatically: - when a disk disappears, mark it broken (missing to be more precise) - when it re-appears, rebuild it and add back to the mirror It seems that the main problem at the moment is that gmirror doesn't distinguish between a disk getting many errors (e.g. disk going bad) and a disk disappearing (maybe permanently, maybe temporarily). But I could be mistaken about this. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d807d1f8-8ee9-68ff-4e85-2ce61adc6a1f>