LVM2+mdraid+systemd (was Re: [gentoo-user] systemd and lvm)

2013-09-20 Thread Canek Peláez Valdés
On Fri, Sep 13, 2013 at 7:42 AM, Stefan G. Weichinger li...@xunil.at wrote:
 Am 12.09.2013 20:23, schrieb Canek Peláez Valdés:

 Stefan, what initramfs are you using?

 dracut, run via your kerninst-script.

 Could you please explain how is exactly your layout? From drives to
 partitions to PVs, VGs and LVs? And throw in there also the LUKS and
 RAID (if used) setup. I will try to replicate that in a VM. Next week,
 since we have a holiday weekend coming.

 thanks for your offer.

 I wil happily list my setup BUT let me tell at first that the latest
 sys-fs/lvm2-2.02.100 seems to have fixed that semaphore-issue.

 After booting my desktop with it I quickly tested:

 # lvcreate -n test -L1G VG03
   Logical volume test created
 #

 fine!

 Three times ok ...

 But I still face the fact that the LVs weren't activated at boot time.
 Manual vgchange -ay needed ... or that self-written lvm.service
 enabled as mentioned somewhat earlier.

 Here my setup:

 # lsblk
 NAME MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
 sda8:00 931,5G  0 disk
 ├─sda1 8:10 2M  0 part
 ├─sda2 8:20 2G  0 part  [SWAP]
 ├─sda3 8:30   600G  0 part
 │ └─md127  9:127  0 595,1G  0 raid1
 │   ├─VG03-music 253:00   190G  0 lvm   /mnt/music
 │   ├─VG03-platz 253:10   200G  0 lvm   /mnt/platz
 │   ├─VG03-media 253:2045G  0 lvm   /mnt/media
 │   ├─VG03-home  253:3030G  0 lvm
 │   ├─VG03-oopsfiles 253:4012G  0 lvm   /mnt/oopsfiles
 │   ├─VG03-dropbox   253:50 5G  0 lvm   /mnt/dropbox
 │   ├─VG03-distfiles 253:6010G  0 lvm   /usr/portage/distfiles
 │   ├─VG03-gentoo32  253:7015G  0 lvm   /mnt/gentoo32
 │   ├─VG03-xp253:8040G  0 lvm
 │   └─VG03-test  253:90 1G  0 lvm
 └─sda6 8:6050G  0 part
   └─md49:4050G  0 raid1
 sdb8:16   0 931,5G  0 disk
 ├─sdb1 8:17   0   100M  0 part
 ├─sdb2 8:18   0  98,8G  0 part
 ├─sdb3 8:19   050G  0 part
 │ └─md49:4050G  0 raid1
 ├─sdb4 8:20   0  12,4G  0 part
 └─sdb6 8:22   0 595,1G  0 part
   └─md127  9:127  0 595,1G  0 raid1
 ├─VG03-music 253:00   190G  0 lvm   /mnt/music
 ├─VG03-platz 253:10   200G  0 lvm   /mnt/platz
 ├─VG03-media 253:2045G  0 lvm   /mnt/media
 ├─VG03-home  253:3030G  0 lvm
 ├─VG03-oopsfiles 253:4012G  0 lvm   /mnt/oopsfiles
 ├─VG03-dropbox   253:50 5G  0 lvm   /mnt/dropbox
 ├─VG03-distfiles 253:6010G  0 lvm   /usr/portage/distfiles
 ├─VG03-gentoo32  253:7015G  0 lvm   /mnt/gentoo32
 ├─VG03-xp253:8040G  0 lvm
 └─VG03-test  253:90 1G  0 lvm
 sdc8:32   0  55,9G  0 disk
 ├─sdc1 8:33   025G  0 part  /
 ├─sdc2 8:34   0 2G  0 part
 └─sdc3 8:35   0  28,9G  0 part  /home
 sr0   11:01  1024M  0 rom



 This pretty much says it all, right?

 2 hdds sda and sdb
 1 ssd sdc

 root-fs and /home on ssd ...

 sda and sdb build two RAID-arrays (rather ugly names and partitions ...
 grown over time):

 # 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


 # pvs
   PV VG   Fmt  Attr PSize   PFree
   /dev/md127 VG03 lvm2 a--  595,05g 47,05g

Sorry I took my time, I was busy.

Well, yours' a complex setup. This is a similar, although simpler, version:

NAME MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sr0   11:01 1024M  0 rom
vda  253:005G  0 disk
|-vda1   253:10   95M  0 part  /boot
|-vda2   253:20  1.9G  0 part  [SWAP]
`-vda3   253:303G  0 part  /home
vdb  253:16   05G  0 disk
`-vdb1   253:17   05G  0 part  /
vdc  253:32   05G  0 disk
`-vdc1   253:33   05G  0 part
  `-md127  9:127  05G  0 raid1
