Operating System - HP-UX
1835245 Members
2231 Online
110078 Solutions
New Discussion

Re: Cannot remove logical volume

 

Cannot remove logical volume

The server is running hpux 11.

I am trying to remove a logical volume but get the following message.

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

I then looked at the /dev/vg_misc directory and saw
brw-rw-rw- 1 root sys 64 0x020011 Jun 13 11:59 temp_dir
crw-rw-rw- 1 root sys 64 0x020011 Jun 13 12:00 rtemp_dir
brw-r----- 1 root sys 64 0x020011 Jan 29 2002 8.1.6
crw-r----- 1 root sys 64 0x020011 Jan 29 2002 r8.1.6

I saw the problem (the minor numbers where the same) so I removed the two files for temp_dir and recreated them with a different minor number as follows.

brw-r----- 1 root sys 64 0x020011 Jan 29 2002 8.1.6
crw-r----- 1 root sys 64 0x020011 Jan 29 2002 r8.1.6
brw-rw-rw- 1 root sys 64 0x0200ff Aug 6 11:59 temp_dir
crw-rw-rw- 1 root sys 64 0x0200ff Aug 6 12:00 rtemp_dir


This did not help as I cannot still remove the logical volume. Any ideas?
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Cannot remove logical volume

Looks to me like you have pvlinks active, two paths to the same disk, probably through two different scsi paths.

Also, you might want to see if there really is a logical volume.

lvdisplay lvolname

What do you see?

Just because the file is there doesn't mean its there.

I'd take a backup of the system with make_tape_recovery use sam disk area and list all logical volumes.

Then you may manually rm the device driver files if you are confident anything actually needs to be done.

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
Marco Santerre
Honored Contributor

Re: Cannot remove logical volume

I'm not sure if you actually have a problem with temp_dir as well, but if that is the case why don't you just simply remove the whole VG and re-create it (if you can naturally) by vgexporting the whole thing. Plus since temp_dir seems to be the newest of the two filesystems, it probably clobbered 8.1.6 in vg_misc.conf, therefore, it would think that it simply doesn't exist anymore.
Cooperation is doing with a smile what you have to do anyhow.
Massimo Bianchi
Honored Contributor

Re: Cannot remove logical volume

Can you post a "vgdisplay -v vg_misc" ?

I suspect some other missing stuff.

Are you able to mount the temp_dir logical volume ?

Maybe a "vgreduce -f vg_misc" could help...
Massimo

Re: Cannot remove logical volume

LVdisplay outputs the following.


Name /dev/vg_misc/temp_dir
VG Name /dev/vg_misc
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

So it does exist. It is just 0 size. Also sam does not remove the logical volume.
Marco Santerre
Honored Contributor

Re: Cannot remove logical volume

Yes, temp_dir will exist, but I doubt that 8.1.6 will anymore. The fact that you had the same minor numbers for temp_dir and 8.1.6, chances are that your 8.1.6 LV got clobbered in the LVM config and that's why it doesn't find it anymore.
Cooperation is doing with a smile what you have to do anyhow.
Tim Adamson_1
Honored Contributor

Re: Cannot remove logical volume

Hi,

If LVM reported the logical volume was non existant, why not just remove the device fles from /dev/vg_misc manually. After all the logical volume doesn't exist.

Tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.

Re: Cannot remove logical volume

 
RolandH
Honored Contributor

Re: Cannot remove logical volume

Hi Walther,

1)unmount all filesystem from that volumegroup.
2) deactivate the volumegroup vgchange -a n /dev/vg_misc
3) export the volumegroup vgexport /dev/vg_misc
4) mkdir /dev/vg_misc
5) mknod /dev/vg_misc/group c 64 0x##0000
## = highest number +1 (ll /dev/*/group)
6) vgimport /dev/vg_misc < all discs belonging to that vg >
7) ll /dev/vg_misc/*
now you see all lvols in that vg and we have a clean state. If you want you can now rename the lvols ( ie: lvol1/rlvol1 --> 8.1.6/r8.1.6 if you are sure the first lvol is that oracle lvol)
8) activate the volumegroup vgchange -a y /dev/vg_misc
9) remove now your lvol what you not need with lvremove


HTH
Roland
Sometimes you lose and sometimes the others win