Operating System - HP-UX
1747988 Members
4686 Online
108756 Solutions
New Discussion

Re: Issues with vg00 and unused replaced disk in volume group

 
Sean M.
Advisor

Issues with vg00 and unused replaced disk in volume group

I've looked through some posts, but haven't found anything exactly matching what I am running across today.  The short of it is that all logical volumes in vg00 are on a raided volume.  However the previous administrators of this server added two, non-raided disks, into vg00.  Last week a disk failure occured on one of those non-raided disks and it was replaced before I could remove it out of the VG.  I think I have the steps for this straight, but want to confirm since this is a production server.

 

In the attached file, disk40 is the disk that went bad, disk3 is the new disk.

 

I'm assuming what I need to do is:

pvreduce /dev/vg00 /dev/disk/disk40 (-f if it doesn't work)

vgcfgrestore -n /dev/vg00 /dev/disk/disk3 (-R if it doesn't work)

vgextend /dev/vg00 /dev/disk/disk3

 

Is there any other steps I might be missing, or issues I will run into?  I've also been thinking about just removing the non-raided volumes from vg00, but I need to ensure the server will still boot properly.

8 REPLIES 8
Emil Velez_2
Trusted Contributor

Re: Issues with vg00 and unused replaced disk in volume group

look for a hp whitepaper "when good disks go bad"

it provides cookbooks for many scenarios
Emil Velez
Instructor Storage, Servers, HP-UX and Partner Courses
Hewlett Packard Enterprise Education Services
Ask me about training on StoreServ (3PAR) StoreOnce, StoreEasy, StoreAll, StoreVirtual, HP-UX, ServiceGuard and HPE Partner Ready Certification Training

internet: Linkedin: http://www.linkedin.com/in/emilvelez

HPE Master ASE Server Solutions Architect V3
HPE Master ASE Storage Solutions Architect V2
HP UNIX Certified (ASE HPUX 11iv3 Administration V1)
Certified HPE Instructor
HPE Product Certified - OneView [2016]
HP Sales Certified -Servers, Converged Systems and Services [2015]
HPE Product Certified - Converged Solutions [2017]
chris huys_4
Honored Contributor

Re: Issues with vg00 and unused replaced disk in volume group

Hi Sean,

 

That procedure for sure will not work. (pvreduce doesnt exist, its vgreduce that exists as command and you cant vgreduce the disk40 before you do the vgcfgrestore)

 

And I wouldnt also have allowed someone to hardware replace a defective bootdisk, before you could have done the necessary commands to remove the problem disk out of the lvm configuration. 

 

Interesting that vgdisplay -v /dev/vg00 doesnt give any "real" output. As its not the bootdisk, i.e. disk39_p2, that went defective, I would still have expected full output.

 

The vgcfgrestore command also is not correct. I think you need to do something like putting the lvm metadata contents of previous disk40 on to new replacement disk disk3.

But that wouldnt be easy with disk40 still part of vg00.

 

In short get your ignite backup ready and restore that. ;)

 

Best Regards,

Chris

 

taylor06
Occasional Advisor

Re: Issues with vg00 and unused replaced disk in volume group

Hi all,

 

first check the lvdisplay of the lvols in vg00, and check for any stale le's in lvols. Since it is a unused disk their should not be any lvols.

do vgreduce -f vg00

do vgextend vg00 pvname

 

it should work, im not that sure.......

taylor06
Occasional Advisor

Re: Issues with vg00 and unused replaced disk in volume group

or else boot it in lvm maintainence mode do

 

vgexport -p -s -v -m /tmp/vg00.map vg00

vgexport vg00

vgimport vg00  /dev/disk/disk39_p2 /dev/disk/disk41

vgchange -a y vg00

 

currrent and actual pv varies

 

 then do vgreduce -f vg00

 

Sean M.
Advisor

Re: Issues with vg00 and unused replaced disk in volume group

Yeah unfortunately I was out the day the disk was replaced and the HP engineer didn't ask about the configuration.  I cut down some of the output so that the text file wasn't as large, but it displayed properly (albeit with the errors on the replaced disk).  For the question on the lvdisplay, all logical volumes are showing no pieces on the disk that was removed, they only show the raid disk (i.e. no stale extents). 

sayansaha
Occasional Contributor

Re: Issues with vg00 and unused replaced disk in volume group

Hi,
If still u r facing issue, follow the below steps and send screenshot.

# vgdisplay -v vg00
# lvdisplay -v /dev/vg00/lvol3
# lvdisplay -v -k /dev/vg00/lvol3
# strings /etc/lvmtab
Sean M.
Advisor

Re: Issues with vg00 and unused replaced disk in volume group

Thank you all for your ideas on this (I don't know why I had the wrong commands in my initial post).  Over this past weekend I was able to reduce out the non-existant disk without any major issues.  What worked in my favor for this was the bad disk was part of VG00, but did not contain any lvols or lvlnboot information.  The below is what I ran sucessfully:

 

[ server_name:/etc ] vgreduce -f vg00

PV with key 1 sucessfully deleted from vg vg00

Repair completed, please perform the following steps..:

1. vgscan -k -f vg00

2. vgcfgbackup

 

Please note that for anyone that may try this in the future, this only works if no lvols were on the disk and the disk did not contain any boot information.  When Good Disks Go Bad actually listed the step as vgreduce -f vg00 pvname; vgscan -f vgname.  This does not work as vgreduce -f will not accept anything other than just a volume group name.  Backing up the /etc/lvmconf/vg00.cfg, /etc/lvmtab, and /etc/lvmtab_p files also ensure that you can go back in the event of a problem.  This is due to a newer LVM patch on 11.31 apparently.

Torsten.
Acclaimed Contributor

Re: Issues with vg00 and unused replaced disk in volume group

Most of the times the problem is that disks get a new device file when replaced, so you need to work with scsimgr and io_redirect_dsf to adjust.

 

So - if possible - use hardware RAID for your boot (and other) disks.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!