Operating System - HP-UX
1824000 Members
4159 Online
109667 Solutions
New Discussion юеВ

Re: Fix/Clean VG00 with missing PV's

 
Alzhy
Honored Contributor

Fix/Clean VG00 with missing PV's

VG00 used to have 3 mirrors (3-way).. System was reconfigured as a vPar so the 3rd Mirror dropped from the config (and will serve as bootdisk of new vPar). We did not use lvreduce, vgreduce prior to booting the old nPar (which is now a vPar) - now with just the 2 disks.

How do I clean up? Already I did an lvreduce -m 1 for each LVOL. And attempted to do a "vgreduce -f /dev/vg00" - to do avail...

Help..!
Hakuna Matata.
7 REPLIES 7
Jeff Schussele
Honored Contributor

Re: Fix/Clean VG00 with missing PV's

Hi Nelson,

Move or delete /etc/lvmtab & run vgscan -av to see if that cleans it up. I would have thought vgreduce -f would have done it, but...

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sridhar Bhaskarla
Honored Contributor

Re: Fix/Clean VG00 with missing PV's

Nelson,

Check your last message where I mentioned about cleaning up the original system also if you wanted to use any of these procedures. It's not difficult but it is more easy if you can add an extra disk in place of the missing mirror. Once the disk is added do

#vgcfgrestore -n vg00 /dev/rdsk/cxtydz
#vgchange -a y vg00

This will try to sync the mirrors. Once the mirrors are sync'ed, you can do a 'lvreduce -m 1 /dev/vg00/lvol1 /dev/dsk/cxtydz'. Repeat this for all the logical volumes. Once the LVs are reduce, do a 'vgreduce vg00 /dev/dsk/cxtydz' and the things will be clean. You can take out that disk if you want to.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Fix/Clean VG00 with missing PV's

Nelson,

When you are done with Sri's instructions a good test of emptiness would be the pvcreate command.

pvcreate -f /dev/rdsk/c1t1d0

If it works,you have a clean disk. In practice , there is still data structures on the disk.

If its important to clean the disk, take the additional steps of creating a dummy volume group,logical volume and empty filesystem on the entire disk. This will leave nothing behind.

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
Alzhy
Honored Contributor

Re: Fix/Clean VG00 with missing PV's

None of the solutions worked. We even had HP. The only way out of this was I took a GOlden Image of this vPar, installed the image and ignited the Vpar.

We have another vpar exhibiting this behaviour. Instead of doing an Ignite re-install of its image, I am thinking of just doing a make_tape_recovery backup and recovering odd the tape (of course it must be an nPar boot and restored to the vPar's boot path.

Do you think this will work as well as an image re-ignite?

Hakuna Matata.
Sridhar Bhaskarla
Honored Contributor

Re: Fix/Clean VG00 with missing PV's

Hi Nelson,

I wonder why it didn't work. If you added another disk in place of 'taken out' disk, then the process is as simple as 'replacing a mirror disk'.

There is one another way but will take a long time. That's why I didn't mention it in my previous message. You can manually reduce the mirrors on "lost disk" on the system and then use vgreduce -f to get the disk out of the VG.

To do it, you will have to use -k option of lvreduce. Run

lvreduce -m 0 -k /dev/vg01/lvol1 /dev/dsk/cxtydz

where cxtydz is the lost disk.

Repeat the above for all the lvols. Once it is done, do

vgreduce -f vg00.

That should get the bad disk out making your vg00 clean.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Alzhy
Honored Contributor

Re: Fix/Clean VG00 with missing PV's

Sridhar Thanks.. will try.

In the meantime I attach some info on where we are...

Hakuna Matata.
Sridhar Bhaskarla
Honored Contributor

Re: Fix/Clean VG00 with missing PV's

Hi,

Looks to me like you already ran 'vgscan' command. That's isn't a good command in this circumstance. vgscan is to recreate lvmtab if it is corrupted or by mistake if it is deleted or if there is a mismatch of the PVs. Sometime it can be used to identify the possible PVs ( I run it only preview option) in a volume group if that information is lost. In your case, neither is the case. I rarely use vgscan on my systems.

I would still suggest you can do the 'restore mirror' process. Put the disk, run the following.

#vgcfgrestore -n vg00 /dev/rdsk/cxtydz
#mv /etc/lvmtab /etc/lvmtab.prev
#vgscan -v

This 'vgscan' should identify the new disk as it has the vg00 information on it and put it back in /etc/lvmtab. Then do

#vgchange -a y vg00

This may take a long time as it will try to sync the mirrors.

Once the mirrors are sync'ed, you can reduce the mirrors and take out the disk.

-Sri



You may be disappointed if you fail, but you are doomed if you don't try