Hi

found this on
http://www.idevelopment.info/data/Unix/Linux/LINUX_ManagingPhysicalLogicalVolumes.shtml
:



*Delete Physical / Logical Volumes*

Before going into the details of how to drop all of the physical and logical
volumes created in this article, it is very common to only want to remove a
Logical Volume from a Volume Group. Let's say we no longer needed lvol15. We
can remove it and place its PE's back in the empty pool for the Volume
Group. First, unmounting its filesystem (if it is mounted). Next, deactive
it with lvchange and finally delete it with lvremove. Here is an example
that removes the lvol15:

  # *lvchange -a n /dev/pv1/lvol15*

  # *lvremove /dev/pv1/lvol15*
  lvremove -- do you really want to remove "/dev/pv1/lvol15"? [y/n]: *y*
  lvremove -- doing automatic backup of volume group "pv1"
  lvremove -- logical volume "/dev/pv1/lvol15" successfully removed

 Now, it you would like to delete all physical and logical volumes created
in this article. In this example, we no longer need the /dev/pv1 Physical
Volume.

*lvremove -f /dev/pv1/lvol1
lvremove -f /dev/pv1/lvol2
lvremove -f /dev/pv1/lvol3
lvremove -f /dev/pv1/lvol4
lvremove -f /dev/pv1/lvol5
lvremove -f /dev/pv1/lvol6
lvremove -f /dev/pv1/lvol7
lvremove -f /dev/pv1/lvol8
lvremove -f /dev/pv1/lvol9
lvremove -f /dev/pv1/lvol10
lvremove -f /dev/pv1/lvol11
lvremove -f /dev/pv1/lvol12
lvremove -f /dev/pv1/lvol13
lvremove -f /dev/pv1/lvol14
lvremove -f /dev/pv1/lvol15
lvremove -f /dev/pv1/lvol16
lvremove -f /dev/pv1/lvol17
lvremove -f /dev/pv1/lvol18
lvremove -f /dev/pv1/lvol19
lvremove -f /dev/pv1/lvol20
lvremove -f /dev/pv1/lvol21
lvremove -f /dev/pv1/lvol22
lvremove -f /dev/pv1/lvol23
lvremove -f /dev/pv1/lvol24
lvremove -f /dev/pv1/lvol25
lvremove -f /dev/pv1/lvol26

vgchange -a n /dev/pv1

vgremove /dev/pv1*



So maybe the lvchange is missing?
Try lvremove also with the -f (force) option.


greetings,
vitaminx



2009/6/27 Klaus Pieper <[email protected]>

> try:
>>
>> swapoff
>> remove the LV
>> swapon
>>
>
>
> groucho:~# swapoff -a
> groucho:~# lvremove -fv /dev/vg01/swap
>    Using logical volume(s) on command line
>  Can't remove open logical volume "swap"
>
>
> --
> To UNSUBSCRIBE, email to [email protected] with a
> subject of "unsubscribe". Trouble? Contact [email protected]
>
>


-- 
www ... http://www.callistix.net/
mail ... [email protected]
irc ... #chezpaeule @ euirc
mud ... vitaminx @ aardmud

Reply via email to