Summary: | =sys-fs/lvm2-2.02.99-r1 - lvm2-activation-early.service fails with systemd | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Mehmet Giritli <mehmet> |
Component: | [OLD] Core system | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | agk, alexander, cardoe, gentoo, gottlieb, leho, lists, systemd |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 478252 | ||
Attachments: |
ls -R /usr/lib/systemd/system
ls -R /etc/systemd/system lvm2-2.02.99-lvm2-activation-net-fix-order.patch |
Description
Mehmet Giritli
2013-08-07 11:43:57 UTC
Are you using systemd-love overlay? Do you have duplicate .service/.socket files from the overlay that would conflict with the ones installed by sys-fs/lvm2 since version 2.02.99-r1? (In reply to Samuli Suominen from comment #1) > Are you using systemd-love overlay? > Do you have duplicate .service/.socket files from the overlay that would > conflict with the ones installed by sys-fs/lvm2 since version 2.02.99-r1? No, I've never used an overlay. This was a system with running lvm and openrc and recently migrated to systemd. In terms of lvm all I did was to update to .99-r1 of lvm2 package. Thats it... But in any case I'm attqaching the output of ls -R /usr/lib/systemd/system Created attachment 355308 [details]
ls -R /usr/lib/systemd/system
Created attachment 355310 [details]
ls -R /etc/systemd/system
Please attach the output of this command journalctl -n 50 -u lvm2-activation-early.service Here is the output: -- Logs begin at Tue 2013-08-13 23:15:04 EEST, end at Thu 2013-08-15 18:12:16 EEST. -- Aug 13 23:15:05 smeagol systemd[1]: Starting Activation of LVM2 logical volumes... Aug 13 23:15:06 smeagol lvm[99]: device-mapper: create ioctl on backup-library failed: Device or resource busy Aug 13 23:15:06 smeagol lvm[99]: 1 logical volume(s) in volume group "backup" now active Aug 13 23:15:06 smeagol lvm[99]: 1 logical volume(s) in volume group "donkey" now active Aug 13 23:15:07 smeagol systemd[1]: lvm2-activation-early.service: main process exited, code=exited, status=5/NOTINSSTALLED Aug 13 23:15:07 smeagol systemd[1]: Failed to start Activation of LVM2 logical volumes. Aug 13 23:15:07 smeagol systemd[1]: Unit lvm2-activation-early.service entered failed state. (In reply to Mehmet Giritli from comment #0) > device-mapper: create ioctl on donkey-downloads failed: Device or resource busy ... > I have 1 vg and 1 lv in it. (In reply to Mehmet Giritli from comment #6) > Aug 13 23:15:06 smeagol lvm[99]: device-mapper: create ioctl on backup-library failed: Device or resource busy > Aug 13 23:15:06 smeagol lvm[99]: 1 logical volume(s) in volume group > "backup" now active > Aug 13 23:15:06 smeagol lvm[99]: 1 logical volume(s) in volume group > "donkey" now active So you have 2 VGs with 1 LV in each of them? Sometimes backup/library fails and sometimes donkey/downloads fails? Do you use initramfs? (In reply to Alexander Tsoy from comment #7) > (In reply to Mehmet Giritli from comment #0) > > device-mapper: create ioctl on donkey-downloads failed: Device or resource busy > ... > > I have 1 vg and 1 lv in it. > > (In reply to Mehmet Giritli from comment #6) > > Aug 13 23:15:06 smeagol lvm[99]: device-mapper: create ioctl on backup-library failed: Device or resource busy > > Aug 13 23:15:06 smeagol lvm[99]: 1 logical volume(s) in volume group > > "backup" now active > > Aug 13 23:15:06 smeagol lvm[99]: 1 logical volume(s) in volume group > > "donkey" now active > > So you have 2 VGs with 1 LV in each of them? Sometimes backup/library fails > and sometimes donkey/downloads fails? Do you use initramfs? Yes, I added a vg with a lv in it since I reported the bug.... None of them fail to get created. They are set up properly and used without any problems. The only problem is the failed state of the service which is because of the above error. Why am I getting this error even though everything is functioning properly? I do not use initramfs. I also managed to reproduce this. But in my case it is different unit, that fails: lvm2-activation-net.service. $ sudo journalctl --no-pager -l -u lvm2-activation-net.service -- Logs begin at Пн. 2013-02-04 20:27:35 MSK, end at Сб. 2013-08-17 02:58:53 MSK. -- авг. 17 02:55:00 home.puleglot lvm[626]: device-mapper: create ioctl on vg_user-home failed: Устройство или ресурс занято авг. 17 02:55:00 home.puleglot lvm[626]: 2 logical volume(s) in volume group "vg_user" now active авг. 17 02:55:00 home.puleglot lvm[626]: 4 logical volume(s) in volume group "vg_system" now active авг. 17 02:55:01 home.puleglot systemd[1]: lvm2-activation-net.service: main process exited, code=exited, status=5/NOTINSSTALLED авг. 17 02:55:01 home.puleglot systemd[1]: Failed to start Activation of LVM2 logical volumes. авг. 17 02:55:01 home.puleglot systemd[1]: Unit lvm2-activation-net.service entered failed state. (In reply to Mehmet Giritli from comment #8) > Why am I getting this error even though > everything is functioning properly? lvm2-activation-generator generates 3 units: lvm2-activation-early.service lvm2-activation-net.service lvm2-activation.service All of them execute the same command: "lvm vgchange -aay --sysinit". lvm2-activation.service is always started after lvm2-activation-early.service, because it has "After=lvm2-activation-early.service". So there are no problems here. But there are no dependencies between lvm2-activation-net.service and other two units, so it may interfere with them. It seems that on our systems it is started in parralel with lvm2-activation-early.service (a little later on my system and a little earlier on your system). Offtop: I recommend you start using lvmetad: "use_lvmetad = 1" in /etc/lvm/lvm.conf systemctl enable lvm2-lvmetad.service lvm2-activation-generator do nothing if lvmetad is enabled. Created attachment 356372 [details, diff]
lvm2-2.02.99-lvm2-activation-net-fix-order.patch
This patch fixes the problem for me. But I'm not sure that in all configurations lvm2-activation-net.service should be started after lvm2-activation-early.service.
I see similar issues here and will try the suggested patch. Unsure if I need/want lvmetad ... btw (In reply to Stefan G. Weichinger from comment #13) > I see similar issues here and will try the suggested patch. > Unsure if I need/want lvmetad ... btw patch works fine here as well (In reply to Alexander Tsoy from comment #12) > Created attachment 356372 [details, diff] [details, diff] > lvm2-2.02.99-lvm2-activation-net-fix-order.patch > > This patch fixes the problem for me. But I'm not sure that in all > configurations lvm2-activation-net.service should be started after > lvm2-activation-early.service. Can you forward the patch to lvm2 upstream? (since we are now supplying upstream unit files) Thanks! 2.02.100 is now in Portage, if I'm not looking wrong, this looks to be fixed already (just a bit differently) Can someone verify? (In reply to Samuli Suominen from comment #16) > 2.02.100 is now in Portage, if I'm not looking wrong, this looks to be fixed > already (just a bit differently) > Can someone verify? Sorry, not so good. My LVs were not activated after booting. # journalctl -b -u lvm2-activation-early.service -- Logs begin at So 2013-09-01 21:23:55 CEST, end at Fr 2013-09-13 14:10:01 CEST. -- Sep 13 14:04:06 hiro.oops.intern systemd[1]: Starting Activation of LVM2 logical volumes... Sep 13 14:04:06 hiro.oops.intern systemd[1]: lvm2-activation-early.service: main process exited, code=exited, status=203/EXEC Sep 13 14:04:06 hiro.oops.intern systemd[1]: Failed to start Activation of LVM2 logical volumes. Sep 13 14:04:06 hiro.oops.intern systemd[1]: Unit lvm2-activation-early.service entered failed state. PV is an mdadm-raid (ugly name md127, but OK so far): # pvs PV VG Fmt Attr PSize PFree /dev/md127 VG03 lvm2 a-- 595,05g 48,05g # cat /proc/mdstat Personalities : [raid1] md4 : active raid1 sdb3[0] sda6[2] 52395904 blocks super 1.2 [2/2] [UU] md127 : active raid1 sdb6[0] sda3[1] 623963072 blocks [2/2] [UU] unused devices: <none> needed a manual "vgchange -ay" (In reply to Stefan G. Weichinger from comment #17) > (In reply to Samuli Suominen from comment #16) > > 2.02.100 is now in Portage, if I'm not looking wrong, this looks to be fixed > > already (just a bit differently) > > Can someone verify? > > > Sorry, not so good. > > My LVs were not activated after booting. This is a bug 484752 In order to use lvm with systemd you either need to: - not use an initramfs - use an initramfs that activates lvm volumes using udev (and not mdev). The latter requires you to use genkernel-next to generate the initramfs (running genkernel with the --udev flag). (In reply to Fabio Erculiani from comment #19) > In order to use lvm with systemd you either need to: > - not use an initramfs > - use an initramfs that activates lvm volumes using udev (and not mdev). > > The latter requires you to use genkernel-next to generate the initramfs > (running genkernel with the --udev flag). It is another problem, not related to this bug. (In reply to Alexander Tsoy from comment #20) > (In reply to Fabio Erculiani from comment #19) > > In order to use lvm with systemd you either need to: > > - not use an initramfs > > - use an initramfs that activates lvm volumes using udev (and not mdev). > > > > The latter requires you to use genkernel-next to generate the initramfs > > (running genkernel with the --udev flag). > > It is another problem, not related to this bug. sorry for mixing that up, thanks for the pointer. (In reply to Pacho Ramos from comment #15) > (In reply to Alexander Tsoy from comment #12) > > Created attachment 356372 [details, diff] [details, diff] [details, diff] > > lvm2-2.02.99-lvm2-activation-net-fix-order.patch > > > > This patch fixes the problem for me. But I'm not sure that in all > > configurations lvm2-activation-net.service should be started after > > lvm2-activation-early.service. > > Can you forward the patch to lvm2 upstream? (since we are now supplying > upstream unit files) > > Thanks! Yes, but after we get lvm2-2.02.100 with working lvm2-activation-generator in the tree and after somebody test it. :) (In reply to Samuli Suominen from comment #16) > 2.02.100 is now in Portage, if I'm not looking wrong, this looks to be fixed > already (just a bit differently) > Can someone verify? No, it's not fixed. I'm going to send my patch to upstream. Upstream commit: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=9742c5192e8871ebde12856170dae70ee861ef40 *lvm2-2.02.102 (27 Sep 2013) 27 Sep 2013; Samuli Suominen <ssuominen@gentoo.org> +files/lvm2-2.02.102-do-no t-install-separate-command-symlink-for-lvm-devtypes.patch, +lvm2-2.02.102.ebuild: Version bump. |