System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

My junior Deleted vdisk without removng LV

 
SOLVED
Go to solution
chindi
Respected Contributor

My junior Deleted vdisk without removng LV

Hi guys,

I wanted to remove a vdisk from my setup...
one of my junior removed the vdisk just ny unmounting the lvol..
nw i would like to remove all traces ..of that vg...i eman lvol and vg....
can i just remove the group files and lvol...???

hpux 11i v2...6600..
strage eva 4k....
13 REPLIES
Johnson Punniyalingam
Honored Contributor

Re: My junior Deleted vdisk without removng LV

no clear information

>>one of my junior removed the vdisk just ny unmounting the lvol..
nw i would like to remove all traces ..of that vg<
traces meaning ? -> you want to know procedure to remove volume group ?

>>My junior Deleted vdisk without removng LV<<

can do vgdisplay -v

don't you see any error from "syslog"
Problems are common to all, but attitude makes the difference

Re: My junior Deleted vdisk without removng LV

vgexport

should do it...

You'll be stuck with the stale device special files and NO_HW entries in ioscan until your next reboot, but they cause no harm.

HTH

Duncan

HTH

Duncan
chindi
Respected Contributor

Re: My junior Deleted vdisk without removng LV

Hi John,

root #/ >vgdisplay -v vg_spcb_archive
--- Volume groups ---
VG Name /dev/vg_spcb_archive
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 255
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 32
Total PE 639
Alloc PE 639
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg_spcb_archive/lvol1
LV Status available/syncd
LV Size (Mbytes) 20448
Current LE 639
Allocated PE 639
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c1t3d4
PV Name /dev/dsk/c3t3d4 Alternate Link
PV Name /dev/dsk/c5t3d4 Alternate Link
PV Name /dev/dsk/c7t3d4 Alternate Link
PV Name /dev/dsk/c11t3d4 Alternate Link
PV Name /dev/dsk/c13t3d4 Alternate Link
PV Name /dev/dsk/c15t3d4 Alternate Link
PV Name /dev/dsk/c17t3d4 Alternate Link
PV Status unavailable
Total PE 639
Free PE 0
Autoswitch On
Proactive Polling On



Nw i would like to remove this vg and lv traces....

ll /dev/*/group gives..
crw-r--r-- 1 root sys 64 0x960000 Sep 15 12:02 /dev/vg_spcb_archive/group

chindi
Respected Contributor

Re: My junior Deleted vdisk without removng LV

hi Duncan,


root #/ >vgexport vg_spcb_archive
vgexport: Volume group "vg_spcb_archive" is still active.
vgexport: Couldn't export volume group "vg_spcb_archive".
root #/ >vgchange -a n vg_spcb_archive
vgchange: Couldn't deactivate volume group "vg_spcb_archive":
Device busy
R.K. #
Honored Contributor

Re: My junior Deleted vdisk without removng LV

Hi Chindi,

Unmount /dev/vg_spcb_archive/lvol1
Then deactivate VG
Then do vgexport

Regds..
Don't fix what ain't broke
chindi
Respected Contributor

Re: My junior Deleted vdisk without removng LV

Hii R.K. ,

Its already unmounted..
Kapil Jha
Honored Contributor

Re: My junior Deleted vdisk without removng LV

how did he unmounted.
Are you sure its cleanely unmounted.

BR,
Kapil+
I am in this small bowl, I wane see the real world......

Re: My junior Deleted vdisk without removng LV

R.K.,

> Unmount /dev/vg_spcb_archive/lvol1


We unmount _filesystems_ not devices (and as chindi pointed out he already did that...)

chindi,

I fear in this position your only hope is to reconstruct the lvmtab:

mv /etc/lvmtab /etc/lvmtab.old
vgscan -v

Unfortunately if you have a _lot_ of LUNs presented from the EVA this will result in the primary paths for each LUN now being all through the same controller, which could mean a small IO performance hit and will need a lot of mucking around with vgreduce/vgextend to fix... how many EVA LUNs do you have on this system?? Do you have a copy of evainfo?

HTH

Duncan

HTH

Duncan
chindi
Respected Contributor

Re: My junior Deleted vdisk without removng LV

Hi,


yaa m sure...itss cleanly unmounted...
chindi
Respected Contributor

Re: My junior Deleted vdisk without removng LV

Hi Duncan,

I have 50 lun's presented to this system...
Kapil Jha
Honored Contributor

Re: My junior Deleted vdisk without removng LV

do you have lvol device file
if yes try to remove lv!!

if nothing is happening try to mount it back and umount
else try to forcefully umount it with vxumount

and then deactivate the vg and export it.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Solution

Re: My junior Deleted vdisk without removng LV

khapil jha...

it's cleanly unmounted - I'm guessing the junior forgot to run "vgchange -a n" before removing the vdisk...

chindi,

50 LUNs - that's a bummer... To be honest I'd be tempted to just leave it as it is until the next reboot... if you really want to fix it now:


1. Run vgdisplay -v on every VG to look at what the primary/alternate paths are to each LUN - you'll need to save this output somewhere to refer to later.

2. Now run the vgscan:

mv /etc/lvmtab /etc/lvmtab.old
vgscan -v

3. Now use vgdisplay -v to look at each VG in turn - you'll see all the primary/alternate paths have been switched around with everything now going down the same path.

4. Now _carefully_ use vgreduce/vgextend to remove the incorrect primary paths out & then back in to the VG - you'll see the next alternate path in the list becoming the new primary path... you are aiming to get the vgdisplay output to look like it did before...

That's a lot of work! I'd be tempted just to leave the whole thing until you can reboot - then you'll be able to remove the (now inactive) VG using vgexport as I originally indicated.

HTH

Duncan

HTH

Duncan
chindi
Respected Contributor

Re: My junior Deleted vdisk without removng LV

Hi Duncan,

Thanx for the explaination, i think i will wait for the next reboot.....


Regards,
Chindi .