From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott James Remnant Date: Thu, 03 Jul 2008 16:29:52 +0000 Subject: Re: triggering udev rules based on the state of udevd Message-Id: <1215102592.6739.25.camel@quest> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-X+B2iqjgwZXfdDia8/Qd" List-Id: References: <20080702151527.GA22892@nostromo.devel.redhat.com> In-Reply-To: <20080702151527.GA22892@nostromo.devel.redhat.com> To: linux-hotplug@vger.kernel.org --=-X+B2iqjgwZXfdDia8/Qd Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2008-07-02 at 11:15 -0400, Bill Nottingham wrote: > When using udev to automatically assemble MD devices (using mdadm --incre= mental), > we've come across the following conundrum: >=20 > - If you just pass --incremental to mdadm, devices will only be started w= hen all > members are present; you can never start a degraded device) >=20 > - If you pass --run (to solve this), devices will be started when the min= imum > # of devices is present. This causes the array to always start in degra= ded > mode, causing unnecessary resyncs. >=20 > There doesn't seem to be a good happy medium that allows for degraded ass= embly > when needed, but normal assembly in most cases. >=20 Surely only the user knows whether to start degraded or not? Our approach is to incrementally assemble raid arrays through udev, and after a timeout, if any raid we're expecting to be able to mount is not ready, ask the user what they want to do about it. "RAID-1 device for /home is missing a volume. Please ensure this volume is connected, or press ENTER to use the device in a degraded mode." Obvious advantage here is that we haven't given up, if the user realises the cable is hanging out, they can plug it in and the message will go away and the boot continues. If they start in degraded mode, the RAID members remember that and the next time you use --incremental, it'll start anyway. (fwict) Scott --=20 Scott James Remnant scott@canonical.com --=-X+B2iqjgwZXfdDia8/Qd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIbP6ASnQiFMl4yK4RAkSEAJ9IxonIYO5dteeuHZfR9NFS4LgktACfZXpZ tPSu1Ra4DjSbjGceYsotJRQ= =aNNk -----END PGP SIGNATURE----- --=-X+B2iqjgwZXfdDia8/Qd--