Unix Technical Forum

Help with hard disk replacement in AIX

This is a discussion on Help with hard disk replacement in AIX within the AIX Operating System forums, part of the Unix Operating Systems category; --> I'm new to AIX and I'm trying to find a step by step guide to replacing a disk in ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 07:37 AM
coffeyp@gmail.com
 
Posts: n/a
Default Help with hard disk replacement in AIX

I'm new to AIX and I'm trying to find a step by step guide to replacing
a disk in an SSA array.

Pdisk9, which translates to hdisk11 failed. This disk is mirrored to
another disk, hdisk22. These disk are part of VG3.

I really need something that will give me the commands to run in order.
Any help is greatly appreciated.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 07:37 AM
coffeyp@gmail.com
 
Posts: n/a
Default Re: Help with hard disk replacement in AIX

I think I have a general idea of what to do.

1. Note the logical volumes on the volume group
- lsvg -l vg3

2. Remove the logical volumes from the disk
- rmlvcopy LVNAME 1 hdisk11

3. Ensure no logical volumes are left on the disk.
- lspv -p hdisk11

4. Remove the volume group from the disk
- reducevg -df vg3 hdisk11

5. Ensure everything was removed
- lspv (which should list hdisk11 as none)

6. Delete the disk
- rmdev -l hdisk11 -d

7. Replace the disk

8. run cfgmgr

9. Check that the new drive is there.
- lspv and/or lsdev -Cs scsi

10. Add the disk to the volume group
- extendvg vg3 hdisk# (new hard disk)

11. Recreate the mirror
- mirrorvg vg3 hdisk# (new hard disk)

12. Sync the mirror.
- syncvg -v vg3


If this is correct can anyone tell me if I need to adjust or add
anything?

Thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 07:37 AM
tmpolzin@netscape.net
 
Posts: n/a
Default Re: Help with hard disk replacement in AIX


coffeyp@gmail.com wrote:
> I think I have a general idea of what to do.
>
> 1. Note the logical volumes on the volume group
> - lsvg -l vg3
>
> 2. Remove the logical volumes from the disk
> - rmlvcopy LVNAME 1 hdisk11
>
> 3. Ensure no logical volumes are left on the disk.
> - lspv -p hdisk11
>
> 4. Remove the volume group from the disk
> - reducevg -df vg3 hdisk11
>
> 5. Ensure everything was removed
> - lspv (which should list hdisk11 as none)
>
> 6. Delete the disk
> - rmdev -l hdisk11 -d
>
> 7. Replace the disk
>
> 8. run cfgmgr
>
> 9. Check that the new drive is there.
> - lspv and/or lsdev -Cs scsi
>
> 10. Add the disk to the volume group
> - extendvg vg3 hdisk# (new hard disk)
>
> 11. Recreate the mirror
> - mirrorvg vg3 hdisk# (new hard disk)
>
> 12. Sync the mirror.
> - syncvg -v vg3
>
>
> If this is correct can anyone tell me if I need to adjust or add
> anything?

Remove the pdisk as well before running cfgmgr.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 07:37 AM
coffeyp@gmail.com
 
Posts: n/a
Default Re: Help with hard disk replacement in AIX

So I need to add rmdev -l pdisk 9 -d?

Thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 07:37 AM
coffeyp@gmail.com
 
Posts: n/a
Default Re: Help with hard disk replacement in AIX

Another question regarding this procedure.

At step 2, one of the logical volumes spans 3 disks (there are 6 drives
in the vg).
There is no room to save a copy of this to disk, so is the correct
process to take a back up of the logical volume and then restore it
after the disk has been replaced?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 07:38 AM
tmpolzin@netscape.net
 
Posts: n/a
Default Re: Help with hard disk replacement in AIX


coffeyp@gmail.com wrote:
> Another question regarding this procedure.
>
> At step 2, one of the logical volumes spans 3 disks (there are 6 drives
> in the vg).
> There is no room to save a copy of this to disk, so is the correct
> process to take a back up of the logical volume and then restore it
> after the disk has been replaced?

since the lv is mirrored there should be no need to back it up.

The very very first step should be to run rmlvcopy to logically get rid
of the mirror on the failed disk. You are updating the vgda and odm so
it doesn't matter if the disk isn't spinning.

Do indeed remove both the hdisk and the pdisk associated with it.
Otherwise you'll have a pdisk with no hdisk assiciated to it. Last
step will be a mklvcopy use the the -k switch to sync as you build the
copy. Rembember RTFM

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 07:38 AM
Menno Willemse
 
Posts: n/a
Default Re: Help with hard disk replacement in AIX


coffeyp@gmail.com wrote:
> I'm new to AIX and I'm trying to find a step by step guide to replacing
> a disk in an SSA array.
>
> Pdisk9, which translates to hdisk11 failed. This disk is mirrored to
> another disk, hdisk22. These disk are part of VG3.
>
> I really need something that will give me the commands to run in order.
> Any help is greatly appreciated.


The procedures outlined by the others here will work, but there is also
the replacepv command. In which case the procedure is:

1. Plug in the new disk and run cfgmgr. Check it is there.

2. Run: replacepv hdisk11 hdisk99

2a. Have coffee break.

3. Run: rmdev -dl hdisk11
rmdev -dl pdisk9

If I remember correctly, the replacepv removes the original disk from
the volume group.

4. Remove broken disk from the system. Done!

This will leave you with an ugly hole in your disk configuration
(hdisk10..hdisk12) but it's fully automatic. One special note, I once
used this to move the data off one disk to a temporary one that was
larger. This went fine. However, when I got the new disk in (same size
as original), I couldn't replacepv that one back, even though the data
did fit. This was on a maxed-out non-big volume group, so getting the
data back onto the correct disk was a bit of a puzzle. :-/

Cheers,
Menno

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com