From: Doug Ledford <dledford@redhat.com>
To: Linux RAID Mailing List <linux-raid@vger.kernel.org>,
Neil Brown <neilb@suse.de>,
Dan Williams <dan.j.williams@intel.com>
Subject: mdadm udev rules file just for incremental assembly/disassembly
Date: Tue, 06 Apr 2010 23:13:30 -0400 [thread overview]
Message-ID: <4BBBF85A.6030801@redhat.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1461 bytes --]
I actually don't keep the rules all in one file in Fedora, I have the
udev supplied 64-md-raid.rules file that I don't control and that has
the majority of stuff in it, but none of the incremental assembly stuff.
Then I have a separate 65-md-incremental.rules file that is part of the
mdadm package and I therefore have direct control over. That allows me
to turn incremental assembly on and off as I see fit without having to
bother the udev package maintainer. So, just so you can see how I'm
doing things now that works with dracut, that honors whether or not the
system is set up to use mdadm or dmraid to handle imsm devices, and see
how both incremental assembly and disassembly of devices, and the rule
to handle incremental assembly of containers in a post-initramfs
environment looks like, here it is.
I should note that this is all tested and working at this point, so on
to the next step. Although I will note that I had to turn down
sync_speed_max on my imsm arrays or a resync would make the system
completely unresponsive until it completed. And I've got at least one
bug to that effect open right now. So, I suspect the kernel is not
honoring the "only use idle time" part of the resync speed description.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #1.2: mdadm.rules --]
[-- Type: text/plain, Size: 1219 bytes --]
# This file causes block devices with Linux RAID (mdadm) signatures to
# automatically cause mdadm to be run.
# See udev(8) for syntax
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -I $tempnode"
SUBSYSTEM=="block", ACTION=="remove", ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -If $env{DEVNAME}"
ENV{rd_NO_MDIMSM}=="?*", GOTO="md_imsm_inc_end"
# In case the initramfs only started some of the arrays in our container,
# run incremental assembly on the container itself. Note: we ran mdadm
# on the container in 64-md-raid.rules, and that's how the MD_LEVEL
# environment variable is already set. If that disappears from the other
# file, we will need to add this line into the middle of the next rule:
# IMPORT{program}="/sbin/mdadm -D --export $tempnode", \
SUBSYSTEM=="block", ACTION=="add|change", KERNEL=="md*", \
ENV{MD_LEVEL}=="container", RUN+="/sbin/mdadm -I $tempnode"
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="isw_raid_member", \
RUN+="/sbin/mdadm -I $tempnode"
SUBSYSTEM=="block", ACTION=="remove", ENV{ID_FS_TYPE}=="isw_raid_member", \
RUN+="/sbin/mdadm -If $env{DEVNAME}"
LABEL="md_imsm_inc_end"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
reply other threads:[~2010-04-07 3:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BBBF85A.6030801@redhat.com \
--to=dledford@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).