FS#33166 - [dmraid] dm devices created early not mounted by systemd
Attached to Project:
Arch Linux
Opened by ilya (leniviy) - Saturday, 22 December 2012, 15:57 GMT
Last edited by Dave Reisner (falconindy) - Friday, 28 December 2012, 19:27 GMT
Opened by ilya (leniviy) - Saturday, 22 December 2012, 15:57 GMT
Last edited by Dave Reisner (falconindy) - Friday, 28 December 2012, 19:27 GMT
|
Details
Description:
see https://bbs.archlinux.org/viewtopic.php?pid=1208876 at boot: - initcpio dmraid hook executed - "add" udev event generated - 10-dm.rules marks the device as inactive - "change" udev event generated - 10-dm.rules marks the device as active - root FS mounted - initcpio udev cleanup hook cleans the udev database, including the dm devices - systemd started - "add" udev event generated - 10-dm.rules marks the device as inactive - 99-systemd.rules marks the device as unplugged - "Timed out waiting for device" occur - Dependencies for mount points fail Solution: --- /root/10-dm.rules 2012-12-22 15:56:22.541750428 +0000 +++ /usr/lib/udev/rules.d/10-dm.rules 2012-12-22 15:33:05.966246947 +0000 @@ -32,6 +32,8 @@ # is not recommended. ACTION!="add|change", GOTO="dm_end" +OPTIONS+="db_persist" + # Decode udev control flags and set environment variables appropriately. # These flags are encoded in DM_COOKIE variable that was introduced in # kernel version 2.6.31. Therefore, we can use this feature with Additional info: * package version(s) systemd 196-2 device-mapper 2.02.98-1 * config and/or log files etc. Steps to reproduce: either download the virtualbox image https://docs.google.com/open?id=0B40Hp1Tx6I6eQVJWYWZUQ21xZk0 or install Arch on a fake raid. |
This task depends upon
Closed by Dave Reisner (falconindy)
Friday, 28 December 2012, 19:27 GMT
Reason for closing: Fixed
Additional comments about closing: dmraid-1.0.0.rc16.3-8
Friday, 28 December 2012, 19:27 GMT
Reason for closing: Fixed
Additional comments about closing: dmraid-1.0.0.rc16.3-8
This isn't the right place to be adding the db_persist option. We don't care about db_persist in later userspace -- it's strictly a hack to placate broken drivers which need to store state in udev's DB.
Please add the following to /lib/initcpio/install/dmraid:
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
Regenerate your initramfs, and reboot.
> Purge every last trace of dmraid from your system, add mdadm_udev and shutdown hooks to your initramfs, and also add 'mdmon' to BINARIES= in /etc/mkinitcpio.conf. Regenerate your initramfs.
Apparently, that's not enough. I'm kicked to recovery console at boot.
/dev/disk/by-*/ contains symlinks to /dev/sdb1 - one of the disks in the array.
...
no RAID superblock on /dev/sdc
...
no RAID superblock on /dev/sdb
edit: manual assembly isn't needed. It all gets thrown together by udev. Please post the full output from mdadm if you need further help.
dmraid --format isw --create foobar --type 0 --disk /dev/sdb,/dev/sdc
The RAID on the real machine was created with the BIOS utility.
> add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
This worked. I guess, adding "lvm2" will help too, because its hook contains this command