Cannot mount LVM2 snapshot
Hi guys,
I´m not able to mount a lvm2 snapshot.
I searched for related topic in this forum, but I was not able to solve the problem yet :-(
The volume group is XenVG, there is no other volume group on the system (Ubuntu with kernel 3.0.0-13-generic-pae)
I create a snapshot from a running xen VM:
root@node-2:/dev/XenVG# lvcreate -L600M -s -n hvm-snapshot /dev/XenVG/hvm
Logical volume "hvm-snapshot" created
I know that I have to run kpartx on the snapshot image before I can mount it:
root@node-2:/dev/XenVG# kpartx -av /dev/XenVG/hvm-snapshot
add map XenVG-hvm--snapshot (252:16): 0 16773120 linear /dev/mapper/XenVG-hvm--snapshot 2048
This seems to work, but I still cannot mount the snapshot:
root@node-2:/dev/XenVG# mount /dev/XenVG/hvm-snapshot /mnt/foo
mount: /dev/mapper/XenVG-hvm--snapshot is already mounted or /mnt/foo is already in use
/mnt/foo is definitely not mounted...
It seems that the snapshot is still in use, but I have no possibility to stop it somehow:
root@node-2:/dev/XenVG# lvscan
ACTIVE Original '/dev/XenVG/hvm' [8,00 GiB] inherit
ACTIVE Snapshot '/dev/XenVG/hvm-snapshot' [600,00 MiB] inherit
how can I deactivate or suspend it and then mount it?
I cannot even remove it :-(
root@node-2:/dev/XenVG# lvremove /dev/XenVG/hvm-snapshot
Can't remove open logical volume "hvm-snapshot"
I have no control over the snapshot..
Can anyone give me a hint?
Thank you!
Last edited by Biederony; 06-08-2012 at 04:28 AM.
|