Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with LVM utilities on systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Mon Dec 03, 2012 5:43 pm    Post subject: Problems with LVM utilities on systemd Reply with quote

Here I'm trying to create a PV, VG and then a LV.
Let me say that this only happens when I boot into systemd. With OpenRC everything's OK. I'm on ~amd64 and use all the latest software.

Code:

melforce ~ # pvcreate /dev/sda4
  Physical volume "/dev/sda4" successfully created
melforce ~ # vgcreate derk /dev/sda4
  Volume group "derk" successfully created
melforce ~ # vgdisplay
  --- Volume group ---
  VG Name               siga
<I skipped some lines here>
   
  --- Volume group ---
  VG Name               derk
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               44,43 GiB
  PE Size               4,00 MiB
  Total PE              11373
  Alloc PE / Size       0 / 0   
  Free  PE / Size       11373 / 44,43 GiB
  VG UUID               k2D7Wp-VJT8-25yG-qhnF-qfDX-xFZx-c6E1yf
   
melforce ~ # lvcreate -L5G -nmylv derk
  /dev/derk/mylv: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  semid 9797633: semop failed for cookie 0xd4d0a9b: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223152795 (0xd4d0a9b) to initialize waiting for incoming notifications.


Thus, LV is not created.
If I use --zero n it's created alright:

Code:

melforce ~ # lvcreate -Z n -L5G -nmylv derk
  WARNING: "mylv" not zeroed
  Logical volume "mylv" created


But still I get semaphore warnings on delete:

Code:

melforce ~ # lvremove /dev/derk/mylv
Do you really want to remove active logical volume mylv? [y/n]: y
  Logical volume "mylv" successfully removed
  semid 10780673: semop failed for cookie 0xd4db599: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223196569 (0xd4db599) to initialize waiting for incoming notifications.


I have no idea what it can be related to.
Back to top
View user's profile Send private message
Mardok45
n00b
n00b


Joined: 21 Jun 2008
Posts: 69
Location: Right behind you

PostPosted: Mon May 20, 2013 9:00 pm    Post subject: Reply with quote

Dear people from the future who happen to be searching for the same problem:

I was experiencing the same problem and eventually found this:
http://www.redhat.com/archives/linux-lvm/2012-August/msg00025.html

After changing the following entry in the kernel .config from:

Code:
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"


to

Code:
CONFIG_UEVENT_HELPER_PATH=""


the problem seems to be fixed.
Back to top
View user's profile Send private message
Laetos
n00b
n00b


Joined: 18 Jan 2003
Posts: 27
Location: utopia

PostPosted: Fri Jul 26, 2013 9:36 am    Post subject: Reply with quote

Hi Mardok45 the Future is here, just stopping by to say that this did help me fix it, thx!
Back to top
View user's profile Send private message
glaukommatos
n00b
n00b


Joined: 05 Jan 2014
Posts: 3

PostPosted: Sun Jan 19, 2014 7:09 am    Post subject: Reply with quote

Thanks, this worked for me too!
Back to top
View user's profile Send private message
ub1quit33
n00b
n00b


Joined: 24 May 2013
Posts: 16

PostPosted: Sun Feb 09, 2014 10:56 pm    Post subject: Reply with quote

Much thanks for sharing your solution. This fixed my issues with LVM under systemd.
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Mon Feb 10, 2014 8:38 am    Post subject: Reply with quote

I'm not sure which package this is about; but to make sure future users don't experience this again, could you file a bug indicating that the package in question needs to check for this? (Or let me know the package?)
Back to top
View user's profile Send private message
psofa
Guru
Guru


Joined: 28 Feb 2004
Posts: 485

PostPosted: Tue Oct 07, 2014 1:44 am    Post subject: Reply with quote

Thank you!
can also be fixed at runtime with:
echo 0 > /sys/kernel/uevent_helper
I guess "sys-fs/lvm2" should be checking for this
_________________
psofa
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue Oct 07, 2014 2:09 am    Post subject: Reply with quote

That path has been deprecated for a long time, since running a helper process can be racy. netlink is a much better interface, though it does require some specific coding.

afaik, only mdev still uses that path, and ofc the capability is there for someone building their own kernel, to hook into whatever they want.

I could have sworn I read about that in the kernel config documentation, as well as other places wrt to udev changes (two or three years ago.)
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Tue Nov 04, 2014 12:23 am    Post subject: [solved] Reply with quote

I am adding here my question since it is very similar and I am not sure if it is a different problem. I did recompiled the kernel removing the helper and it didn't fix my problem.

Here is the message I am getting:

Code:
  Volume "donneesvg/db2data" is not active locally.
  Aborting. Failed to wipe start of new LV.


I must say at boot time, the boot process is throwing me into a maintenance shell where I have to vgchange -a y donneesvg to activate the volume group, then systemctl default to continue the boot process. I do have a discussion thread on this problem, nobody has came so far with anything useful to try to fix this problem. So, I don't know if my two problems are related and simply two different symptoms of a single problem.

Ignore the italic part above, the problem is unrelated and I fixed this problem which has something to do with kernel options for dracut.


What does it mean "not active locally"? I tried to find something about it on the web and found nothing.

NOTE: Solved, my problem was the new LV was not included in the volume_list.
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum