lvcreate gives the following error about semaphore.
lvcreate -n test_lv10 -L 1G test_vg_3 Found duplicate PV XfbmuZ2c2MPAb8r0TDIBNrcyUx0yMZpu: using /dev/emcpowerh not /dev/sdb Failed to create notification semaphore: Invalid argument Unable to resume test_vg_3-test_lv10 (253:3) Failed to activate new LV. Failed to create notification semaphore: Invalid argument Unable to deactivate test_vg_3-test_lv10 (253:3) Unable to deactivate failed new LV. Manual intervention required.
The same error is produced if lv is activated or deactivated.
Resuming vg_test-lv_test (253:3) Failed to create notification semaphore: Invalid argument Unable to resume vg_test-lv_test (253:3)
Removing iscsivg-iscsilv (253:2) Failed to create notification semaphore: Invalid argument Unable to deactivate iscsivg-iscsilv (253:2) Leaving critical section (deactivated).
To resolve this error, change the kernel.sem in /etc/sysctl.conf from “1250256001001024” to “250 32000 32 128”. ( Make sure the ‘TAB’ in between is present ).
The kernel.sem is set to a huge value and overflows this parameter. LVM commands may fail due to a lack of semaphore.
Check kernel.sem parameter, if it is set to a very large value or it is set without ‘TAB’, it could be overflowed.
# cat /etc/sysctl.conf | grep kernel.sem kernel.sem=1250256001001024 # cat /proc/sys/kernel/sem -388929984 32000 32 128
The default values should be as follows.
# cat /proc/sys/kernel/sem
250 32000 32 128