Operating System - Linux
1752796 Members
5902 Online
108789 Solutions
New Discussion

lvremove fails with device-mapper ioctl cmd 9 failed: Cannot allocate memory

 

lvremove fails with device-mapper ioctl cmd 9 failed: Cannot allocate memory

Good morning,

I have a RedHat RHEL4 system that I am using to try to get familiar with using LVM Snapshots.

The system has a 15GB LV for /home (/dev/VolGroup00/Home) and 319 unallocated extents (10GB) in VolGroup00

I created the snapshot LV with the command:
lvcreate -L10G -s -n HomeSnap /dev/VolGroup00/Home

I was able to mount the snapshot volume on /mnt, and verify that I could change files in /home and still see the original contents in /mnt.

I unmounted the snapshot volume without any problem, but then I ran into problems when I tried to remove the snapshot with the command:
lvremove /dev/VolGroup00/HomeSnap
[root@linux01 ~]# lvremove /dev/VolGroup00/HomeSnap
Do you really want to remove active logical volume "HomeSnap"? [y/n]: y
device-mapper ioctl cmd 9 failed: Cannot allocate memory
Couldn't load device 'VolGroup00-HomeSnap'.
Unable to deactivate logical volume "HomeSnap"


lvdisplay shows the following for the Home LV:
--- Logical volume ---
LV Name /dev/VolGroup00/Home
VG Name VolGroup00
LV UUID 6JKEfg-5EfT-59Cp-GjX6-EjSx-k3S1-z0Q5Lo
LV Write Access read/write
LV snapshot status source of
/dev/VolGroup00/HomeSnap [active]
LV Status suspended
# open 1
LV Size 15.00 GB
Current LE 480
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:5


Now any process that tries to access /home hangs (something to do with the Home LV being "Suspended"?) The shutdown scripts also hang (probably because one of them needs to access something in /home), and when I forced a reboot, the system came back up with the snapshot volume still active.


I tried Googling for the error message, but I'm not coming up with anything useful yet.

Can someone tell me what I did wrong and how to fix it?