|-vg-vol1 (dm-0) 254:002G  0 lvm   /home/canek/Music
|-vg-vol2 (dm-1) 254:102G  0 lvm   /home/canek/Pictures
`-vg-vol3 (dm-2) 254:20 1020M  0 lvm   /home/canek/Videos
vdd  253:48   05G  0 disk
`-vdd1   253:49   05G  0 part
  `-md127  9:127  05G  0 raid1
|-vg-vol1 (dm-0) 254:002G  0 lvm   /home/canek/Music
|-vg-vol2 (dm-1) 254:102G  0 lvm   /home/canek/Pictures
`-vg-vol3 (dm-2) 254:20 1020M  0 lvm   /home/canek/Videos

/boot on vda1 as ext2, / (root) on vdb1 as ext4, /home on vda3 as
ext4,  vda2 as swap, and vdc1 and vdd1 as 

Re: LVM2+mdraid+systemd (was Re: [gentoo-user] systemd and lvm)

2013-09-20 Thread Stefan G. Weichinger
Am 20.09.2013 10:46, schrieb Canek Peláez Valdés:

 Sorry I took my time, I was busy.
 
 Well, yours' a complex setup. This is a similar, although simpler, version:

At first: thank your for the extended test setup you did and described
... I will dig through it as soon as I find time ... I am quite busy
these days as well.

Thanks, regards, Stefan!




Re: LVM2+mdraid+systemd (was Re: [gentoo-user] systemd and lvm)

2013-09-20 Thread Stefan G. Weichinger

I haven't yet worked through all your suggestions/descriptions.

Edited USE-flags and dracut-modules, worked around bug

https://bugs.gentoo.org/show_bug.cgi?id=485202

and rebuilt kernel and initrd.

Didn't activate LVs ...

Now I edited fstab:

I had the option systemd.automount enabled, like in

/dev/mapper/VG03-media /mnt/media   ext4
noatime,user_xattr,comment=systemd.automount 0 2

The/my idea behind that: the boot-process should not need to wait for
the LVs activated/fscked/mounted ... and my root-fs and /home are both
on the SSD anyway (not LVM-based).

I removed that option and after the next boot the LVs were activated and
mounted (though the booting was a bit slower, as expected).

OK. I send this message now and test another few reboots.

Thanks, Stefan



Re: LVM2+mdraid+systemd (was Re: [gentoo-user] systemd and lvm)

2013-09-20 Thread Canek Peláez Valdés
On Fri, Sep 20, 2013 at 11:17 AM, Stefan G. Weichinger li...@xunil.at wrote:

 I haven't yet worked through all your suggestions/descriptions.

 Edited USE-flags and dracut-modules, worked around bug

 https://bugs.gentoo.org/show_bug.cgi?id=485202

 and rebuilt kernel and initrd.

 Didn't activate LVs ...

 Now I edited fstab:

 I had the option systemd.automount enabled, like in

 /dev/mapper/VG03-media /mnt/media   ext4
 noatime,user_xattr,comment=systemd.automount 0 2

 The/my idea behind that: the boot-process should not need to wait for
 the LVs activated/fscked/mounted ... and my root-fs and /home are both
 on the SSD anyway (not LVM-based).

 I removed that option and after the next boot the LVs were activated and
 mounted (though the booting was a bit slower, as expected).

 OK. I send this message now and test another few reboots.

Forgot to mention it: I also enabled mdadm.service.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: LVM2+mdraid+systemd (was Re: [gentoo-user] systemd and lvm)

2013-09-20 Thread Stefan G. Weichinger
Am 20.09.2013 18:50, schrieb Canek Peláez Valdés:

 OK. I send this message now and test another few reboots.
 
 Forgot to mention it: I also enabled mdadm.service.

That service is enabled here as well and running fine.



# systemctl status lvm2-activation-net.service
lvm2-activation-net.service - Activation of LVM2 logical volumes
   Loaded: loaded (/etc/lvm/lvm.conf)
   Active: inactive (dead) since Fr 2013-09-20 20:57:15 CEST
 Docs: man:lvm(8)
   man:vgchange(8)
  Process: 580 ExecStart=/sbin/lvm vgchange -aay --sysinit (code=exited,
status=0/SUCCESS)
  Process: 366 ExecStartPre=/usr/bin/udevadm settle (code=exited,
status=0/SUCCESS)
 Main PID: 580 (code=exited, status=0/SUCCESS)

Sep 20 20:57:13 hiro.oops.intern lvm[580]: 10 logical volume(s) in
volume group VG03 now active
Sep 20 20:57:15 hiro.oops.intern systemd[1]: Started Activation of LVM2
logical volumes.


