Commit Graph

62 Commits (004)

Author SHA1 Message Date
Philippe Seewer 2e6b98c7f6 All module scripts should have a shebang 2009-11-27 14:07:21 +01:00
Harald Hoyer 8bfed103d8 mdraid: do not cleanup on auto assembly with mdadm.conf 2009-10-01 14:46:14 +02:00
Harald Hoyer 7a34efa5c4 md/dm/lvm: install pre-pivot cleanup hooks only if actually needed
- removed dmraid cleanup
- only call lvm cleanup, if no lvm.conf provided
- copy over lvm.conf by default
- add --nolvmconf --lvmconf parameters
2009-09-18 12:20:21 +02:00
Hans de Goede d6a5b04043 Recognize nodmraid and noiswmd kernel cmdline options
Recognize nodmraid and noiswmd kernel cmdline options, for anaconda /
rc.sysinit / mkinitrd compatibility.
2009-09-18 08:58:14 +02:00
Hans de Goede 1de9edc06e Do not stop / start udev exec-queue around "mdadm -As --run"
When assembling containers + embedded arrays from mdadm.conf,
mdadm needs the /dev/md# node for the container to assemble the
arrays within the container. Stopping the udev exec queue, results in
this node not getting created and mdadm failing to online the
arrays within the container.

Not having stop / start udev exec-queue around "mdadm -As --run" should
be safe as the exact same command is run from rc.sysinit without
any queue locking.
2009-09-18 08:15:59 +02:00
Harald Hoyer 0f7e10cef4 mdraid: save state dir for mdmon/mdadm for the real root 2009-09-17 12:13:54 +02:00
Harald Hoyer 24bac034d1 65-md-incremental-imsm.rules: check if md raid is already running 2009-09-16 16:10:09 +02:00
Harald Hoyer 094097fab3 lvm/dm/md: switch from lockfiles to $sys/$devpath/holders/*
This is a more sane solution, than ignoring subsequent "change" events.

The only danger is that we could loop, if a lvm scan triggers a broken
md partition, which triggers a broken PV and so on.

Better fix the scanning tools, not to emit change events for devices,
if no action was taken.
2009-09-16 15:34:13 +02:00
Harald Hoyer 1dd5bc3fba add udevproperty() to dracut-lib and use it
newer versions of udev use --property instead of --env
2009-09-16 10:43:50 +02:00
Harald Hoyer 5c3f5746bb 90mdraid/65-md-incremental-imsm.rules: first set initqueue-finished,
then initqueue-settled

also introduce md_finished.sh to check for all md activity to be settled
2009-09-15 15:00:25 +02:00
Harald Hoyer 99433dd289 90mdraid: only switch mdmon to new root, if an instance is running 2009-09-15 15:00:23 +02:00
Harald Hoyer 2f02ae9d45 mdraid: add rd_NO_MDADMCONF --mdadmconf --nomdadmconf
Copy /etc/mdadm.conf to initramfs (even for non-hostonly) if
mdadmconf="yes" is set in dracut.conf or --mdadmconf is specified on the
dracut command line.

This was done, because there seems _no_ sane way to autoassemble md raid
arrays.

also moved rd_NO_MD to an udev ENV
2009-09-15 15:00:18 +02:00
Harald Hoyer 5a8d8dfbb6 switch modules to initqueue-finished 2009-09-15 11:17:22 +02:00
Harald Hoyer 650da7bada removed initrdargs from parse-*.sh 2009-09-10 17:34:15 +02:00
Harald Hoyer aa297ca6b6 65-md-incremental-imsm.rules: refine rules 2009-09-08 15:33:19 +02:00
Harald Hoyer f25c9697f8 mdraid: stop udev queue until mdraid assembled 2009-09-08 15:30:17 +02:00
Harald Hoyer 3bb5b261c7 65-md-incremental-imsm: add additional check for md-non-containers 2009-09-08 13:42:31 +02:00
Harald Hoyer 273b197d75 added initqueue-settled and refactored code 2009-09-07 19:12:01 +02:00
Harald Hoyer 906dedf4d5 mdraid-cleanup: do not stop mdraid container 2009-09-07 19:12:00 +02:00
Harald Hoyer 587b3497c1 mdraid_start.sh: fixed raid activation 2009-09-07 16:18:12 +02:00
Harald Hoyer e4dec3d6b6 {crypt,dmraid,lvm,mdraid}: cleanup with pre-pivot 30 and 31 2009-09-03 17:11:57 +02:00
Harald Hoyer 429aa1a2c2 mdraid: add grep for convenience 2009-09-03 17:11:03 +02:00
Harald Hoyer 52168b7b9d reordered blkid/vol_id rules 2009-09-02 15:55:34 +02:00
Harald Hoyer 194f7d125f 90*/*cleanup.sh: fixed redirection to /dev/null 2009-09-01 15:59:31 +02:00
Harald Hoyer 780afa9876 release any raid/crypt/lvm device assembled, but not in use 2009-09-01 15:51:51 +02:00
Harald Hoyer ec74fa8789 split dracut in network / non-network 2009-09-01 15:42:28 +02:00
Harald Hoyer c1d670a893 65-md-incremental-imsm.rules: also check on "change" 2009-09-01 15:42:27 +02:00
Harald Hoyer f4c36b28f6 mdraid_start: check if raid is already active before trying to run it 2009-09-01 15:42:27 +02:00
Victor Lowther 59c88f499f Abstract out vol_id vs. blkid usage
Since different distros may or may not use vol_id in udev, and blkid
is generally replacing vol_id, abstract them out into a function which
tries to use vol_id first and blkid second, on the assumption that
blkid can take over for vol_id if vol_id is no longer there.
2009-08-19 22:21:07 -05:00
Victor Lowther 7e2b4f8367 Make mdraid checking use common functionality in dracut-functions 2009-08-16 15:29:59 -05:00
Victor Lowther 62bde8ed7e make mdraid check script really check to see of the rootfs is on an
mdraid block device when run in hostonly mode.
2009-08-16 15:29:27 -05:00
Harald Hoyer 345f573546 90mdraid/parse-md.sh: removed bashism 2009-08-04 11:36:06 +02:00
Harald Hoyer 0e77eb3782 dmraid/mdraid: only try to delete partition 1-1024
add "--nr 1-1024" to partx, otherwise partx will try to delete
partitions 1-INT_MAX, which takes a long time.
2009-07-23 11:58:24 +02:00
Harald Hoyer 33ee031c4a dracut: add --kernel-only and --no-kernel arguments
--kernel-only
              only install kernel drivers and firmware files

       --no-kernel
              do not install kernel drivers and firmware files

