SlowJet
10th March 2010, 10:04 PM
After creating , mounting and reading, umount, a lvm can not be lvremoved without several attemps to get some arbartary code path to work.
lvm lvremove /dev/mappe/vg-lvsnap
can't be removed
logout of root
log back in
same thing - it used to work at this point.
exit the terminal altogether.
open terminal
same thing - had to do this as of a 2 week ago.
in rrot term add extra parms to command
lvm lvremove /dev/mapper/vg_host-lv_snaproot lvroot
Gets message to delete y,n
deleted snaproot
lv lvroot not found - #it is an lv and is the lv the snapshot refers to.
lvroot volgroup ignored - it is not a VG?
SJ
---------- Post added at 02:04 PM CST ---------- Previous post was at 01:29 PM CST ----------
Update LVM2 to a newer version in F14 to see if anything changed.
Works the same and I noticed specifying a VG it will attempt tp remove all LV on the VG. Not so good.
# rpm -Uvh *.rpm
Preparing... ########################################### [100%]
1:device-mapper-libs ########################################### [ 17%]
2:device-mapper-event-lib########################################### [ 33%]
3:device-mapper ########################################### [ 50%]
4:device-mapper-event ########################################### [ 67%]
5:lvm2-libs ########################################### [ 83%]
6:lvm2 ########################################### [100%]
[root@Jovette-14 Download]# cd /
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 -wi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
[root@Jovette-14 /]# lvm lvcreate --size 4G --snapshot --name /dev/vg_jovette14/snaproot /dev/vg_jovette14/lv_root
Logical volume "snaproot" created
[root@Jovette-14 /]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_jovette14-lv_root
66055932 7709904 54990588 13% /
tmpfs 509608 412 509196 1% /dev/shm
/dev/sda1 198337 41347 146750 22% /boot
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 owi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
snaproot vg_jovette14 swi-a- 4.00g lv_root 0.01
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 owi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
snaproot vg_jovette14 swi-a- 4.00g lv_root 0.04
[root@Jovette-14 /]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_jovette14-lv_root
66055932 7709932 54990560 13% /
tmpfs 509608 424 509184 1% /dev/shm
/dev/sda1 198337 41347 146750 22% /boot
[root@Jovette-14 /]# lvm lvremove /dev/mapper/vg_jovette14-snaproot
Can't remove open logical volume "snaproot"
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 owi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
snaproot vg_jovette14 swi-a- 4.00g lv_root 0.07
[root@Jovette-14 /]# uptime
13:56:36 up 3:14, 2 users, load average: 0.34, 0.30, 0.17
[root@Jovette-14 /]# lvm lvremove /dev/mapper/vg_jovette14-snaproot lv_root
Can't remove open logical volume "snaproot"
Volume group "lv_root" not found
[root@Jovette-14 /]# lvm lvremove /dev/mapper/vg_jovette14-snaproot vg_jovette14
Can't remove open logical volume "snaproot"
Can't remove open logical volume "lv_swap"
Do you really want to remove active logical volume lv_bkup? [y/n]: n
Logical volume lv_bkup not removed
Do you really want to remove active logical volume snaproot? [y/n]: y
Logical volume "snaproot" successfully removed
lvm lvremove /dev/mappe/vg-lvsnap
can't be removed
logout of root
log back in
same thing - it used to work at this point.
exit the terminal altogether.
open terminal
same thing - had to do this as of a 2 week ago.
in rrot term add extra parms to command
lvm lvremove /dev/mapper/vg_host-lv_snaproot lvroot
Gets message to delete y,n
deleted snaproot
lv lvroot not found - #it is an lv and is the lv the snapshot refers to.
lvroot volgroup ignored - it is not a VG?
SJ
---------- Post added at 02:04 PM CST ---------- Previous post was at 01:29 PM CST ----------
Update LVM2 to a newer version in F14 to see if anything changed.
Works the same and I noticed specifying a VG it will attempt tp remove all LV on the VG. Not so good.
# rpm -Uvh *.rpm
Preparing... ########################################### [100%]
1:device-mapper-libs ########################################### [ 17%]
2:device-mapper-event-lib########################################### [ 33%]
3:device-mapper ########################################### [ 50%]
4:device-mapper-event ########################################### [ 67%]
5:lvm2-libs ########################################### [ 83%]
6:lvm2 ########################################### [100%]
[root@Jovette-14 Download]# cd /
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 -wi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
[root@Jovette-14 /]# lvm lvcreate --size 4G --snapshot --name /dev/vg_jovette14/snaproot /dev/vg_jovette14/lv_root
Logical volume "snaproot" created
[root@Jovette-14 /]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_jovette14-lv_root
66055932 7709904 54990588 13% /
tmpfs 509608 412 509196 1% /dev/shm
/dev/sda1 198337 41347 146750 22% /boot
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 owi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
snaproot vg_jovette14 swi-a- 4.00g lv_root 0.01
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 owi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
snaproot vg_jovette14 swi-a- 4.00g lv_root 0.04
[root@Jovette-14 /]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_jovette14-lv_root
66055932 7709932 54990560 13% /
tmpfs 509608 424 509184 1% /dev/shm
/dev/sda1 198337 41347 146750 22% /boot
[root@Jovette-14 /]# lvm lvremove /dev/mapper/vg_jovette14-snaproot
Can't remove open logical volume "snaproot"
[root@Jovette-14 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_bkup vg_jovette14 -wi-a- 41.00g
lv_root vg_jovette14 owi-ao 64.00g
lv_swap vg_jovette14 -wi-ao 1.97g
snaproot vg_jovette14 swi-a- 4.00g lv_root 0.07
[root@Jovette-14 /]# uptime
13:56:36 up 3:14, 2 users, load average: 0.34, 0.30, 0.17
[root@Jovette-14 /]# lvm lvremove /dev/mapper/vg_jovette14-snaproot lv_root
Can't remove open logical volume "snaproot"
Volume group "lv_root" not found
[root@Jovette-14 /]# lvm lvremove /dev/mapper/vg_jovette14-snaproot vg_jovette14
Can't remove open logical volume "snaproot"
Can't remove open logical volume "lv_swap"
Do you really want to remove active logical volume lv_bkup? [y/n]: n
Logical volume lv_bkup not removed
Do you really want to remove active logical volume snaproot? [y/n]: y
Logical volume "snaproot" successfully removed