Archive for the ‘LVM’ Category

In some version of RHEL and Suse Linux LVM2 won’t remove or deactivate logical volume or volume groups due to their being open.

# lvremove /dev/rootvg/lvswap
  Can’t remove open logical volume “lvswap”

Use dmsetup command to check the status of lvm

# dmsetup info -c rootvg-lvswap
Name               Maj Min Stat   Open Targ Event  UUID
rootvg-lvswap   253   8    L–w    1    1      0 Dw0QIgVGOulDwWsiFZMD1Pi7JLQWcNnruaCRo1f8OxdYQpfZYiYigBp1Ccqx1VRa


#man dmsetup

dmsetup is a low level logical volume management

dmsetup manages logical devices that use the device-mapper driver.


As you can see from the above command Open status is equal to 1. Use the following command to remove the dm table entry .

#dmsetup remove rootvg-lvswap2

Try this one more time now

# lvremove /dev/rootvg/lvswap2
  Logical volume “lvswap2” successfully removed

Read Full Post »

Just Steps

1.  Boot from SUSE Linux Install CD
2.  Select Rescue Mode
3.  Login as “root” to rescue mode (no password)
4.  Manually mount your non-LVM disks   
    a.  mkdir /mnt/root
    b.  mount /dev/sda1 /mnt/root/boot

5.  Manually mount your LVM stuff:
    b.  vgscan
    c.  vgchange -a -y rootvg
    d.  mount /dev/rootvg/lvroot /mnt/root/boot
    d.  mount /dev/rootvg/lvusr /mnt/root/boot/usr
    d.  mount /dev/rootvg/lvopt /mnt/root/boot/opt
    d.  mount /dev/rootvg/lvhome /mnt/root/boot/home
    d.  mount /dev/rootvg/lvvar /mnt/root/boot/var

** You can now update your configuration to recover your system from what 
   ever you did to get to this point..

Read Full Post »