Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508686 - systemd fails to start with lvm ater boot from initramfs with separate /usr partition
Summary: systemd fails to start with lvm ater boot from initramfs with separate /usr p...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-25 14:47 UTC by Piergiorgio Beruto
Modified: 2014-05-30 16:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piergiorgio Beruto 2014-04-25 14:47:53 UTC
Hello,
I'm running gentoo/amd64 on an intel core i7 machine and two sata HDD.

I have the following disk layout:

/boot --> plain raid 1 partition
/     --> lvm2 logical volume inside the raid 1 partition
/home --> lvm2 logical volume inside the raid 1 partition
/usr  --> lvm2 logical volume inside the raid 0 partition
/tmp  --> lvm2 logical volume inside the raid 0 partition
/var  --> lvm2 logical volume inside the raid 0 partition
/var/tmp  --> lvm2 logical volume inside the raid 0 partition
/opt  --> lvm2 logical volume inside the raid 0 partition
/usr/portage  --> lvm2 logical volume inside the raid 0 partition

So this is the content of my fstab:
/dev/md125           /boot           ext2            defaults,noauto         1 2
/dev/safe/root       /               ext4            noatime                 0 1
/dev/sda2            none            swap            sw,pri=1                0 0
/dev/sdb2            none            swap            sw,pri=1                0 0
/dev/safe/home       /home           ext4            noatime                 1 2
/dev/fast/usr        /usr            ext4            noatime                 0 1
/dev/fast/opt        /opt            ext4            noatime                 1 2
/dev/fast/portage    /usr/portage    reiserfs        rw                      1 2
/dev/fast/var        /var            ext4            noatime                 1 2
/dev/fast/var_tmp    /var/tmp        ext2            defaults,noatime        1 2
/dev/fast/tmp        /tmp            ext2            defaults,noatime        1 2
/dev/cdrom           /mnt/cdrom      auto            noauto,ro,user          0 0

I'm booting using grub2 and initramfs generated by genkernel.
I added to kernel comamnd line "domdadm dolvm" options.

After the initramfs launches "init", which in my case is systemd, the boot process stops after launching a few services, including mdadm and lvm, and waits  for all the mountpoints to be "ready" except for / and /usr (which are mounted by the initramfs in r-o) until a timeout of ~1min occurs.

At this point the system drops me in a recovery shell, the journalctrl doesn't show any error besides the above timeout.

at that point if i just perform a "mount -a" command and "systemd default" command the system boots OK.

This behavior is systematic.

I've also tried to tell initramfs to mount everything (writing to /etc/initramfs.mounts) and in such case the systems boots but it's not usable since all the lvm volumes are mounted r-o by the initramfs and won't be remounted in r-w.

reverting to OpenRC "fixes" the problem with the very same kernel/initramfs, so I think it must be something wrong with systemd configuration but I'm very new to it and don't really know where to start to debug the problem.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-25 14:56:21 UTC

*** This bug has been marked as a duplicate of bug 508678 ***
Comment 2 Mike Gilbert gentoo-dev 2014-04-26 13:07:15 UTC
This one seems to be a different problem from bugs 508678 and 479730; I suspect this bug occurs after working around those bugs.

Reopening.
Comment 3 Pacho Ramos gentoo-dev 2014-04-26 17:49:36 UTC
Are you using genkernel or genkernel-next? Only the latest is prepared for systemd
Comment 4 Piergiorgio Beruto 2014-04-27 20:38:22 UTC
I've tried both but the result is the same fot the sake of this problem.
In the end I used plain genkernel as genkernel-next had too many problems for my configuration.

With genkernel I managed to have a working system by just patching the linuxrc script removing the check of "init" before mounting /usr.
Comment 5 Alexander Tsoy 2014-05-30 16:08:58 UTC
This is probably a duplicate of bug 424637