nice ... but not at every boot ... one time they are activated, one time
not.

*sigh*

Thanks for all your patience ... I could live with that lvm.service ;-)

Considering to convert the mdadm-RAID to metadata 1.2 (wouldn't hurt
anyway, right?)

Stefan



Re: [gentoo-user] systemd and lvm

2013-09-13 Thread Stefan G. Weichinger
Am 12.09.2013 20:23, schrieb Canek Peláez Valdés:

 Stefan, what initramfs are you using?

dracut, run via your kerninst-script.

 Could you please explain how is exactly your layout? From drives to
 partitions to PVs, VGs and LVs? And throw in there also the LUKS and
 RAID (if used) setup. I will try to replicate that in a VM. Next week,
 since we have a holiday weekend coming.

thanks for your offer.

I wil happily list my setup BUT let me tell at first that the latest
sys-fs/lvm2-2.02.100 seems to have fixed that semaphore-issue.

After booting my desktop with it I quickly tested:

# lvcreate -n test -L1G VG03
  Logical volume test created
#

fine!

Three times ok ...

But I still face the fact that the LVs weren't activated at boot time.
Manual vgchange -ay needed ... or that self-written lvm.service
enabled as mentioned somewhat earlier.

Here my setup:

# lsblk
NAME MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda8:00 931,5G  0 disk
├─sda1 8:10 2M  0 part
├─sda2 8:20 2G  0 part  [SWAP]
├─sda3 8:30   600G  0 part
│ └─md127  9:127  0 595,1G  0 raid1
│   ├─VG03-music 253:00   190G  0 lvm   /mnt/music
│   ├─VG03-platz 253:10   200G  0 lvm   /mnt/platz
│   ├─VG03-media 253:2045G  0 lvm   /mnt/media
│   ├─VG03-home  253:3030G  0 lvm
│   ├─VG03-oopsfiles 253:4012G  0 lvm   /mnt/oopsfiles
│   ├─VG03-dropbox   253:50 5G  0 lvm   /mnt/dropbox
│   ├─VG03-distfiles 253:6010G  0 lvm   /usr/portage/distfiles
│   ├─VG03-gentoo32  253:7015G  0 lvm   /mnt/gentoo32
│   ├─VG03-xp253:8040G  0 lvm
│   └─VG03-test  253:90 1G  0 lvm
└─sda6 8:6050G  0 part
  └─md49:4050G  0 raid1
sdb8:16   0 931,5G  0 disk
├─sdb1 8:17   0   100M  0 part
├─sdb2 8:18   0  98,8G  0 part
├─sdb3 8:19   050G  0 part
│ └─md49:4050G  0 raid1
├─sdb4 8:20   0  12,4G  0 part
└─sdb6 8:22   0 595,1G  0 part
  └─md127  9:127  0 595,1G  0 raid1
├─VG03-music 253:00   190G  0 lvm   /mnt/music
├─VG03-platz 253:10   200G  0 lvm   /mnt/platz
├─VG03-media 253:2045G  0 lvm   /mnt/media
├─VG03-home  253:3030G  0 lvm
├─VG03-oopsfiles 253:4012G  0 lvm   /mnt/oopsfiles
├─VG03-dropbox   253:50 5G  0 lvm   /mnt/dropbox
├─VG03-distfiles 253:6010G  0 lvm   /usr/portage/distfiles
├─VG03-gentoo32  253:7015G  0 lvm   /mnt/gentoo32
├─VG03-xp253:8040G  0 lvm
└─VG03-test  253:90 1G  0 lvm
sdc8:32   0  55,9G  0 disk
├─sdc1 8:33   025G  0 part  /
├─sdc2 8:34   0 2G  0 part
└─sdc3 8:35   0  28,9G  0 part  /home
sr0   11:01  1024M  0 rom



This pretty much says it all, right?

2 hdds sda and sdb
1 ssd sdc

root-fs and /home on ssd ...

sda and sdb build two RAID-arrays (rather ugly names and partitions ...
grown over time):

# 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


# pvs
  PV VG   Fmt  Attr PSize   PFree
  /dev/md127 VG03 lvm2 a--  595,05g 47,05g


--- thanks in advance, Stefan




Re: [gentoo-user] systemd and lvm

2013-09-13 Thread Stefan G. Weichinger

new info here (for me):

https://bugs.gentoo.org/show_bug.cgi?id=480066#c19

gotta test ... right now I don't have the time.

S



Re: [gentoo-user] systemd and lvm

2013-09-13 Thread Stefan G. Weichinger
Am 13.09.2013 14:54, schrieb Stefan G. Weichinger:
 
 new info here (for me):
 
 https://bugs.gentoo.org/show_bug.cgi?id=480066#c19
 
 gotta test ... right now I don't have the time.

