AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Restore from mksysb on bigger hard drives

    Posted Wed January 30, 2008 10:44 PM

    Originally posted by: klimenta


    Hi,

    I made mksysb bootable tape on my IBM AIX 5.2 ML9 with 2 X 18Gb mirrored rootvg volume (internal HDDs).
    I plan to replace them with 2 x 72Gb hard drives.

    My questions is, will mksysb recognize these new hard drives and restore the OS correctly after I boot and restore the OS from tape? Or I have to run cfgmgr after the restore? My intention is to increase the /usr filesystem and I don't have enough space with current 18Gb drives. I need extra 20Gb for some new app. + data.

    Also, since I don't have original install OS CDs, will mksysb prompt me to insert them at the end of the restore?

    Thanks


  • 2.  Re: Restore from mksysb on bigger hard drives

    Posted Sat February 02, 2008 09:27 PM

    Originally posted by: dwaddle


    Most likely yes. If AIX would recognize the disks at install time, then it should recognize them during a mksysb restore. The cfgmgr (or something quite similar) is run during bootup from a bootable mksysb.

    But, if your drives are completely mirrored ("lsvg -l rootvg" shows 2x as many PPs as LPs for each LV, and the value in the 'PV' column is >1) and your drives are hot swappable, then there's no reason to bother with a mksysb reinstall.

    AIX's LVM is very flexible in situations such a this. You should be able to use LVM to accomplish this without a reinstall or an outage. The steps below highlight the procedure, and the AIX documentation covers it in detail when covering how to swap out a failed hard drive. In this case, the drive is not failed, but the steps are appropriate.

    (1) Break the mirror from hdisk1 using 'rmlvcopy' for each LV in the system
    (2) Remove hdisk1 from the rootvg using 'reducevg'
    (3) Remove the hdisk1 device using 'rmdev'
    (4) Swap the drive from a 18G to a 72G (using the diag Hot Plug action if appropriate)
    (5) Run cfgmgr to add the 'new' hdisk1 device
    (6) Use 'extendvg' to bring the new hdisk1 back into rootvg
    (7) Re-mirror everything on hdisk0 to hdisk1 using mklvcopy and syncvg
    (8) Run 'bosboot -a' to rebuild the boot sector on hdisk1
    (9) Repeat actions above to replace hdisk0

    If your system has HDD slots free on the same SCSI bus(es) as your existing rootvg drives, it would work just as well to install the new drives first and mirror onto them, then remove the mirror from the old HDDs. Doing it this way reduces the chances of a single drive failure killing you in the brief time everything is unmirrored.


  • 3.  Re: Restore from mksysb on bigger hard drives

    Posted Mon February 04, 2008 12:03 PM

    Originally posted by: klimenta


    Unfortunately, the drives are not hot swappable.

    Thanks for the answer.


  • 4.  Re: Restore from mksysb on bigger hard drives

    Posted Tue February 05, 2008 04:33 AM

    Originally posted by: SystemAdmin


    hi,

    restore from mksysb is recommended.

    But there is no harm doing dwaddle recommended. Just to add few more steps to it.
    I've done this before in aix 4.3.3. extendvg to the new bigger disk was failed due to vg had reached its max number of PP (1016). To make sure, calculate and plan how much max number of PP you expect it gonna be. I've done the following last time.

    Increase max number of PP by a factor with a command chvg.

    1. chvg -t 3 rootvg

    This will increase max Pp from 1016 to 3048.

    Rgds


  • 5.  Re: Restore from mksysb on bigger hard drives

    Posted Thu February 07, 2008 04:26 PM

    Originally posted by: klimenta


    This is what happened today.

    I had the old hard drives (PVs) marked as hdisk0 and hdisk1 in AIX. I also have 8 external HDDs for datavg, marked from hdisk2 to hdisk9. When, IBM tech shut down the system and replaced the drives with new ones, I booted from the tape, but the new drives were marked as hdisk8 and hdisk9. Other drives became marked different too. So hdisk2 became became hdisk0. (hdiskX = hdisk(X-2) :)

    I was able to tell that by looking at the hex signature in restore menu. All drives had some hex 16 character signature, except the new ones which were marked with zeros.

    I restored the system on hdisk8 and hdisk9 and after the reboot, the system came fine.
    Everything works perfect, except that hdisk0 is non-existing in the system. The old PVs for datavg came back as usual, so hdisk2 is really hdisk2. The new drives are hdisk1 and hdisk10. Mirror was restored properly without any intervention. I just have to rebuild bosboot.

    Thanks