Operating System - HP-UX
1752790 Members
6343 Online
108789 Solutions
New Discussion юеВ

How to find out disable lv's in vg.

 
Ravi22
Occasional Contributor

How to find out disable lv's in vg.

when u type vgdisplay -v vg02 it is showing that there are two current lvs under vg02 but when we use bdf command it is not showing any lv under vg02.

when we try to delete vg02 using vgremove command it shows that lvs are present under vg02. first delete those lvs but using bdf command no lvs under vg02.

so please tell me to overcome from this problem.
8 REPLIES 8
rariasn
Honored Contributor

Re: How to find out disable lv's in vg.

Hi:

Not all lv are mountable file-system.

Verify the use of thes lv before remove.



lvdisplay /dev/vg02/lvxxxx
lvremove /dev/vg02/lvxxxx
lvremove /dev/vg02/lvyyyy
vgremove vg02

rgs
Bijeesh
Respected Contributor

Re: How to find out disable lv's in vg.

it may be used as raw device.
is there any database using?
Confirm before deleting.
Raj D.
Honored Contributor

Re: How to find out disable lv's in vg.

Ravi,

1. Check with:
# vgdisplay -v vg02 | grep "LV Name"


2. If they are used for raw device they will not show under bdf :
- Check if they are in use:
# cd /dev/vg02
# fuser -u r*

3. If nothing in in use and you want to delte the lvs to reclaim space etc.. you have to delete the LVs first then you can remove the vg.


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
singh sanjeev
Trusted Contributor

Re: How to find out disable lv's in vg.

IF volume is not in use
to remove the VG use :
de-activate the Vg
#vgchange -a n
#vgexport

it will remove all the information and disk can be freed.
Sanjeev Singh
Ravi22
Occasional Contributor

Re: How to find out disable lv's in vg.

HI All,

Thanks to all for you are response.
Bijeesh
Respected Contributor

Re: How to find out disable lv's in vg.

Hi Ravi,
It will be great if you can mention how the problem get rectified.It will be usefull for other members to solve their issues and help to increase the "experience"....!!
Ravi22
Occasional Contributor

Re: How to find out disable lv's in vg.

HI All,
The device files for the lvols are missing, re-create them:

mknod /dev/vg04/lvol1 b 64 0x040001
mknod /dev/vg04/rlvol1 c 64 0x040001

mknod /dev/vg04/lvol2 b 64 0x040002
mknod /dev/vg04/rlvol2 c 64 0x040002


and check with

vgdisplay -v vg04

after using the above commands the lvs are enbale then we use 'lvremove' command.


Thanks for your suggestions.
Ravi22
Occasional Contributor

Re: How to find out disable lv's in vg.

yes