Operating System - HP-UX
1753888 Members
7463 Online
108809 Solutions
New Discussion

Failed disk in HP LVM volume group

 
SOLVED
Go to solution
Nyck_1
Super Advisor

Failed disk in HP LVM volume group

Hello,

 

I have a failed hard drive in a volume group, I have an enginner coming in tomorrow to replace the drive but could someone please remind me of the LVM syntax I need to perfrom during & after the drive swap?

 

Details of the volume group are below:-

 

VG Name                     /dev/vg_migration1

VG Write Access             read/write    

VG Status                   available                

Max LV                      255   

Cur LV                      1     

Open LV                     1     

Max PV                      16    

Cur PV                      1     

Act PV                      1     

Max PE per PV               4375        

VGDA                        2  

PE Size (Mbytes)            32             

Total PE                    4374   

Alloc PE                    3125   

Free PE                     1249   

Total PVG                   0       

Total Spare PVs             0             

Total Spare PVs in use      0                    

 

   --- Logical volumes ---

   LV Name                     /dev/vg_migration1/migration1

   LV Status                   available/syncd          

   LV Size (Mbytes)            100000         

   Current LE                  3125     

   Allocated PE                3125       

   Used PV                     1      

 

 

   --- Physical volumes ---

   PV Name                     /dev/dsk/c2t2d0

   PV Status                   unavailable             

   Total PE                    4374   

   Free PE                     1249   

   Autoswitch                  On       

   Proactive Polling           On              

 

Cheers

 

Nick

 

5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: Failed disk in HP LVM volume group

This is a very good reference for dealing with disk failures.

 

When Good Disks Go Bad: Dealing with Disk Failures Under LVM

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf

Nyck_1
Super Advisor

Re: Failed disk in HP LVM volume group

Hello,

 

yes I have been looking at that but getting a bit confused as a bit rusty with HP-UX as you can probably tell. I was thinking that i would just remove the volume group completly and once the drive had been replaced just re-create it. The sytnax I'm planning on using is as follows. Does it look correct?

 

Delete an LV,

cd ~/

vgdisplay -v | grep Name

lvremove /dev/vg01/lvexample

 

write down the PV name, then delete a VG and its PV,

vgdisplay -v | grep Name

vgremove vg01

pvremove /dev/rdsk/c2t0d1

 

Cheers

 

Nick

Nyck_1
Super Advisor

Re: Failed disk in HP LVM volume group

I have just tried the following and still no luck:-

 

vgexport -v /dev/vg_migration1
Beginning the export process on Volume Group "/dev/vg_migration1".
vgexport: Volume group "/dev/vg_migration1" is still active.
vgexport: Couldn't export volume group "/dev/vg_migration1".


[lonita8] # vgchange -a n /dev/vg_migration1

vgchange: Couldn't deactivate volume group "/dev/vg_migration1":
Device busy

Torsten.
Acclaimed Contributor
Solution

Re: Failed disk in HP LVM volume group

Do

 

pvchange -a n /dev/dsk/c2t2d0

 

replace the disk, do a vgcfgrestore and vgchange -a y ... and then you have the original LVM structure on this disk. Now do a newfs ... and restore the data, since the disk is not mirrored. 


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!   
Nyck_1
Super Advisor

Re: Failed disk in HP LVM volume group

Hello,

 

all is now resolved and thanks to all who responded :-)

 

In the end I cheated a bit and just blew away all the failed volume groups as I wanted to re-create them but this time a bit smaller than they originally were.