Bug#599596: /sbin/lvcreate: Does not clean up semaphore arrays after use
Sam Morris
sam at robots.org.uk
Sat Oct 9 11:36:03 UTC 2010
Package: lvm2
Version: 2.02.39-8
Severity: grave
File: /sbin/lvcreate
Justification: renders package unusable
I have a backup script which creates and destroys LVM snapshots ever
day. A few days after upgrading to device mapper 2:1.02.48-3, the backup
lvcreate began to fail with the following message:
| device-mapper: create ioctl failed: Device or resource busy
| Aborting. Failed to activate snapshot exception store.
This is caused by the system limit on the number of semaphore arrays
being reached.
It seems that lvcreate/lvremove operations each create a number of
semarphore arrays, but to not remove them before exiting:
$ sudo ipcs -s | wc -l
121
$ sudo lvcreate -s -L 1G -n blah thoth/home
/dev/dm-8: open failed: No such device or address
Logical volume "blah" created
$ sudo ipcs -s | wc -l
124
$ sudo lvremove thoth/blah
Do you really want to remove active logical volume "blah"? [y/n]: y
Logical volume "blah" successfully removed
$ sudo ipcs -s | wc -l
127
$ sudo lvcreate -s -L 1G -n blah thoth/home
/dev/dm-8: open failed: No such device or address
/dev/dm-9: open failed: No such device or address
/dev/dm-15: open failed: No such device or address
Logical volume "blah" created
$ sudo ipcs -s | wc -l
130
$ sudo lvremove thoth/blah
Do you really want to remove active logical volume "blah"? [y/n]: y
Limit for the maximum number of semaphores reached. You can check and set the limits in /proc/sys/kernel/sem.
Unable to deactivate thoth-home-real (253:9)
Failed to resume home.
Logical volume "blah" successfully removed
$ sudo ipcs -s | wc -l
132
$ sudo lvcreate -s -L 1G -n blah thoth/home
/dev/dm-8: open failed: No such device or address
/dev/dm-15: open failed: No such device or address
Limit for the maximum number of semaphores reached. You can check and set the limits in /proc/sys/kernel/sem.
Unable to resume thoth-blah (253:8)
Aborting. Failed to activate snapshot exception store.
-- System Information:
Debian Release: squeeze/sid
APT prefers stable
APT policy: (550, 'stable'), (530, 'testing'), (520, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-bpo.5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages lvm2 depends on:
ii libc6 2.11.2-6 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.48-3 The Linux Kernel Device Mapper use
ii libreadline5 5.2-3.1 GNU readline and history libraries
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
Versions of packages lvm2 recommends:
ii dmsetup 2:1.02.48-3 The Linux Kernel Device Mapper use
lvm2 suggests no packages.
-- no debconf information
More information about the pkg-lvm-maintainers
mailing list