Operating System - HP-UX
1836639 Members
1616 Online
110102 Solutions
New Discussion

Re: can not remove logical volume

 
SOLVED
Go to solution
Marco Varenkamp
Occasional Advisor

can not remove logical volume

Hi all,
I can not remove a logical volume via sam.
the lv is defined as unsused.

the error message is:
The supplied lv number refers to a non-existent logical volume.

vgdisplay looks like that:
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 8811
VGDA 2
PE Size (Mbytes) 4
Total PE 8809
Alloc PE 0
Free PE 8809
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

The lvdisplay looks like that:
--- Logical volumes ---
LV Name /dev/vg01/lv01
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation non-strict
IO Timeout (Seconds) default

can somebody give me a hit, how to remove the lv?
thanks in advance
Marco


3 REPLIES 3
Tom Geudens
Honored Contributor

Re: can not remove logical volume

Hi,
If the logical volume is mounted, first umount the filesystem (and remove the entry from /etc/fstab ... if there is one) :
#umount /filesystem
Then remove the logical volume
#lvremove /dev/vg01/lv01

This is destructive !!!

Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
John Palmer
Honored Contributor

Re: can not remove logical volume

Hi,

You can try:

lvremove -f /dev/vg01/lv01

but if that also returns a similar error then the logical volume doesn't actually exist in the volume group - it's zero size anyway. In that case then you can safely remove the device files:-

rm /dev/vg01/lv01
rm /dev/vg01/rlv01

Regards,
John
Insu Kim
Honored Contributor
Solution

Re: can not remove logical volume

With the output of vgdisplay, I'm able to notice that vg00 has only one logical volume named lv01.
My suggestion is to export vg01 and create a volume group again.

# vgchange -a n vg01
# vgexport /dev/vg01

Hope this helps,
Never say "no" first.