first tests with genkernel --udev ... : negative.

More details maybe later this evening.




Re: [gentoo-user] systemd and lvm

2013-09-13 Thread Stefan G. Weichinger
Am 13.09.2013 15:33, schrieb Stefan G. Weichinger:
 Am 13.09.2013 14:54, schrieb Stefan G. Weichinger:

 new info here (for me):

 https://bugs.gentoo.org/show_bug.cgi?id=480066#c19

 gotta test ... right now I don't have the time.
 
 first tests with genkernel --udev ... : negative.
 
 More details maybe later this evening.

I found something.

journalctl -b told me that systemd was looking for

/usr/sbin/lvm

which does not exist.

I linked it from /sbin/lvm and this seems to help ... I still don't know
exactly where this comes from ... still digging.

I also removed lvm2 completely ... checked for lvm-related unit-files
and emerged it again ... no /usr/sbin/lvm found with grep. Maybe
compiled into ...

/usr/lib/systemd/system-generators/lvm2-activation-generator

Will have to check the sources or similar.





Re: [gentoo-user] systemd and lvm

2013-09-13 Thread Stefan G. Weichinger
Am 13.09.2013 19:36, schrieb Stefan G. Weichinger:

 /usr/sbin/lvm
 
 which does not exist.
 
 I linked it from /sbin/lvm and this seems to help ... I still don't know
 exactly where this comes from ... still digging.
 
 I also removed lvm2 completely ... checked for lvm-related unit-files
 and emerged it again ... no /usr/sbin/lvm found with grep. Maybe
 compiled into ...
 
 /usr/lib/systemd/system-generators/lvm2-activation-generator
 
 Will have to check the sources or similar.

Oh ... much going on here:

https://bugs.gentoo.org/show_bug.cgi?id=484752



Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Mick
On Wednesday 11 Sep 2013 12:38:23 Stefan G. Weichinger wrote:
 Am 11.09.2013 13:22, schrieb Stefan G. Weichinger:
  Failed to set a proper state for notification semaphore identified by
  cookie value
 
 Also found this:
 
 http://forums.gentoo.org/viewtopic-t-965446-view-previous.html?sid=5c1f845f
 96ca4cf1a9c17d73501e232d
 
 I have
 
 # zgrep UEV /proc/config.gz
 CONFIG_UEVENT_HELPER_PATH=
 CONFIG_DM_UEVENT=y
 
 so this is not my solution here ...

I wonder if adding CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug would help you 
here.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Stefan G. Weichinger
Am 12.09.2013 08:50, schrieb Mick:
 On Wednesday 11 Sep 2013 12:38:23 Stefan G. Weichinger wrote:
 Am 11.09.2013 13:22, schrieb Stefan G. Weichinger:
 Failed to set a proper state for notification semaphore
 identified by cookie value
 
 Also found this:
 
 http://forums.gentoo.org/viewtopic-t-965446-view-previous.html?sid=5c1f845f

 
96ca4cf1a9c17d73501e232d
 
 I have
 
 # zgrep UEV /proc/config.gz CONFIG_UEVENT_HELPER_PATH= 
 CONFIG_DM_UEVENT=y
 
 so this is not my solution here ...
 
 I wonder if adding CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug would
 help you here.

I don't have that binary.  And some page on my way said the contrary:
set it to empty and let udev (?) do that.





Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Mick
On Thursday 12 Sep 2013 09:37:32 Stefan G. Weichinger wrote:
 Am 12.09.2013 08:50, schrieb Mick:
  On Wednesday 11 Sep 2013 12:38:23 Stefan G. Weichinger wrote:
  Am 11.09.2013 13:22, schrieb Stefan G. Weichinger:
  Failed to set a proper state for notification semaphore
  identified by cookie value
  
  Also found this:
  
  http://forums.gentoo.org/viewtopic-t-965446-view-previous.html?sid=5c1f8
  45f
 
 96ca4cf1a9c17d73501e232d
 
  I have
  
  # zgrep UEV /proc/config.gz CONFIG_UEVENT_HELPER_PATH=
  CONFIG_DM_UEVENT=y
  
  so this is not my solution here ...
  
  I wonder if adding CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug would
  help you here.
 
 I don't have that binary.  And some page on my way said the contrary:
 set it to empty and let udev (?) do that.

Ha!  Neither do I!

# ls -la /sbin/hotplug
ls: cannot access /sbin/hotplug: No such file or directory

