Commit Graph

57 Commits (0edcf5fa8b7de4b8f39801d636c36d672e94fbde)

Author SHA1 Message Date
Harald Hoyer bad6113059 lvm/dmraid: make LIBDIR depend on the binary 2009-11-25 20:08:22 +01:00
Yanko Kaneti 9e7ac6982a Wildcards need dracut_install 2009-11-25 19:55:17 +01:00
Harald Hoyer 15c82415c2 90dmraid,90lvm: device mapper upstream rules got renamed 2009-10-27 16:02:56 +01:00
Philippe Seewer 41f8a4f14f Add dm_mod loader
Some kernel configurations might build base dm support as a module.
Add module dm which ensures that dm_mod is there and loaded.
2009-10-27 16:02:56 +01:00
Harald Hoyer 67307075d1 dmraid: only install libdmraid-events-isw.so
the symlink will trigger install of the real lib file
2009-10-09 13:16:02 +02:00
Harald Hoyer 4d9b6060d4 dmraid: do not fail if /usr/lib/libdmraid-events-isw.so is not present 2009-10-09 10:16:08 +02:00
Harald Hoyer 99fd62e3be dm/lvm: make usage of new udev event rules optionally 2009-09-29 18:29:34 +02:00
Harald Hoyer 678b3605e8 dmraid: add missing dso 2009-09-23 17:16:31 -07:00
Harald Hoyer b9c4654a63 devicemapper: add dmeventd and new rules for device mapper 2009-09-23 16:52:14 -07: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
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 597839331c dmraid: use and install kpartx for dmraids 2009-09-16 11:21:24 +02:00
Hans de Goede 26b72485cf 90dmraid: use kpartx to scan for partitions 2009-09-16 11:20:57 +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 33ff830c1b 90dmraid: switch rd_NO_DM to udev ENV 2009-09-15 11:17:27 +02:00
Harald Hoyer 1aca526cb4 90dmraid: install parse-dm.sh 2009-09-14 16:47:30 +02:00
Harald Hoyer 650da7bada removed initrdargs from parse-*.sh 2009-09-10 17:34:15 +02:00
Harald Hoyer 7e282f5df1 dmraid: only install 64-md-raid.rules if no vol_id present 2009-09-08 15:29:30 +02:00
Harald Hoyer 273b197d75 added initqueue-settled and refactored code 2009-09-07 19:12:01 +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 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 5c6a593f2e add udevsettle function and settle after raid/lvm/crypto activities 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 bc9ae19deb Make dmraid checking use common functionality in dracut-functions 2009-08-16 15:29:50 -05:00
Victor Lowther dc670134f8 Make hostonly check for dmraid only pass if root is really on
a dmraid volume somehow.
2009-08-16 15:29:18 -05: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 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 e0fd2e2f74 dmraid: handle isw_raid_member if rd_NO_MDIMSM is set in udev ENV 2009-07-17 16:00:19 +02:00
Harald Hoyer 024cd021d4 dmraid: redirect error to vinfo 2009-07-17 16:00:19 +02:00
Harald Hoyer 87194701de output info on rd_NO_DM 2009-07-17 16:00:19 +02:00
Harald Hoyer 4f945a3932 dmraid.sh: activate all dmraids, if no rd_DM_UUID is specified 2009-07-17 10:16:46 +02:00
Harald Hoyer 20cfd14f41 dmraid.rules: cleanup 2009-07-17 10:16:16 +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
Harald Hoyer dd1f72b3dd dmraid.rules changed comment in header 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 21e033f8ef prevent LVM scan loops
lvm vgscan causes "change" events for all devices, to prevent a loop,
remember the devices, which trigger the scan of the devices.
2009-07-13 18:19:09 +02:00
Harald Hoyer c81a97d1a7 install "ln" per default 2009-07-13 16:24:41 +02:00
Harald Hoyer 9a139a430a let softlink to dmraid initqueue scan end with ".sh" 2009-07-13 16:24:41 +02:00
Harald Hoyer 2a652c0b95 add environment variables for different udev versions 2009-07-13 15:03:11 +02:00
Harald Hoyer 4d06c74ea6 only install one dmraid scan job once in the initqueue 2009-07-13 12:10:47 +02:00
Harald Hoyer d72eec354a test for empty udev queue with timeout=1 instead of 0
older udev versions do not support timeout=0
2009-07-13 12:10:47 +02:00
Harald Hoyer 58dbb43eac initqueue now loops until /dev/root exists or root is mounted
init now has the following points to inject scripts:

/cmdline/*.sh
   scripts for command line parsing

/pre-udev/*.sh
   scripts to run before udev is started

/pre-trigger/*.sh
   scripts to run before the main udev trigger is pulled

/initqueue/*.sh
   runs in parallel to the udev trigger
   Udev events can add scripts here with /sbin/initqueue.
   If /sbin/initqueue is called with the "--onetime" option, the script
   will be removed after it was run.
   If /initqueue/work is created and udev >= 143 then this loop can
   process the jobs in parallel to the udevtrigger.
   If the udev queue is empty and no root device is found or no root
   filesystem was mounted, the user will be dropped to a shell after
   a timeout.
   Scripts can remove themselves from the initqueue by "rm $job".

/pre-mount/*.sh
   scripts to run before the root filesystem is mounted
   NFS is an exception, because it has no device node to be created
   and mounts in the udev events

/mount/*.sh
   scripts to mount the root filesystem
   NFS is an exception, because it has no device node to be created
   and mounts in the udev events
   If the udev queue is empty and no root device is found or no root
   filesystem was mounted, the user will be dropped to a shell after
   a timeout.

/pre-pivot/*.sh
   scripts to run before the real init is executed and the initramfs
   disappears
   All processes started before should be killed here.

The behaviour of the dmraid module demonstrates how to use the new
mechanism. If it detects a device which is part of a raidmember from a
udev rule, it installs a job to scan for dmraid devices, if the udev
queue is empty. After a scan, it removes itsself from the queue.
2009-07-03 18:11:38 +02:00
Harald Hoyer e7170fb717 let dmraid remove the used partitions 2009-07-01 10:53:02 +02:00
Harald Hoyer b006ff9930 removed shebang from .sh and changed mode to 0644 2009-06-19 13:00:09 +02:00
Victor Lowther 66ac3cd1f0 Update check scripts in modules to make them work again.
Also got rid of "dracutmodules=hostonly".  We have --hostonly, and it
does the same thing.
2009-05-29 23:07:15 -05:00