1833709 Members
2738 Online
110063 Solutions
New Discussion

replacing a bad disk

 
SOLVED
Go to solution
moonchild
Regular Advisor

replacing a bad disk

HPUX 11.11 using LVM

# strings lvmtab
/dev/vg00
/dev/dsk/c1t6d0
/dev/dsk/c14t5d0
/dev/vg01
/dev/dsk/c2t6d0
/dev/dsk/c3t6d0
/dev/dsk/c14t6d0
/dev/dsk/c3t5d0
/dev/dsk/c3t4d0
/dev/dsk/c14t4d0

c3t5d0 is bad and we need to replace it
vg01 is mirrored except one lvol which is vg01/lvol5 which is a secondary swap.

# cat /etc/fstab
/dev/vg01/lvol1 /opt vxfs delaylog 0 2
/dev/vg01/lvol2 /users vxfs delaylog 0 2
/dev/vg01/lvol3 /var vxfs delaylog 0 2
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /usr vxfs delaylog 0 2
/dev/vg02/lvol1 /logs vxfs rw,suid,largefiles,delaylog,datainlog 0 2
/dev/vg01/lvol4 /opt/IBM vxfs rw,suid,largefiles,delaylog,datainlog 0 2
/dev/vg01/swap1 ... swap pri=1 0 0

some root lvols resides under vg01 like /opt and /var

what is the best way to replace that bad disk?

Thank you in advance
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: replacing a bad disk

Shalom,

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Its all in the document.

Back up the system with Ignite make_tape_recovery or make_net_recovery as a precaution.

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
moonchild
Regular Advisor

Re: replacing a bad disk

do i need to remove the swap since it's not mirrored?
Torsten.
Acclaimed Contributor

Re: replacing a bad disk

Is the swap on this disk? Run "vgdisplay -v" to get more info.

Remember - always mirror the swap - otherwise you have a pretty showstopper in case of a disk failure.

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!   
moonchild
Regular Advisor

Re: replacing a bad disk

yes swap is on that disk and it is not mirrored

/dev/vg01/swap1 ... swap pri=1 0 0

# vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 6
Open LV 6
Max PV 16
Cur PV 6
Act PV 6
Max PE per PV 2500
VGDA 12
PE Size (Mbytes) 4
Total PE 11873
Alloc PE 11750
Free PE 123
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 5000
Current LE 1250
Allocated PE 2500
Used PV 4

LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Size (Mbytes) 8000
Current LE 2000
Allocated PE 2000
Used PV 2

LV Name /dev/vg01/lvol3
LV Status available/syncd
LV Size (Mbytes) 4000
Current LE 1000
Allocated PE 2000
Used PV 2

LV Name /dev/vg01/lvol4
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 2500
Allocated PE 2500
Used PV 2

LV Name /dev/vg01/lvol5
LV Status available/syncd
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Used PV 1

LV Name /dev/vg01/swap1
LV Status available/syncd
LV Size (Mbytes) 5000
Current LE 1250
Allocated PE 1250
Used PV 3


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

PV Name /dev/dsk/c3t6d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c14t6d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c3t5d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c3t4d0
PV Status available
Total PE 1023
Free PE 23
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c14t4d0
PV Status available
Total PE 2170
Free PE 100
Autoswitch On
Proactive Polling On
yulianto piyut
Valued Contributor

Re: replacing a bad disk

the swap that you want to remove is primary swap? you can not remove primary swap. last year, my boot disk is failed and the swap is not mirrored. i can not remove the swap, to replace the bad disk, i must restore from os backup. for the future, don't forget to mirror your swap device, in case there is a bad disk problem.

-yut-
Vivek Bhatia
Trusted Contributor
Solution

Re: replacing a bad disk

From your output i can understand that you have a secondary swap associated with vg01...

So if you can still work without this swap then go ahead (coz sometimes you have lots of applications running which needs lot of swap) and replace the disk and if not then you need to create a seconday swap on some other Hard disk and mount it and then replace the disk using this document.

www.docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf


moonchild
Regular Advisor

Re: replacing a bad disk

yes swap1 is the primary swap and vg01/lvol5 is the secondary swap

thank you all for your reponses
Sp4admin
Trusted Contributor

Re: replacing a bad disk

Hi,

Like Steve said that document is a good one. It will cover all the steps need to achive what you want.

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf


sp,