Can't remove a logical volume with lvremove (576 Views)
Reply
Regular Advisor
Brent DeGennaro
Posts: 240
Registered: ‎07-12-2001
Message 1 of 13 (576 Views)
Accepted Solution

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?
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 2 of 13 (576 Views)

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
Regular Advisor
Brent DeGennaro
Posts: 240
Registered: ‎07-12-2001
Message 3 of 13 (576 Views)

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
Acclaimed Contributor
Torsten.
Posts: 23,451
Registered: ‎10-02-2001
Message 4 of 13 (576 Views)

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!   
Acclaimed Contributor
Torsten.
Posts: 23,451
Registered: ‎10-02-2001
Message 5 of 13 (576 Views)

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!   
Regular Advisor
Brent DeGennaro
Posts: 240
Registered: ‎07-12-2001
Message 6 of 13 (576 Views)

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.
Valued Contributor
Mark S Meadows
Posts: 94
Registered: ‎10-31-2007
Message 7 of 13 (576 Views)

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!).
Acclaimed Contributor
Torsten.
Posts: 23,451
Registered: ‎10-02-2001
Message 8 of 13 (576 Views)

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!   
Regular Advisor
Brent DeGennaro
Posts: 240
Registered: ‎07-12-2001
Message 9 of 13 (576 Views)

Re: Can't remove a logical volume with lvremove

Should the removal be done with rmsf?
Acclaimed Contributor
Torsten.
Posts: 23,451
Registered: ‎10-02-2001
Message 10 of 13 (576 Views)

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!   
Acclaimed Contributor
Torsten.
Posts: 23,451
Registered: ‎10-02-2001
Message 11 of 13 (575 Views)

Re: Can't remove a logical volume with lvremove

VG Status available, exclusive

It's a cluster, right?

How does

/dev/vgcm3

looks like on the other node???

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!   
Acclaimed Contributor
Torsten.
Posts: 23,451
Registered: ‎10-02-2001
Message 12 of 13 (575 Views)

Re: Can't remove a logical volume with lvremove

Sorry for so many replies ... but I need to quote myself:

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

I think I know it now.

Somebody has removed the LVOL from the other node without importing the changed VG again on this node. For this reason the files on this node don't match the current VG.

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!   
Regular Advisor
Brent DeGennaro
Posts: 240
Registered: ‎07-12-2001
Message 13 of 13 (575 Views)

Re: Can't remove a logical volume with lvremove

rmsf /dev/vgcm3/homjun and /dev/vgcm3/rhomjun fixed the problem.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.