Operating System - HP-UX
1835210 Members
2113 Online
110077 Solutions
New Discussion

Can't remove Logical Volume

 
Tom Spence_1
Regular Advisor

Can't remove Logical Volume

I couldn't remove the LV and got error message... Here is:

lvremove -f /dev/vgdata2/lvdata2
lvremove: Couldn't delete logical volume "/dev/vgdata2/lvdata2":
No such device or address
Volume Group configuration for /dev/vgdata2 has been saved in /etc/lvmconf/vgdat
a2.conf

Thanks for your help...
Thinking Snow!
9 REPLIES 9
John Poff
Honored Contributor

Re: Can't remove Logical Volume

Hi Thomas,

Do you still see an entry for the lvdata2 logical volume when you do a 'vgdisplay -v'? Are there entries for that LV when you do 'ls -l /dev/vgdata2'?

JP
Patrick Chim
Trusted Contributor

Re: Can't remove Logical Volume

Hi,

What is the result when you type
'vgdisplay -v vgdata2' ?

Have you created this LV before but with error and so this LV did not exist ?

Regards,
Patrick
Elif Gius
Valued Contributor

Re: Can't remove Logical Volume

Hi,
can you do a lvdisplay /dev/vgdata2/lvdata2 ? What does vgdisplay -v /dev/vgdata2 say ???
Try "ll /dev/vgdata2". Look if the lvdata2 and rlvdata2 still exists.


Tom Spence_1
Regular Advisor

Re: Can't remove Logical Volume

John Poff,

$ ls -l /dev/vgdata2
total 0
crw-r--r-- 1 root sys 64 0x0a0000 Mar 25 1999 group
brw-r----- 1 root sys 64 0x0a0001 Jul 29 17:55 lvdata2
crw-r----- 1 root sys 64 0x0a0001 Aug 27 10:56 rlvdata2

Then should I remove /dev/vgdata2???

Tom
Thinking Snow!
Dietmar Konermann
Honored Contributor

Re: Can't remove Logical Volume

Hi!

Obviously the kernel does not know anything about an active lvol with that minor number.

Check with vgdisplay if "Cur LV" matches "Open LV". According to your ll listing both should be "1". If "Cur LV" is "0" while lvdisplay shows the size "0" you can simply remove the device files of that lvol. After that "Cur LV" and "Open LV" should both be "0" indicating an empty VG w/o lvols.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Tom Spence_1
Regular Advisor

Re: Can't remove Logical Volume

Hi Dietmar,

Glad to have you... Got the report, here is:

#vgdisplay /dev/vgdata2
--- Volume groups ---
VG Name /dev/vgdata2
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 16384
VGDA 2
PE Size (Mbytes) 4
Total PE 323
Alloc PE 322
Free PE 1
Total PVG 1

Both are 1... Mean I can't remove /dev/vgdata2, corrrect?

Tom
Thinking Snow!
Dietmar Konermann
Honored Contributor

Re: Can't remove Logical Volume

Hi, Thomas!

What's the result of lvdisplay? Does it show "Current LE" of 322?


Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Tom Spence_1
Regular Advisor

Re: Can't remove Logical Volume

Dietmar,

Here is:

#lvdisplay /dev/vgdata2/lvdata2
--- Logical volumes ---
LV Name /dev/vgdata2/lvdata2
VG Name /dev/vgdata2
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1288
Current LE 322
Allocated PE 322
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict

Tom
Thinking Snow!
Dietmar Konermann
Honored Contributor

Re: Can't remove Logical Volume

Hi, Tom!

That's really a weird behaviour. On one hand LVM presents us valid lvol information, on the other hand it indicates ENODEV when trying to remove it.

Are you able to deactivate the VG? If all you want to do is removing the last lvol then probably re-creating the VG after vgexport'ing it could be the easiest solution.

Sorry, no other ideas from my side. Okay, reboot would probably clear the situation also.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)