I can honestly say that I can't remember filling in this entry when 
configuring my kernels, but then how did it get there?

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Stefan G. Weichinger
Am 12.09.2013 14:43, schrieb Mick:

 I don't have that binary.  And some page on my way said the
 contrary: set it to empty and let udev (?) do that.
 
 Ha!  Neither do I!
 
 # ls -la /sbin/hotplug ls: cannot access /sbin/hotplug: No such
 file or directory
 
 I can honestly say that I can't remember filling in this entry when
  configuring my kernels, but then how did it get there?
 

dunno.

Kernel help says about that setting:

 Before the switch to the netlink-based uevent source, this was
 │ │ used to hook hotplug scripts into kernel device events. It
 │ │ usually pointed to a shell script at /sbin/hotplug.
 │ │ This should not be used today, because usual systems create
 │ │ many events at bootup or device discovery in a very short time
 │ │ frame. One forked process per event can create so many
 processes
 │ │ that it creates a high system load, or on smaller systems
 │ │ it is known to create out-of-memory situations during bootup.


I also found configs having this:

CONFIG_UEVENT_HELPER_PATH=/usr/bin/udevadm

That binary would exist here.

I am unsure if I should try that.


S



Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Canek Peláez Valdés
On Sep 12, 2013 8:04 AM, Stefan G. Weichinger li...@xunil.at wrote:

 Am 12.09.2013 14:43, schrieb Mick:

  I don't have that binary.  And some page on my way said the
  contrary: set it to empty and let udev (?) do that.
 
  Ha!  Neither do I!
 
  # ls -la /sbin/hotplug ls: cannot access /sbin/hotplug: No such
  file or directory
 
  I can honestly say that I can't remember filling in this entry when
   configuring my kernels, but then how did it get there?
 

 dunno.

 Kernel help says about that setting:

  Before the switch to the netlink-based uevent source, this was
  │ │ used to hook hotplug scripts into kernel device events. It
  │ │ usually pointed to a shell script at /sbin/hotplug.
  │ │ This should not be used today, because usual systems create
  │ │ many events at bootup or device discovery in a very short time
  │ │ frame. One forked process per event can create so many
  processes
  │ │ that it creates a high system load, or on smaller systems
  │ │ it is known to create out-of-memory situations during bootup.


 I also found configs having this:

 CONFIG_UEVENT_HELPER_PATH=/usr/bin/udevadm

 That binary would exist here.

 I am unsure if I should try that.

Don't, that only will create potential fork bombs.

Regards.


Re: [gentoo-user] systemd and lvm

2013-09-12 Thread gottlieb
On Thu, Sep 12 2013, Stefan G. Weichinger wrote:

 Am 12.09.2013 08:50, schrieb Mick:
 On Wednesday 11 Sep 2013 12:38:23 Stefan G. Weichinger wrote:
 Am 11.09.2013 13:22, schrieb Stefan G. Weichinger:
 Failed to set a proper state for notification semaphore
 identified by cookie value
 
 Also found this:
 
 http://forums.gentoo.org/viewtopic-t-965446-view-previous.html?sid=5c1f845f

 
 96ca4cf1a9c17d73501e232d
 
 I have
 
 # zgrep UEV /proc/config.gz CONFIG_UEVENT_HELPER_PATH= 
 CONFIG_DM_UEVENT=y
 
 so this is not my solution here ...
 
 I wonder if adding CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug would
 help you here.

 I don't have that binary.  And some page on my way said the contrary:
 set it to empty and let udev (?) do that.

The wiki says to have it blank.  I just started working with the
systemd-wiki people and this is unsettled.  Some are using
/sbin/hotplug.  I believe there is not much experience to go on.
I will be trying to go to systemd with /sbin/hotplug.

hth,
allan



Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Canek Peláez Valdés
On Thu, Sep 12, 2013 at 11:10 AM,  gottl...@nyu.edu wrote:
 On Thu, Sep 12 2013, Stefan G. Weichinger wrote:

 Am 12.09.2013 08:50, schrieb Mick:
 On Wednesday 11 Sep 2013 12:38:23 Stefan G. Weichinger wrote:
 Am 11.09.2013 13:22, schrieb Stefan G. Weichinger:
 Failed to set a proper state for notification semaphore
 identified by cookie value

 Also found this:

 http://forums.gentoo.org/viewtopic-t-965446-view-previous.html?sid=5c1f845f


 96ca4cf1a9c17d73501e232d

 I have

 # zgrep UEV /proc/config.gz CONFIG_UEVENT_HELPER_PATH=
 CONFIG_DM_UEVENT=y

 so this is not my solution here ...

 I wonder if adding CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug would
 help you here.

 I don't have that binary.  And some page on my way said the contrary:
 set it to empty and let udev (?) do that.

 The wiki says to have it blank.  I just started working with the
 systemd-wiki people and this is unsettled.  Some are using
 /sbin/hotplug.  I believe there is not much experience to go on.
 I will be trying to go to systemd with /sbin/hotplug.

