Chris Paquin

AI, Virtualization, Containers, Infrastructure, Linux

  • Modifying the Bootlist

    Below are instructions on how to modify and confirm your bootlist, which is the list of devices that your AIX system is going to try to boot from. Below is a list of quick and easy commands.

    • To specify the logical volume hd5 on disk hdisk0 for normal boot, typle
      • bootlist -m normal hdisk0 blv=hd5
    • To view the boot list that you set in the example above
      • bootlist -m normal -o      #where normal sepcifies normal boot

    • To specify booting in normal mode from the only boot logical volume on hdisk0, or the boot record hd5 on hdisk1, do the following
      • bootlist -m normal hdisk0 hdisk1 blv=mb_hd5
    • If you are dealing with a new disk you are going to need to initialize the boot block as well.
      • In this example you can see that the boot block on hdisk0 has not been initialized.
        • hdisk1 blv=hd5

          hdisk0

        • # bosboot -ad /dev/hdisk0 #use the bosboot command to initialize it.
        • Now all is well
          • # bootlist -m normal -o

            hdisk1 blv=hd5

            hdisk0 blv=hd5

                                               

     

    Below are some quick and dirty commands that maybe usefull.

    bootlist -m (normal or service) -o –
    displays bootlist
    bootlist -m (normal or service) (list of devices) – change bootlist
    bootinfo -b –
    Identifies the bootable disk
    bootinfo -t   –
    Specifies type of boot
    bosboot -a -d (/dev/pv) – Creates a complete
    boot image on a physical volume.
    mkboot -c -d (/dev/pv)       Zero’s out
    the boot records on the physical volume.
    savebase -d (/dev/pv)        Saves
    customised ODM info onto the boot device.

  • AIX bootdisk removal

    Need to replace a failed rootdisk in AIX? The post below outlines the procedure for removing a disk from a mirrored root volume.

    First take a look at what disks are in your rootvg.

    In the example below we have hdisk0 and hdisk1

     

    # lsvg -p rootvg
    rootvg:
    PV_NAME
    PV STATE          TOTAL
    PPs   FREE PPs    FREE DISTRIBUTION
    hdisk0
    active
    542         264
    109..00..00..46..109
    hdisk1
    active
    542         278
    88..00..00..81..109

     

     lsvg -l rootvg
    
     LV
     NAME
     TYPE       LPs   PPs
     PVs  LV STATE      MOUNT POINT
    
     hd5
     boot       1
     2     2    closed/syncd  N/A
    
    hd6
    
    paging     64    128
    
    2    open/syncd    N/A
    
    hd8
    
    jfslog     1     2
    
    2    open/syncd    N/A
    
    hd4
    
    jfs        6
    
    12    2    open/syncd
    
    /
    
    hd2
    
    jfs        127   254
    
    2    open/syncd    /usr
    
    hd9var
    
    jfs        4
    
    8     2    open/syncd
    
    /var
    
    hd3
    
    jfs        37
    
    74    2    open/syncd
    
    /tmp
    
    hd1
    
    jfs        3
    
    6     2    open/syncd
    
    /home
    
    hd10opt
    
    jfs        21
    
    42    2    open/syncd
    
    /opt
    
    dumplv
     sysdump    14    14
     1    open/syncd    N/A

    Now lets check to make sure that there’s a 1:2 relationship, meaning that there are copies.

    Notice dumplv. It’s not copied so we need to make sure dumplv data isn’t on the failing disk. To check, run;

    $ lslv -l dumplv
    dumplv:N/A
    PV
    COPIES        IN BAND
    DISTRIBUTION
    hdisk0
    014:000:000   100%
    000:014:000:000:000

    This is telling us that the logical volume dumplv is on hdisk0.  If hdisk1 is the failing
    disk, then we are okay.  Otherwise, we would have to migrate the data over to the good drive and proceed.

    # unmirrorvg rootvg hdisk1
    # reducevg rootvg hdisk1
    # rmdev -l hdisk1 –d

     


    Before you power down, you need to make sure that your system is set to boot off of a disk that is still in the rootvg.

     

    # bootinfo -b
    hdisk1

     

    This tells you what drive it was last booted up.  We want to change this to boot to the new drive, so;

    # bosboot -ad
    /dev/hdisk0

    And check bootlist

    # bootlist –m normal
    –o

    NOW WE CAN POWER DOWN THE BOX AND REPLACE THE DRIVE. Once disk has been replaced,
    power up the server.  Once at command prompt, run;

    # cfgmgr

     

     

    This will install the new device and allow the OS to see it.

     lsdev -Cc disk
    
     hdisk0
     Available 40-60-00-4,0 16 Bit LVD SCSI Disk Drive
    
     hdisk1
     Available 40-60-00-8,0 16 Bit LVD SCSI Disk Drive

     

    Make sure that the OS says it’s available.  If it is, we can assign it to a volume group.

    # extendvg rootvg hdisk1

     This will assign it a PVID. and assign it to the volumegroup rootvg to make it available for use.  Now we can mirror;


    # mirrovg rootvg

    This will take a little while as it’s taking all data now on hdisk0 and making a copy to hdisk1.

     

    # lsvg -p rootvg
    rootvg:
    PV_NAME
    PV STATE          TOTAL
    PPs   FREE PPs    FREE DISTRIBUTION
    hdisk0
    active
    542         264
    109..00..00..46..109
    hdisk1
    active
    542         278
    88..00..00..81..109

     

    Once it’s mirroring, we can make sure it’s assigned to rootvg by doing the above.  We can also check to make sure there’s copies;

     

    # lsvg -l rootvg
    rootvg:
    LV
    NAME
    TYPE       LPs   PPs
    PVs  LV STATE      MOUNT POINT
    hd5
    boot       1
    2     2    closed/syncd  N/A
    hd6
    paging     64    128
    2    open/syncd    N/A
    hd8
    jfslog     1     2
    2    open/syncd    N/A
    hd4
    jfs        6
    12    2    open/syncd
    /
    hd2
    jfs        127   254
    2    open/syncd    /usr
    hd9var
    jfs        4
    8     2    open/syncd
    /var
    hd3
    jfs
    37    74    2
    open/syncd    /tmp
    hd1
    jfs        3
    6     2    open/syncd
    /home
    hd10opt
    jfs        21
    42    2    open/syncd
    /opt
    dumplv
    sysdump    14    14
    1    open/syncd    N/A

     

    Now we need to modify the bosboot to recreate the boot image.

     

    # bosboot –a

     

    Double check your bootlist to make sure hdisk1 is in there.

     

    # bootlist –m normal –o