Operating System - HP-UX
1833497 Members
2728 Online
110052 Solutions
New Discussion

cur lv not equal to open lv, not mapping

 
SOLVED
Go to solution
Matthew_50
Valued Contributor

cur lv not equal to open lv, not mapping

Though there's no any lv within /dev/vg01, but when i try to use`vgremove vg01`, the system replies as follows.

vgremove: Volume group "vg01" still contains a logical volume(s).
vgremove: Couldn't remove volume group "vg01".

when I use sam, -> Disk and File system -> volume groups -> vg01 ->
physical volumes=3, logical volume=1

but when i look into 'more information', there's no any logical volumes.

I also notice that the cur lv not equal to open lv, when I execute vgdisplay -v vg01.
result show as above.

--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 0
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 2170
VGDA 6
PE Size (Mbytes) 4
Total PE 6510
Alloc PE 4340
Free PE 2170
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


--- Physical volumes ---
PV Name /dev/dsk/c0t2d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On

PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On

PV Name /dev/dsk/c2t3d0
PV Name /dev/dsk/c0t3d0 Alternate Link
PV Status available
Total PE 2170
Free PE 2170
Autoswitch On


don't have any clue to remove vg01, how should i do ?

7 REPLIES 7
Stefan Farrelly
Honored Contributor
Solution

Re: cur lv not equal to open lv, not mapping

Just use vgexport instead of vgremove. This ignores any and all lvols and simlpy deletes the vg.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Dagmar Boelen
Frequent Advisor

Re: cur lv not equal to open lv, not mapping

Did you check you /etc/lvmtab-file?
Massimo Bianchi
Honored Contributor

Re: cur lv not equal to open lv, not mapping

Hi,
what does

ll /dev/vg01/*

reports ?

Is there any other vg with the same minor ?

Massimo
Matthew_50
Valued Contributor

Re: cur lv not equal to open lv, not mapping

here's the /etc/lvmtab info

/dev/vg01
>[B2
/dev/dsk/c0t2d0
/dev/dsk/c0t3d0
/dev/dsk/c2t2d0
/dev/dsk/c2t3d0
Matthew_50
Valued Contributor

Re: cur lv not equal to open lv, not mapping

when execute ll /dev/vg01

there's only a `group` file

crw-rw-rw- 1 root sys 64 0x010000 Jul 8 22:01 group
T G Manikandan
Honored Contributor

Re: cur lv not equal to open lv, not mapping

check whether you have defined any swap device on vg01.
Matthew_50
Valued Contributor

Re: cur lv not equal to open lv, not mapping

finally, it's removed.


cd /dev/vg01
mknod lvol1 b 64 0x010001
mknod rlvol1 c 64 0x010001

then, lvremove /dev/vg01/lvol1
now, the cur lv and open lv count are the same.
to release 'Alloc PE'

vgexport vg01
vgremove vg01
cp /etc/lvmtab /etc/lvmtab.old.2
vgscan -v

mkdir /vg01
mknod /dev/vg01 /group c 64 0x010000

pvcreate -f /dev/rdsk/c0t2d0
pvcreate -f /dev/rdsk/c2t2d0
pvcreate -f /dev/rdsk/c2t3d0

vgcreate /dev/vg01 /dev/dsk/c0t2d0 /dev/dsk/c2t2d0 /dev/dsk/c2t3d0

done.