From owner-freebsd-geom@FreeBSD.ORG Thu Oct 6 06:56:23 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22629106566B; Thu, 6 Oct 2011 06:56:23 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id D5A978FC13; Thu, 6 Oct 2011 06:56:22 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:b9fd:2f11:cd06:1a6]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id AECE54AC32; Thu, 6 Oct 2011 10:47:21 +0400 (MSD) Date: Thu, 6 Oct 2011 10:47:12 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <592430497.20111006104712@serebryakov.spb.ru> To: John-Mark Gurney In-Reply-To: <20111005225353.GG14645@funkthat.com> References: <1927112464.20111004220507@serebryakov.spb.ru> <4E8BE604.7090803@yandex.ru> <1822051193.20111005102710@serebryakov.spb.ru> <1239869336.20111005103945@serebryakov.spb.ru> <4E8C0C88.7000702@yandex.ru> <813229977.20111005125104@serebryakov.spb.ru> <20111005225353.GG14645@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: "Andrey V. Elsukov" , current@freebsd.org, freebsd-geom@freebsd.org Subject: Re: RFC: Project geom-events X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2011 06:56:23 -0000 Hello, John-Mark. You wrote 6 =EE=EA=F2=FF=E1=F0=FF 2011 =E3., 2:53:53: >> gmirror0 >> gstripe0 >> ada0 >> ada1 >> gstripe1 >> ada2 >> ada3 >>=20 >> and administrator kills gstripe0, for example, geom_mirror will send >> event, because from its point of view it is not administrative >> action... >> But such situations, IMHO, are not very often ones. > Won't gmirror still report COMPLETE after a gmirror remove? So the I say "kill gstripe0", not "Remove gstripe0 from gmirror0", it is different situations. gmirror0 will be DEGRADED after this action, but will send DISCONNECT message with "fixable" state and it is state when geom-events(8) try to find replacement (spare). Exactly as when it lost component due to accident. If you say "gmirror remove", yes, it will be COMPLETE after it. > script can look at the gmirror device, and see that it is still > complete even though one of the providers were dropped and assume > it was an administrative command that did it.. Here is one problem: there is no STANDARD way to understand state of provider from userland, as it is GEOM-specific. "g${class} status ${geom}"= prints almost free-form information. Not all classes names it "COMPLETE", and some classes (geom_raid, for example) could have many providers and many states, which adds complexity. So, to make it work this way I need to add knowledge about all classes and their output formats to geom-ecents(8). I don't think, that it is good design -- it is bad idea to put knowledge about GEOM classes in two places -- class itself and some script. It will hard to synchronize, etc. So, I think, GEOM class itself should decide and report its state in standard way. --=20 // Black Lion AKA Lev Serebryakov