Do you even have /sbin/hotplug? I don't, in any of my machines, and I
don't even remember when was the last time I saw it.

From the git live systemd README [1]:

Legacy hotplug slows down the system and confuses udev:
  CONFIG_UEVENT_HELPER_PATH=

From the kernel own help file:

config UEVENT_HELPER_PATH
string path to uevent helper
default 
help
 Path to uevent helper program forked by the kernel for
  every uevent.

  Before the switch to the netlink-based uevent source, this was
  used to hook hotplug scripts into kernel device events. It
  usually pointed to a shell script at /sbin/hotplug.
  This should not be used today, because usual systems create
  many events at bootup or device discovery in a very short time
  frame. One forked process per event can create so many processes
  that it creates a high system load, or on smaller systems
  it is known to create out-of-memory situations during bootup.

  To disable user space helper program execution at early boot
  time specify an empty string here. This setting can be altered
  via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
  later at runtime.

Really, whomever is recommending to set CONFIG_UEVENT_HELPER_PATH is
probably wrong. I can't find *one* place where it is recommended, and
several where they explicitly say to leave the option in blank.

Regards.

[1] http://cgit.freedesktop.org/systemd/systemd/tree/README
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Stefan G. Weichinger
Am 12.09.2013 18:22, schrieb Canek Peláez Valdés:

 Really, whomever is recommending to set CONFIG_UEVENT_HELPER_PATH is
 probably wrong. I can't find *one* place where it is recommended, and
 several where they explicitly say to leave the option in blank.

So ... I agree with this.

What to do about the initial problem then?

With openrc lvcreate is no problem, with systemd it is ... (for me, on 2
machines).

Stefan






Re: [gentoo-user] systemd and lvm

2013-09-12 Thread Canek Peláez Valdés
On Thu, Sep 12, 2013 at 12:35 PM, Stefan G. Weichinger li...@xunil.at wrote:
 Am 12.09.2013 18:22, schrieb Canek Peláez Valdés:

 Really, whomever is recommending to set CONFIG_UEVENT_HELPER_PATH is
 probably wrong. I can't find *one* place where it is recommended, and
 several where they explicitly say to leave the option in blank.

 So ... I agree with this.

 What to do about the initial problem then?

 With openrc lvcreate is no problem, with systemd it is ... (for me, on 2
 machines).

Stefan, what initramfs are you using?

I don't have much experience with LVM; I just installed a Qemu virtual
machine with it, and it gave me no problems. But it was a dead simple
setup.

Your setup, however, seems to be rather complicated: you have LVM,
LUKS and (if I remember correctly) software RAID?

In my virtual machine I didn't had to do anything. There are no
services for LVM, and there are no scripts doing nothing LVM related.
There are a couple of udev rules, which I never touched, and systemd
together with that seems to handle everything by itself. I have
everything in LVM, including / and /boot (which is inside /).

Could you please explain how is exactly your layout? From drives to
partitions to PVs, VGs and LVs? And throw in there also the LUKS and
RAID (if used) setup. I will try to replicate that in a VM. Next week,
since we have a holiday weekend coming.

When I installed my LVM setup, I was surprised to find how easy it
was. The only problem I got was to install GRUB2 in /dev/vda, and even
that wasn't that difficult, and only qemu related. So perhaps the
problem is *moving* LVM machines to systemd, with the cruft from
previous OpenRC installations. Perhaps you don't need to *add*
anything, but to *remove* things that are not necessary anymore since
systemd+dracut handles everything.

Please explain to me your drive layout, so I can try to replicate it.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] systemd and lvm

2013-09-12 Thread gottlieb
On Thu, Sep 12 2013, Canek Peláez Valdés wrote:


 Really, whomever is recommending to set CONFIG_UEVENT_HELPER_PATH is
 probably wrong. I can't find *one* place where it is recommended, and
 several where they explicitly say to leave the option in blank.

OK.  The wiki will continue to say it should be blank.
allan



[gentoo-user] systemd and lvm

2013-09-11 Thread Stefan G. Weichinger


systemd-204
lvm2-2.0.2.99-r2

(lvm2 patched as mentioned in

https://bugs.gentoo.org/show_bug.cgi?id=480066

this should only matter for activation)

-

See what happens here:

# lvcreate -n mlp-tmpl -L 11G VG02
  /dev/VG02/mlp-tmpl: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  device-mapper: remove ioctl on  failed: Das Gerät oder die Ressource
ist belegt
  semid 163841: semop failed for cookie 0xd4d92b7: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by
cookie value 223187639 (0xd4d92b7) to initialize waiting for incoming
notifications.