All kernel module related install commands moved from "install"
to "installkernel".

For "--kernel-only" all installkernel scripts of the specified
modules are used, regardless of any checks, so that all modules
which might be needed by any dracut generic image are in.

The basic idea is to create two images. One image with the kernel
modules and one without. So if the kernel changes, you only have
to replace one image.

Grub and the kernel can handle multiple images, so grub entry can
look like this:

title Fedora (2.6.29.5-191.fc11.i586)
        root (hd0,0)
        kernel /vmlinuz-2.6.29.5-191.fc11.i586 ro rhgb quiet
        initrd /initrd-20090722.img
        initrd /initrd-kernel-2.6.29.5-191.fc11.i586.img
        initrd /initrd-config.img

initrd-20090722.img
  the image provided by the initrd rpm
  one old backup version is kept like with the kernel

initrd-kernel-2.6.29.5-191.fc11.i586.img
  the image provided by the kernel rpm

initrd-config.img
  optional image with local configuration files
2009-07-22 15:07:11 +02:00
Harald Hoyer 308b10311c mdraid: first remove the partitions, then add to the md raid 2009-07-21 15:40:11 +02:00
Harald Hoyer 7045d15460 dmraid/mdraid: use ENV{DEVTYPE} instead of ATTR{partition} 2009-07-21 15:01:41 +02:00
Harald Hoyer 57b965ef4b dmraid/mdraid: install "partx" 2009-07-21 11:31:15 +02:00
Harald Hoyer 0de01de409 mdraid: do not handle isw_raid_member if rd_NO_MDIMSM is set in udev ENV
install md-noimsm.sh if mdadm does not support imsm.
2009-07-17 16:00:19 +02:00
Harald Hoyer 499befa692 mdraid: only install mdadm.conf in hostonly mode 2009-07-17 16:00:19 +02:00
Harald Hoyer 435185d7ab mdraid: do not install passwd/group 2009-07-17 16:00:19 +02:00
Harald Hoyer f874872fc2 add command line parameters to specify exact actions for root assembly
LVM
       rd_NO_LVM
              disable LVM detection

       rd_LVM_VG=<volume group name>
              only activate the volume groups with the given name

crypto LUKS
       rd_NO_LUKS
              disable crypto LUKS detection

       rd_LUKS_UUID=<luks uuid>
              only activate the LUKS partitions with the given UUID

MD
       rd_NO_MD
              disable MD RAID detection

       rd_MD_UUID=<md uuid>
              only activate the raid sets with the given UUID

DMRAID
       rd_NO_DM
              disable DM RAID detection

       rd_DM_UUID=<dmraid uuid>
              only activate the raid sets with the given UUID
2009-07-15 18:27:21 +02:00
Harald Hoyer 584e55654c remove partitions from raid devices before they are used for something
else
2009-07-15 18:27:20 +02:00
Hans de Goede 3564cb7c2c Make Intel BIOS raid use mdraid instead of dmraid when mdadm 3.0 is available
Intel BIOS raid is being shifted from dmraid to mdraid because mdraid offers
more features. So if an imsm metadata capable mdadm is present use mdraid
instead of dmraid for isw_raid_member's

This patch also adds code to mdraid_start.sh so that the raidsets
inside the imsm containers get started once udev is done probing
(doing this earlier leads to potentially degraded use of the sets and
 an unwanted resync).
2009-07-15 18:27:20 +02:00
Harald Hoyer 3e26772cde run /bin/sh with the full path from the udev rules 2009-07-14 13:20:34 +02:00
Harald Hoyer b2543662a1 add the final mdraid_start to the "blkid" rules also 2009-07-14 13:17:07 +02:00
Harald Hoyer 3076b67917 run a final "mdadm -IRs" after udev has settled 2009-07-13 18:19:32 +02:00
Harald Hoyer 4286a25041 do not force to run the mdraid array for the incremental add 2009-07-13 16:24:41 +02:00
Harald Hoyer 14940c2a5c fixed typo in mdadm udev rule 2009-07-13 15:03:10 +02:00
Harald Hoyer e60123c2ed removed bash check from md incremental rules 2009-07-13 12:10:46 +02:00
Warren Togami 19c258b689 NFSv4 rpcbind should need only the rpcbind user, not the entire /etc/passwd.
TODO: /etc/passwd and /etc/group are not removed yet due to 90mdraid.
      dledford said he'll go in and clean this up since he has the hardware
      to actually test the mdmon stuff.
2009-07-09 14:33:33 -04:00