Summary: | sys-apps/systemd-224-r1 - swap not activated on boot | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexey Sychev <taviscaron> |
Component: | [OLD] Core system | Assignee: | Gentoo systemd Team <systemd> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | emerge.info.txt |
Description
Alexey Sychev
2015-08-28 11:53:05 UTC
Please attach output of "emerge --info systemd lvm2" so we can see which USE flags you have enabled, kernel version, etc. To summarize the information dump above: the swap device never shows up under /dev/by-label/SWAP, so systemd never sees it and times out after 90 seconds. Created attachment 410540 [details]
emerge.info.txt
emerge --info systemd lvm2 attached
This thread looks relevent. http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/6292 What are you using to generate your initramfs? I use better-initramfs https://bitbucket.org/piotrkarbowski/better-initramfs I have contacted Piotr Karbowski, maintainer of better initramfs, probably he can help. Tomorrow I will try genkernel. Could you give dracut a try, at least as a troubleshooting step? I have no experience with "better-initramfs", and we don't have it packaged on Gentoo. (In reply to Mike Gilbert from comment #2) > To summarize the information dump above: the swap device never shows up > under /dev/by-label/SWAP, so systemd never sees it and times out after 90 > seconds. Seems like the root cause. better-initramfs uses `findfs` to resolve LABEL= to a block device. It does not create /dev/disk/by-label/* nodes at all. By default, if possible, it does mount devtmpfs under /dev, then start lvm. LVM itself is unlikely to do the /dev/disk/by-label/ symlinks, at the end of initramfs's init phase, the /dev is mount-moved to /newroot/dev and switch_root is executed to follow up with the 'real' init system. Back in the days I used udev I remember that udev init script had a trigger that was resulting in creating all the nodes so I did not ever run into such issue. At this moment I run mdev on all my boxes and the mdev init script (from mdev-like-a-boss) does create the /dev/disk/by-*/* symlinks, thus I cannot reproduce this issue. As by default better-initramfs uses devtmpfs and no a mdev as a hotplug agent, meaning creating the by-* symlinks would be a bit tricky, but I could hook it into the findfs thing I think. I will try to address it at initramfs level tomorrow. fwiw unless systemd-udev is supposed to create the symlinks, even when lvm is *already* assembled when systemd starts, this bug should be marked as a not a gentoo issue. Yep, with dracut's initramfs - swap enabled: hpms ~ # tree /dev/disk /dev/disk ├── by-id │ ├── ata-SPCC_Solid_State_Disk_P1501496000000008618 -> ../../sdc │ ├── ata-ST3000DM001-1CH166_Z1F4EYER -> ../../sda │ ├── ata-WDC_WD6400AAKS-00A7B0_WD-WCASY1072633 -> ../../sdb │ ├── dm-name-system-root -> ../../dm-1 │ ├── dm-name-system-swap -> ../../dm-0 │ ├── dm-uuid-LVM-GCxB8wxuSkd0FhD7rT8hm0qfkxXA6c1peGaMerf11YlnjVe384H1y0ND4JGb1gYj -> ../../dm-0 │ ├── dm-uuid-LVM-GCxB8wxuSkd0FhD7rT8hm0qfkxXA6c1pKXbmXQKNQW6HNI5mt6aQpok0pMk3A5tq -> ../../dm-1 │ ├── lvm-pv-uuid-HR7nBe-lioP-dw2H-UaKM-Lp70-xtBk-Lv9yca -> ../../md0 │ ├── lvm-pv-uuid-QSS10X-DJx1-lpMF-bgda-7E3s-xfIw-uOJFpC -> ../../md1 │ ├── lvm-pv-uuid-Y6F8T5-aomu-Vkpr-wWOb-nRiQ-3CAc-svVeLK -> ../../sdc │ ├── md-name-hpsm:0 -> ../../md0 │ ├── md-name-hpsm:1 -> ../../md1 │ ├── md-uuid-3979d882:b00ba19f:a0f21106:27aa71e5 -> ../../md0 │ ├── md-uuid-55bf24bb:28d1377f:90febe71:208b88bf -> ../../md1 │ ├── usb-HP_iLO_Internal_SD-CARD_000002660A01-0:0 -> ../../sdd │ ├── usb-HP_iLO_Internal_SD-CARD_000002660A01-0:0-part1 -> ../../sdd1 │ ├── wwn-0x5000c50065b3a70b -> ../../sda │ └── wwn-0x50014ee2ac535b04 -> ../../sdb ├── by-label │ ├── BOOT -> ../../sdd1 │ ├── ROOT -> ../../dm-1 │ └── SWAP -> ../../dm-0 ├── by-path │ ├── pci-0000:00:1d.0-usb-0:1.3.1:1.0-scsi-0:0:0:0 -> ../../sdd │ └── pci-0000:00:1d.0-usb-0:1.3.1:1.0-scsi-0:0:0:0-part1 -> ../../sdd1 └── by-uuid ├── d9761732-f0f8-46bb-8791-ebc342488ecb -> ../../sdd1 ├── ef485f87-471f-4795-ad12-63e31326d7cd -> ../../dm-0 └── f37f9afe-e484-42b1-aca8-252fe5ffe519 -> ../../dm-1 hpms ~ # free total used free shared buff/cache available Mem: 10205756 49444 10093184 408 63128 10110452 Swap: 4194300 0 4194300 Please, close bug. (In reply to Piotr Karbowski from comment #8) > fwiw unless systemd-udev is supposed to create the symlinks, even when lvm > is *already* assembled when systemd starts, this bug should be marked as a > not a gentoo issue. Rhe /dev/disk/by-label symlinks get created in /lib/udev/13-dm-disk.rules. This rule would only fire when it gets an add or change event for a dm device. If lvm already created the device in the initramfs, this event would never happen. In other words, if udev is not running before you activate lvm, you may have problems. I am not sure what we can do in systemd side then for letting that initram creation tool to work :/ |