# lvcreate -n mlp-tmpl -L 11G -Zn VG02
  WARNING: mlp-tmpl not zeroed
  Logical volume mlp-tmpl created
  semid 196609: semop failed for cookie 0xd4d74cd: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by
cookie value 223179981 (0xd4d74cd) to initialize waiting for incoming
notifications.


https://bugzilla.redhat.com/show_bug.cgi?id=727925

talks of udev_sync=1 ... checked that, is there ...

CONFIG_NET_NS=y (whatever that is ... do I need it?)

...

Does anyone know what to do? I wanted to ask here before I file a bug at
bgo ...

Would be nice to solve this before I set up my shiny new KVM host where
I heavily want to use LVM-snapshots for backups. Sure, I could also stay
with openrc, correct!

(didn't mention: had that semaphore stuff on my main workstation as
well, only when booting via systemd)

Thanks, Stefan



Re: [gentoo-user] systemd and lvm

2013-09-11 Thread Stefan G. Weichinger
Am 11.09.2013 13:22, schrieb Stefan G. Weichinger:
 Failed to set a proper state for notification semaphore identified by
 cookie value


Also found this:

http://forums.gentoo.org/viewtopic-t-965446-view-previous.html?sid=5c1f845f96ca4cf1a9c17d73501e232d

I have

# zgrep UEV /proc/config.gz
CONFIG_UEVENT_HELPER_PATH=
CONFIG_DM_UEVENT=y

so this is not my solution here ...



Re: [gentoo-user] Systemd and lvm

2013-01-06 Thread Robin Atwood
On Sunday 06 January 2013, Canek Peláez Valdés wrote:
 On Sat, Jan 5, 2013 at 7:36 AM, Robin Atwood robin.atw...@attglobal.net 
wrote:
  On Friday 04 Jan 2013, Canek Peláez Valdés wrote:
  On Fri, Jan 4, 2013 at 10:11 AM, Robin Atwood
  
  robin.atw...@attglobal.net wrote:
   Having observed all the ranting, I thought I would try systemd on a
   laptop. It actually seems to work quite well and it is a lot faster.
   However I am having trouble getting my LVM partitions mounted. I
   installed the LVM service unit from the Gentoo Wiki but it never
   completes, timing-out on a job that mounts /var. The VG is actually
   created by an initramfs and when systemd dumps you out to the
   emergency shell you can use lvs to see the volumes, /dev/mapper has
   all the correct devices and dmsetup ls shows the LVs. In fact,
   everything appears as it should, the partitions just don't get
   mounted. I circumvented this by putting mount -a in the lvm.service
   unit, which then completes and the mount jobs time-out. Everything
   seems to be OK but it is a bit of a kludge. One thing I notice is:
   
   
   
   # udevadm info -p /dev/mapper/vg00-rootfs -q all
   
   syspath not found
   
   
   
   Udev seems not to know about the LVs. Any ideas?
  
  How did you create your initramfs? Have you tried dracut, with
  DRACUT_MODULES=lvm?
  
  Regards.
  
  I always use genkernel with LVM=YES in genkernel.conf. There is a thread
  about the udev issue at
  http://forums.gentoo.org/viewtopic-p-6837888.html . I tried the
  suggested work-around but it made no difference, I must still use mount
  - a.
 
 I've never used genkernel. You could try dracut; its mandatory
 dependencies are minimal, and it's actually designed to create an
 initramfs, not like genkernel, where the functionality was added as an
 afterthought.
 
 Another option is to roll your own initramfs, like the first responder
 in the forums thread.
 
 Good luck.

Maybe I will try dracut but I suspect the problem lies with systemd.

-Robin
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--










Re: [gentoo-user] Systemd and lvm

2013-01-05 Thread Robin Atwood
On Friday 04 Jan 2013, Canek Peláez Valdés wrote:
 On Fri, Jan 4, 2013 at 10:11 AM, Robin Atwood
 
 robin.atw...@attglobal.net wrote:
  Having observed all the ranting, I thought I would try systemd on a
  laptop. It actually seems to work quite well and it is a lot faster.
  However I am having trouble getting my LVM partitions mounted. I
  installed the LVM service unit from the Gentoo Wiki but it never
  completes, timing-out on a job that mounts /var. The VG is actually
  created by an initramfs and when systemd dumps you out to the emergency
  shell you can use lvs to see the volumes, /dev/mapper has all the
  correct devices and dmsetup ls shows the LVs. In fact, everything
  appears as it should, the partitions just don't get mounted. I
  circumvented this by putting mount -a in the lvm.service unit, which
  then completes and the mount jobs time-out. Everything seems to be OK
  but it is a bit of a kludge. One thing I notice is:
  
  
  
  # udevadm info -p /dev/mapper/vg00-rootfs -q all
  
  syspath not found
  
  
  
  Udev seems not to know about the LVs. Any ideas?
 
 How did you create your initramfs? Have you tried dracut, with
 DRACUT_MODULES=lvm?
 
 Regards.

