Comment 1 for bug 1611042

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote : Re: failed-to-delete-instance-lxc-with-lvm

Some additional information:

1) Trying the command:
sudo nova-rootwrap /etc/nova/rootwrap.conf lvremove -f /dev/stack-volumes-default/9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk
  Logical volume stack-volumes-default/9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk contains a filesystem in use.

2) Trying to unmount the volume:
devdatta@devdatta-nova-trusty-2:/$ sudo umount /dev/stack-volumes-default/9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk
umount: /dev/stack-volumes-default/9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk: not mounted

3) Checking information about logical volumes:
devdatta@devdatta-nova-trusty-2:/$ sudo lvs
  LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
  9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk stack-volumes-default -wi-ao--- 24.00m

*** The attributes (Attr) show that the logical volume is open (the 'o' in ao). ***

4) Checking the mapping of the volume
devdatta@devdatta-nova-trusty-2:/$ ls -ltr /dev/stack-volumes-default/9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk
lrwxrwxrwx 1 root root 7 Aug 8 16:06 /dev/stack-volumes-default/9fe6288f-e4e7-460f-925d-9379ac0f74fa_disk -> ../dm-2

5) Checking if any process is holding a reference to the volume
devdatta@devdatta-nova-trusty-2:/$ sudo lsof | grep dm-2
jbd2/dm-2 11090 root cwd DIR 202,1 4096 2 /
jbd2/dm-2 11090 root rtd DIR 202,1 4096 2 /
jbd2/dm-2 11090 root txt unknown /proc/11090/exe

*** Looks like there is a process (11090) running that is holding handle to the volume. ***