Operating System - HP-UX
1752814 Members
5914 Online
108789 Solutions
New Discussion юеВ

Re: Can't remove a logical volume with lvremove

 
SOLVED
Go to solution
Brent DeGennaro
Regular Advisor

Can't remove a logical volume with lvremove

# lvremove /dev/vgcm3/homjun
Current path "/dev/dsk/c7t9d0" is an alternate link, skip.
lvremove: Couldn't delete logical volume "/dev/vgcm3/homjun":
The supplied lv number refers to a non-existent logical volume.
Volume Group configuration for /dev/vgcm3 has been saved in /etc/lvmconf/vgcm3.conf



# vgdisplay -v /dev/vgcm3
--- Volume groups ---
VG Name /dev/vgcm3
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 3
Open LV 4
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4331
VGDA 2
PE Size (Mbytes) 4
Total PE 3472
Alloc PE 359
Free PE 3113
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vgcm3/anlg
LV Status available/syncd
LV Size (Mbytes) 4
Current LE 1
Allocated PE 1
Used PV 1

LV Name /dev/vgcm3/94coun
LV Status available/syncd
LV Size (Mbytes) 1400
Current LE 350
Allocated PE 350
Used PV 1

LV Name /dev/vgcm3/homjun
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0

LV Name /dev/vgcm3/apa13
LV Status available/syncd
LV Size (Mbytes) 32
Current LE 8
Allocated PE 8
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c4t9d0
PV Name /dev/dsk/c7t9d0 Alternate Link
PV Status available
Total PE 3472
Free PE 3113
Autoswitch On


# cat /etc/lvmconf/vgcm3.map
VGID 77f1d47e3c1f6e9a
10 anlg
157 94coun
207 homjun
1 apa13


# lvdisplay -v /dev/vgcm3/homjun
--- Logical volumes ---
LV Name /dev/vgcm3/homjun
VG Name /dev/vgcm3
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


# ll /dev/vgcm3
total 0
brw------- 1 root sys 64 0x10009d May 17 2007 94coun
brw------- 1 root sys 64 0x10000a May 17 2007 anlg
brw------- 1 root sys 64 0x100001 May 17 2007 apa13
crw-r--r-- 1 root sys 64 0x100000 May 17 2007 group
brw------- 1 root sys 64 0x1000cf May 17 2007 homjun
crw------- 1 root sys 64 0x10009d May 17 2007 r94coun
crw------- 1 root sys 64 0x10000a May 17 2007 ranlg
crw------- 1 root sys 64 0x100001 May 17 2007 rapa13
crw------- 1 root sys 64 0x1000cf May 17 2007 rhomjun



Any ideas?
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: Can't remove a logical volume with lvremove

Shalom,

Try the lvremove on the primary path, not the alternate path.

Get a diagnostic code.

lvremove logical_volme_name
rc=$?
echo $rc

Lets see why this happens on a lower level.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Brent DeGennaro
Regular Advisor

Re: Can't remove a logical volume with lvremove

# lvremove -f /dev/vgcm3/homjun
Current path "/dev/dsk/c7t9d0" is an alternate link, skip.
lvremove: Couldn't delete logical volume "/dev/vgcm3/homjun":
The supplied lv number refers to a non-existent logical volume.
Volume Group configuration for /dev/vgcm3 has been saved in /etc/lvmconf/vgcm3.conf
# rc=$?
# echo $rc
2
Torsten.
Acclaimed Contributor

Re: Can't remove a logical volume with lvremove

To be honest I never tryed to remove an zero size LVOL - this size may be the reason for this. I would try to extend to at least 1 LE and after this remove it. IMHO this should work.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: Can't remove a logical volume with lvremove

I think this indicates a problem:

Cur LV 3
Open LV 4

Does this change after extending?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Brent DeGennaro
Regular Advisor

Re: Can't remove a logical volume with lvremove

# lvextend -L 4 /dev/vgcm3/homjun
lvextend: Logical volume "/dev/vgcm3/homjun" could not be changed:
The supplied lv number refers to a non-existent logical volume.
Mark S Meadows
Valued Contributor

Re: Can't remove a logical volume with lvremove

Hi Brent,

Should Torsten's suggestion fail to remove the lv then I would try again via sam and see if this succeeds in removing it.

Regards,

Mark
Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).
Torsten.
Acclaimed Contributor
Solution

Re: Can't remove a logical volume with lvremove

IMHO it should be enough to simply delete

rhomjun
and
homjun

in

/dev/vgcm3


After this check again with vgdisplay.

Now open lv must be = cur lv.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Brent DeGennaro
Regular Advisor

Re: Can't remove a logical volume with lvremove

Should the removal be done with rmsf?
Torsten.
Acclaimed Contributor

Re: Can't remove a logical volume with lvremove

No, a simple "rm".

I don't know what was happen before, but now you have this scenario.

I get **exactly** the same if I simply create (with mknod) the lvol_X and rlvol_X files in one of my VGs.

"rm" this away and everything is normal again.

It's up to you ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!