I always use genkernel with LVM=YES in genkernel.conf. There is a thread about 
the udev issue at http://forums.gentoo.org/viewtopic-p-6837888.html . I tried 
the suggested work-around but it made no difference, I must still use mount -
a.

-Robin
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--











Re: [gentoo-user] Systemd and lvm

2013-01-05 Thread Canek Peláez Valdés
On Sat, Jan 5, 2013 at 7:36 AM, Robin Atwood robin.atw...@attglobal.net wrote:
 On Friday 04 Jan 2013, Canek Peláez Valdés wrote:
 On Fri, Jan 4, 2013 at 10:11 AM, Robin Atwood

 robin.atw...@attglobal.net wrote:
  Having observed all the ranting, I thought I would try systemd on a
  laptop. It actually seems to work quite well and it is a lot faster.
  However I am having trouble getting my LVM partitions mounted. I
  installed the LVM service unit from the Gentoo Wiki but it never
  completes, timing-out on a job that mounts /var. The VG is actually
  created by an initramfs and when systemd dumps you out to the emergency
  shell you can use lvs to see the volumes, /dev/mapper has all the
  correct devices and dmsetup ls shows the LVs. In fact, everything
  appears as it should, the partitions just don't get mounted. I
  circumvented this by putting mount -a in the lvm.service unit, which
  then completes and the mount jobs time-out. Everything seems to be OK
  but it is a bit of a kludge. One thing I notice is:
 
 
 
  # udevadm info -p /dev/mapper/vg00-rootfs -q all
 
  syspath not found
 
 
 
  Udev seems not to know about the LVs. Any ideas?

 How did you create your initramfs? Have you tried dracut, with
 DRACUT_MODULES=lvm?

 Regards.

 I always use genkernel with LVM=YES in genkernel.conf. There is a thread about
 the udev issue at http://forums.gentoo.org/viewtopic-p-6837888.html . I tried
 the suggested work-around but it made no difference, I must still use mount -
 a.

I've never used genkernel. You could try dracut; its mandatory
dependencies are minimal, and it's actually designed to create an
initramfs, not like genkernel, where the functionality was added as an
afterthought.

Another option is to roll your own initramfs, like the first responder
in the forums thread.

Good luck.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



[gentoo-user] Systemd and lvm

2013-01-04 Thread Robin Atwood
Having observed all the ranting, I thought I would try systemd on a laptop. It 
actually seems to work quite well and it is a lot faster. However I am having 
trouble getting my LVM partitions mounted. I installed the LVM service unit 
from the Gentoo Wiki but it never completes, timing-out on a job that mounts 
/var. The VG is actually created by an initramfs and when systemd dumps you 
out to the emergency shell you can use lvs to see the volumes, /dev/mapper has 
all the correct devices and dmsetup ls shows the LVs. In fact, everything 
appears as it should, the partitions just don't get mounted. I circumvented 
this by putting mount -a in the lvm.service unit, which then completes and 
the mount jobs time-out. Everything seems to be OK but it is a bit of a 
kludge. One thing I notice is:

# udevadm info -p /dev/mapper/vg00-rootfs -q all
syspath not found

Udev seems not to know about the LVs. Any ideas?

TIA
-Robin
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--










Re: [gentoo-user] Systemd and lvm

2013-01-04 Thread Canek Peláez Valdés
On Fri, Jan 4, 2013 at 10:11 AM, Robin Atwood
robin.atw...@attglobal.net wrote:
 Having observed all the ranting, I thought I would try systemd on a laptop.
 It actually seems to work quite well and it is a lot faster. However I am
 having trouble getting my LVM partitions mounted. I installed the LVM
 service unit from the Gentoo Wiki but it never completes, timing-out on a
 job that mounts /var. The VG is actually created by an initramfs and when
 systemd dumps you out to the emergency shell you can use lvs to see the
 volumes, /dev/mapper has all the correct devices and dmsetup ls shows the
 LVs. In fact, everything appears as it should, the partitions just don't get
 mounted. I circumvented this by putting mount -a in the lvm.service unit,
 which then completes and the mount jobs time-out. Everything seems to be OK
 but it is a bit of a kludge. One thing I notice is:



 # udevadm info -p /dev/mapper/vg00-rootfs -q all

 syspath not found



 Udev seems not to know about the LVs. Any ideas?

How did you create your initramfs? Have you tried dracut, with
DRACUT_MODULES=lvm?

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México