Procedure for building DEFS virtualized systems at MDC


DEFS Slot/system/switch port/ip address mapping

  ----
  Top Drawer DQDPYDK
  
  DQDPYDK-P1-C1		mdcapvio10	FC cable 4
  
  DQDPYDK-P1-C3-Port1	mdcapvio11	u8/11	10.189.41.8	etherchannel
  DQDPYDK-P1-C3-Port2	mdcapvio11	v9/47	206.245.38.62
  
  DQDPYDK-P1-C4-Port1	Open
  DQDPYDK-P1-C4-Port2	mdcapvio10	v9/46	206.245.38.61 (PROBLEM ON PORT/CABLE)
  
  DQDPYDK-T6		mdcapvio10	v9/33	10.189.41.7	etherchannel
  DQDPYDK-T7		Open
  
  ----
  Middle Drawer DQDPKWA
  
  DQDPKWA-P1-C1		mdcapvio10	FC cable 2
  
  DQDPKWA-P1-C3-Port1	mdcapvio11	u8/12	10.189.41.8	etherchannel
  DQDPKWA-P1-C3-Port2	Open
  
  DQDPKWA-P1-C4		mdcapvio11	FC cable 3
  
  DQDPKWA-T6		mdcapvio10	v9/34	10.189.41.7	etherchannel
  DQDPKWA-T7		Open
  
  ----
  Bottom Drawer DQDPRNR
  
  DQDPRNR-P1-C3-Port1	mdcapvio11	u8/12	10.189.41.8	etherchannel
  DQDPRNR-P1-C3-Port2	Open
  
  DQDPRNR-P1-C4		mdcapvio11	FC cable 1
  
  DQDPRNR-T6		mdcapvio10	v9/34	10.189.41.7	etherchannel
  DQDPRNR-T7		Open
  


# mdclphmc10: Establish passwordless ssh access from desktop to the DEFS HMC hscroot user


# mdcapnim01: The following script is configured for DEFS and ready to run to create the VIO servers, assuming your NIM server login ID has password-less access to the "hscroot" account on the DEFS HMC:

  mdcapnim01:/home/s45x/dukeEnergy/mkviolpar.mdcapvio10.ksh

# mdcapnim01: Execute this script to create both VIO servers on the p570, this requires password-less ssh access between your current login on the NIM server and the "hscroot" login on the HMC.

# mdcapnim01: You may also create the client LPAR's at this time as well, by running the following script:

  mdcapnim01:/home/s45x/dukeEnergy/mklpar.mdcapdef00.ksh

# mdcapnim01: This script requires the same password-less ssh access between your current login on the NIM server and the "hscroot" login on the HMC. This script will create 5 client LPAR's on the p570.

# mdclphmc10: If you ran the above scripts you should now see 7 total LPAR's on the p570: 2 VIO servers and 5 client LPAR's.

# mdcapnim01: REMOVING LPARs: If an error occurs and you need to remove the LPAR's and start over, using the following scripts for that purpose:

  mdcapnim01:/home/s45x/dukeEnergy/rmlpar.mdcapdef00.ksh # removes all client LPARs
  mdcapnim01:/home/s45x/dukeEnergy/rmlpar.mdcapvio10.ksh # removes both VIO Servers

# mdclphmc10: You may choose to perform these procedures manually if you want, the standards for creating these LPAR's are at the following URL:

  http://ddceperf/css/GlobalSysAdmin/Power5/standards.shtml

# mdclphmc10: Check each VIO server to ensure that all virtual adapters on mdcapvio10 are even numbered, and all virtual adpaters on mdcapvio11 are odd numbered. The purpose of the numbering scheme is to make it easier to identify which VIO server is providing which adapter to a client LPAR.


# mdclphmc10: The internal hard drives in the MDC p570 are attached as follows:

  hdisk0  U7879.001.DQDPYDK-P1-T12-L4-L0  16 Bit LVD SCSI Disk Drive (73400 MB)
  hdisk1  U7879.001.DQDPYDK-P1-T12-L5-L0  16 Bit LVD SCSI Disk Drive (73400 MB)
  hdisk2  U7879.001.DQDPKWA-P1-T12-L5-L0  16 Bit LVD SCSI Disk Drive (73400 MB)
  hdisk3  U7879.001.DQDPRNR-P1-T12-L5-L0  16 Bit LVD SCSI Disk Drive (73400 MB)


# mdclphmc10: Modify both VIO server profiles on the HMC to include the physical adapters as detailed below:

  DQDPYDK-P1-C1	mdcapvio10	Fiber Channal Adapter
  DQDPYDK-P1-C4	mdcapvio10	Ethernet Adapter (dual port)
  DQDPYDK-T6	mdcapvio10	Ethernet Adapter
  DQDPYDK-T7	mdcapvio11	Ethernet Adapter
  
  DQDPKWA-P1-C1	mdcapvio10	Fiber Channal Adapter
  DQDPKWA-T6	mdcapvio10	Ethernet Adapter
  DQDPKWA-T7	mdcapvio10	Ethernet Adapter
  DQDPKWA-T12	mdcapvio10	Storage Controller
  
  DQDPRNR-T6	mdcapvio10	Ethernet Adapter
  DQDPRNR-T7	mdcapvio10	Ethernet Adapter

  DQDPYDK-P1-C3	mdcapvio11	Ethernet Adapter (dual port)
  
  DQDPKWA-P1-C3	mdcapvio11	Ethernet Adapter (dual port)
  DQDPKWA-P1-C4	mdcapvio11	Fiber Channal Adapter
  
  DQDPRNR-P1-C3	mdcapvio11	Ethernet Adapter (dual port)
  DQDPRNR-P1-C4	mdcapvio11	Fiber Channal Adapter
  DQDPRNR-T12	mdcapvio11	Storage Controller


# mdclphmc10: Once the VIO Server LPARs have been created you may then load operating systems on the VIO servers. This is best done by performing a remote OS load from the NIM server. Boot a VIO server LPAR to the SMS menu using the HMC generated console terminal.

# mdclphmc10: Configure the VIO Server ethernet adapters as follows:

# mdclphmc10: For the VIO server named "mdcapvio10", use the following ethernet adapter as the boot device, this will also be the MC2 network adapter:

  Port 2 - IBM 2 PORT 10/100/100  U7879.001.DQDPYDK-P1-C4-T2 00096b6e71ef

# mdclphmc10: For the VIO server named "mdcapvio11", use the following ethernet adapter as the boot device, this will also be the MC2 network adapter:

  Port 2 - IBM 2 PORT 10/100/100  U7879.001.DQDPYDK-P1-C3-T2 00145ec56881

# mdclphmc10: From the HMC, boot the system to SMS and define the network boot IP information (use MC2 network IP addressing).

   Client IP: 206.245.38.61
   Server IP: 206.245.37.100
  Gateway IP: 206.245.38.1
     NetMask: 255.255.255.0

# mdclphmc10: From the HMC, boot the system to SMS and define the network boot IP information (use MC2 network IP addressing).

   Client IP: 206.245.38.62
   Server IP: 206.245.37.100
  Gateway IP: 206.245.38.1
     NetMask: 255.255.255.0

# mdclphmc10: Test ping from each VIO server LPAR to ensure communication with the NIM server.


# mdcapnim01: How to create VIO server NIM objects

  • Prepare Installation files:
  • AIX File Limit Size You must ensure that your file size security limitation isn't going to stop you from copying your mksysb image from your cdrom to your hard drive. On your NIM server, go to the /etc/security directory and edit the limit file. Change the fsize to -1 or something large enough to ensure the mksysb image will copy over. You will need to reboot your system for this to take place.

        cd /etc/security
        vi limit
        fsize = -1
        reboot
    

  • Copy installation files from ddcapnim01:

        scp root@ddcapnim01:/tftpboot/viospot_1300.chrp.mp.ent /tftpboot
        scp root@ddcapnim01:/export/mksysb/mksysb_gold_vio_1300 /export/mksysb
        scp root@ddcapnim01:/export/mksysb/bosinst_data_vio_1300 /export/nim
    

  • Define NIM Resources:
  • Define the mksysb_image resource object

        nim -o define -t mksysb \
        -a location=/export/mksysb/mksysb_gold_vio_1300 \
        -a server=master mksysb_gold_vio_1300
    

  • Define the SPOT resource object

        mkdir -p /export/spot
    

        nim -o define -t spot -a server=master \
        -a location=/export/spot \
        -a source=mksysb_gold_vio_1300 viospot_1300
    

  • Define the bosinst resource object

        nim -o define -t bosinst_data \
        -a location=/export/nim/bosinst_data_vio_1300 \
        -a server=master bosinst_data_vio_1300
    


    # mdcapnim01: NIM Configuration

      smitty nim
    

    # mdcapnim01: Define a new network for the 206.245.38.0 network.

    # mdcapnim01: Add 206.245.38.0 network as an install network.

    # mdcapnim01: Add mdcapvio10-mc2 as a machine.

      nim -o remove mdcapvio10-mc2
      nim -o define -t standalone -a if1='38_Network mdcapvio10-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapvio10-mc2
    

    # mdcapnim01: Add mdcapvio11-mc2 as a machine.

      nim -o remove mdcapvio11-mc2
      nim -o define -t standalone -a if1='38_Network mdcapvio11-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapvio11-mc2
    

    # mdcapnim01: Add mdcapdef00-mc2 as a machine.

      nim -o remove mdcapdef00-mc2
      nim -o define -t standalone -a if1='38_Network mdcapdef00-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapdef00-mc2
    

    # mdcapnim01: Add mdcapdef01-mc2 as a machine.

      nim -o remove mdcapdef01-mc2
      nim -o define -t standalone -a if1='38_Network mdcapdef01-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapdef01-mc2
    

    # mdcapnim01: Add mdcapdef02-mc2 as a machine.

      nim -o remove mdcapdef02-mc2
      nim -o define -t standalone -a if1='38_Network mdcapdef02-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapdef02-mc2
    

    # mdcapnim01: Add mdcapdef03-mc2 as a machine.

      nim -o remove mdcapdef03-mc2
      nim -o define -t standalone -a if1='38_Network mdcapdef03-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapdef03-mc2
    

    # mdcapnim01: Add mdcapdef04-mc2 as a machine.

      nim -o remove mdcapdef04-mc2
      nim -o define -t standalone -a if1='38_Network mdcapdef04-mc2 0' \
        -a platform=chrp -a netboot_kernel=mp -a cable_type1='N/A' mdcapdef04-mc2
    


    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the VIO server "mdcapvio10":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapvio10-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_vio_1300
              Select the SPOT to use for the installation - viospot_1300
      
              Install the Base Operating System on Standalone Clients
      
        BOSINST_DATA to use during installation            [bosinst_data_vio_1300]
          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    


    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the VIO server "mdcapvio11":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapvio11-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_vio_1300
              Select the SPOT to use for the installation - viospot_1300
      
              Install the Base Operating System on Standalone Clients
      
        BOSINST_DATA to use during installation            [bosinst_data_vio_1300]
          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    


    # mdclphmc10: Boot each VIO Server LPAR from the configured MC2 network interface and load the VIO operating system from the NIM server. For the initial install, select an internal SCSI disk for the OS load, do not select a SAN disk at this time. After the VIO operating system is loaded, some additional drivers will have to be added to enable MPIO communications with the SAN system.


    # mdcapvio10: Login to the VIO server "mdcapvio10" using the "padmin" account and accept the license agreement:

      license -accept
    

    # mdcapvio10: Then run the "oem_setup_env" command to gain "root" access to the VIO server system, and start a Korn Shell 93 shell

      ksh93
    

    # mdcapvio10: Set the root password to "password" for now.

    # mdcapvio10: Change the hostname to "mdcapvio10" and modify the /etc/rc.net file to reflect this hostname change:

      smitty tcpip
    

      vi /etc/rc.net
    

    # mdcapvio10: Setup the password-less ssh login between the NIM server and the VIO server for the "root" user.

    # mdcapvio10: Begin by loading the additional MPIO drivers necessary to communicate with the SAN system.

    # mdcapvio10: Login to the VIO server "mdcapvio10-mc2" as root

    # mdcapvio10: Copy the XP array MPIO tar file from the NIM server, extract and install:

      mkdir /tmp/xpmpio
      cd /tmp/xpmpio
      scp root@206.245.37.100:/home/s45x/dukeEnergy/XPMPIO1.tar .
      tar -xvf ./XPMPIO1.tar
      inutoc .
      smitty install_all
      
        INPUT device / directory for software              [.]
      
        Install and Update from ALL Available Software
          SOFTWARE to install                                [all]
          PREVIEW only? (install operation will NOT occur)    no
          COMMIT software updates?                            no
          SAVE replaced files?                                yes
          ACCEPT new license agreements?                      no
    

    # mdcapvio10: Remove all SAN disks, fscsi, and fcs adapters and reboot the VIO server in order for the new drivers to take effect:

      rmdev -Rdl fcs0
      rmdev -Rdl fcs1
      shutdown -Fr
    


    # mdcapvio10: After the system reboots, login to the VIO server using the "padmin" account, then run the "oem_setup_env" command to gain "root" access to the VIO server system, and start a Korn Shell 93 shell

      ksh93
    

    # mdcapvio10: Upgrade VIO IOS to latest level

      mount 206.245.37.100:/export/lpp_source/aix /mnt
      su - padmin
      emgr -P  # identify and remove any efixes
      emgr -e 'efix label'
      updateios -dev /mnt/vio_1301 --accept --install
    

    # mdcapvio10: Reboot VIO server.

      shutdown -Fr
    


    # mdcapvio10: After the system reboots, login to the VIO server using the "padmin" account, then run the "oem_setup_env" command to gain "root" access to the VIO server system, and start a Korn Shell 93 shell

      ksh93
    

    # mdcapvio10: verify WWN's and SAN connectivity with Mike wilson.

    # mdcapvio10: identify each disk by PVID and allocate for mdcapvio11 and client LPAR operating system usage.

    # mdcapvio10: Remove all FC attached disks

      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        print -- rmdev -Rdl ${i}
        rmdev -Rdl ${i}
      done
    

    # mdcapvio10: Set fast fail parameter for SCSI adapters and reconfigure FC adapters

      for i in 0 1
      do
        chdev -l fcs${i} -a init_link=pt2pt -P
        chdev -l fscsi${i} -a dyntrk=yes -P
        chdev -l fscsi${i} -a fc_err_recov=fast_fail -P
      done
    

      cfgmgr -vl fcs0
      cfgmgr -vl fcs1
    

    # mdcapvio10: Change reserve policy on hdisks to "no_reserve"

      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        chdev -l ${i} -a reserve_policy=no_reserve -P
        chdev -l ${i} -a algorithm=round_robin -P
        chdev -l ${i} -a hcheck_interval=20 -P
        chdev -l ${i} -a queue_depth=16 -P
        chdev -l ${i} -a pv=yes -P
      done
    

    # mdcapvio10: copy the vscsiPriority script from the NIM server to the VIO server and set the path priority for each disk.

      mkdir /usr/local/scripts
      scp root@206.245.37.100:/home/s45x/dukeEnergy/vscsiPriority.ksh /usr/local/scripts
      /usr/local/scripts/vscsiPriority.ksh -voi 20
      
      for i in $( lsdev -Cc disk -s fcp -F name )
      do
        P0=$( lspath -Al ${i} -p fscsi0 -F value -a priority )     
        P1=$( lspath -Al ${i} -p fscsi1 -F value -a priority )      
        print "${i} : fscsi0 : priority = ${P0}"     
        print "${i} : fscsi1 : priority = ${P1}"     
      done
    

    # mdcapvio10: Allocate each SAN disk for use as VIO operating system storage and mirror from internal hard drive. Change system to boot from SAN.

      extendvg rootvg hdisk1
      mirrorvg rootvg hdisk1
      bosboot -ad /dev/hdisk1
      bootlist -m normal hdisk1 hdisk0
      bootlist -m normal -o
    

    # mdcapvio10: remove the internal SCSI disk from the rootvg and the system

      unmirrorvg rootvg hdisk0
      reducevg roovg hdisk0
      rmdev -Rdl hdisk0
    

    # mdcapvio10: Reconfigure ethernet adapters for etherchannel configuration, begin by unconfiguring all ethernet adapters

      lscfg -l ent*
      for i in 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
      do
        ifconfig en${i} down
        ifconfig en${i} detach
        ifconfig et${i} down
        ifconfig et${i} detach
        rmdev -Rdl ent${i}
        rmdev -Rdl en${i}
        rmdev -Rdl et${i}
      done
      ifconfig -a
      lsdev -Cc adapter | grep ent
    

    # mdcapvio10: Rediscover all ethernet adapters

      cfgmgr
      lsdev -Cc adapter | grep ent
      lsdev -C | grep inet
      lsdev -C | grep lo
      lscfg -l ent*
    

    # mdcapvio10: turn off the chksum_offload parameter on all adapters

      for i in 10 9 8 7 6 5 4 3 2 1 0
      do
        lsattr -El ent${i} | grep chksum_offload
        chdev -l ent${i} -a chksum_offload=no
        chdev -l ent${i} -a chksum_offload=no -P
        lsattr -El ent${i} | grep chksum_offload
      done
    

    # mdcapvio10: identify the application ethernet adapters in slot T6

      lsdev -Cc adapter | grep ent
      ETHADAPT='ent0,ent4,ent6'
    

    # mdcapvio10: Create the application etherchannel adapter

      if mkdev -c adapter -s pseudo -t ibm_ech \
           -a adapter_names="${ETHADAPT}" \
           -a netaddr=10.189.41.1
      then
        /usr/lib/methods/defif
      fi
    

    # mdcapvio10: identify the MC2 ethernet adapter in slot P1-C4 port 2

      lsdev -Cc adapter | grep ent
      ETHADAPT='ent3'
    

    # mdcapvio10: Create the MC2 etherchannel adapter

      if mkdev -c adapter -s pseudo -t ibm_ech \
           -a adapter_names="${ETHADAPT}" \
           -a netaddr=206.245.38.1
      then
        /usr/lib/methods/defif
      fi
      lsdev -Cc adapter | grep ent
    

      chdev -l ent12 -a mode=round_robin
      lsattr -El ent12
    

      chdev -l ent13 -a mode=standard
      lsattr -El ent13
    

    # mdcapvio10: build the SEA's (shared ethernet adapters) Use the virtual ethernet adapters associated with slots 500 and 850.

      /usr/ios/cli/ioscli mkvdev -sea ent12 -vadapter ent8 -default ent8 -defaultid 2012
      /usr/ios/cli/ioscli mkvdev -sea ent13 -vadapter ent10 -default ent10 -defaultid 520
    

    # mdcapvio10: configure IP addresses on virtual ethernet adapters associated with slots 510 and 860

      smitty tcpip
    

    # mdcapvio10: en9: inet 10.189.41.7 netmask 255.255.255.0

    # mdcapvio10: en11: inet 206.245.38.61 netmask 255.255.255.0

      chdev -l inet0 -a delroute='net,-hopcount,0,,0,206.245.38.1'
      route add 206.245.37.0 206.245.38.1
      vi /etc/rc.net
          route add 206.245.37.0 206.245.38.1
    

    # mdcapvio10: Shutdown VIO LPAR and remove the SCSI adapters from HMC profile for this LPAR.

    # mdcapvio10: DQDPKWA-T12 mdcapvio10 Storage Controller

    # mdcapvio10: Reboot VIO server from SAN disk.


    # mdcapvio11: Login to the VIO server "mdcapvio11" using the "padmin" account and accept the license agreement:

      license -accept
    

    # mdcapvio11: Then run the "oem_setup_env" command to gain "root" access to the VIO server system, and start a Korn Shell 93 shell

      ksh93
    

    # mdcapvio11: Set the root password to "password" for now.

    # mdcapvio11: Change the hostname to "mdcapvio11" and modify the /etc/rc.net file to reflect this hostname change:

      smitty tcpip
      
      vi /etc/rc.net
    

    # mdcapvio11: Setup the password-less ssh login between the NIM server and the VIO server for the "root" user.

    # mdcapvio11: Begin by loading the additional MPIO drivers necessary to communicate with the SAN system.

    # mdcapvio11: Copy the XP array MPIO tar file from the NIM server, extract and install:

      mkdir /tmp/xpmpio
      cd /tmp/xpmpio
      scp root@206.245.37.100:/home/s45x/dukeEnergy/XPMPIO1.tar .
      tar -xvf ./XPMPIO1.tar
      inutoc .
      smitty install_all
      
        INPUT device / directory for software              [.]
      
        Install and Update from ALL Available Software
          SOFTWARE to install                                [all]
          PREVIEW only? (install operation will NOT occur)    no
          COMMIT software updates?                            no
          SAVE replaced files?                                yes
          ACCEPT new license agreements?                      no
    

    # mdcapvio11: Now remove all SAN disks, fscsi, and fcs adapters and reboot the VIO server in order for the new drivers to take effect:

      rmdev -Rdl fcs0
      rmdev -Rdl fcs1
      shutdown -Fr
    


    # mdcapvio11: After the system reboots, login to the VIO server using the "padmin" account, then run the "oem_setup_env" command to gain "root" access to the VIO server system, and start a Korn Shell 93 shell

      ksh93
    

    # mdcapvio11: Upgrade VIO IOS to latest level

      mount 206.245.37.100:/export/lpp_source/aix /mnt
      su - padmin
      emgr -P  # identify and remove any efixes
      emgr -e 'efix label'
      updateios -dev /mnt/vio_1301 --accept --install
    

    # mdcapvio11: Reboot VIO server

      shutdown -Fr
    


    # mdcapvio11: After the system reboots, login to the VIO server using the "padmin" account, then run the "oem_setup_env" command to gain "root" access to the VIO server system, and start a Korn Shell 93 shell

      ksh93
    

    # mdcapvio11: verify WWN's and SAN connectivity with Mike wilson.

    # mdcapvio11: identify hdisk to use for this VIO operating system SAN boot.

    # mdcapvio11: Remove all FC attached disks

      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        print -- rmdev -Rdl ${i}
        rmdev -Rdl ${i}
      done
    

    # mdcapvio11: Set fast fail parameter for SCSI adapters and reconfigure FC adapters

      chdev -l fscsi0 -a fc_err_recov=fast_fail
      chdev -l fscsi1 -a fc_err_recov=fast_fail 
      cfgmgr -vl fcs0
      cfgmgr -vl fcs1
    

    # mdcapvio11: Change reserve policy on hdisks to "no_reserve"

      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        chdev -l ${i} -a reserve_policy=no_reserve
        chdev -l ${i} -a algorithm=round_robin
        chdev -l ${i} -a hcheck_interval=20
        chdev -l ${i} -a queue_depth=16
        chdev -l ${i} -a pv=yes
      done
    

    # mdcapvio11: copy the vscsiPriority script from the NIM server to the VIO server and set the path priority for each disk.

      mkdir /usr/local/scripts
      scp root@206.245.37.100:/home/s45x/dukeEnergy/vscsiPriority.ksh /usr/local/scripts
      /usr/local/scripts/vscsiPriority.ksh -voi 20
      
      for i in $( lsdev -Cc disk -s fcp -F name )
      do
        P0=$( lspath -Al ${i} -p fscsi0 -F value -a priority )     
        P1=$( lspath -Al ${i} -p fscsi1 -F value -a priority )      
        print "${i} : fscsi0 : priority = ${P0}"     
        print "${i} : fscsi1 : priority = ${P1}"     
      done
    

    # mdcapvio11: Allocate each SAN disk for use as VIO operating system storage and mirror from internal hard drive. Change system to boot from SAN.

      extendvg rootvg hdisk2
      mirrorvg rootvg hdisk2
      bosboot -ad /dev/hdisk2
      bootlist -m normal hdisk2 hdisk0
      bootlist -m normal -o
    

    # mdcapvio11: remove the internal SCSI disk from the rootvg and the system

      unmirrorvg rootvg hdisk0
      reducevg roovg hdisk0
      rmdev -Rdl hdisk0
    

    # mdcapvio11: Reconfigure ethernet adapters for etherchannel configuration, begin by unconfiguring all ethernet adapters

      lscfg -l ent*
      for i in 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
      do
        ifconfig en${i} down
        ifconfig en${i} detach
        ifconfig et${i} down
        ifconfig et${i} detach
        rmdev -Rdl ent${i}
        rmdev -Rdl en${i}
        rmdev -Rdl et${i}
      done
      ifconfig -a
      lsdev -Cc adapter | grep ent
    

    # mdcapvio11: Rediscover all ethernet adapters

      cfgmgr
      lsdev -Cc adapter | grep ent
      lsdev -C | grep inet
      lsdev -C | grep lo
      lscfg -l ent*
    

    # mdcapvio11: turn off the chksum_offload parameter on all adapters

      for i in 10 9 8 7 6 5 4 3 2 1 0
      do
        lsattr -El ent${i} | grep chksum_offload
        chdev -l ent${i} -a chksum_offload=no
        chdev -l ent${i} -a chksum_offload=no -P
        lsattr -El ent${i} | grep chksum_offload
      done
    

    # mdcapvio11: identify the application ethernet adapters in slot P1-C3

      lsdev -Cc adapter | grep ent
      ETHADAPT='ent0,ent2,ent4'
    

    # mdcapvio11: Create the application etherchannel adapter

      if mkdev -c adapter -s pseudo -t ibm_ech -a adapter_names="${ETHADAPT}"
      then
        /usr/lib/methods/defif
      fi
    

    # mdcapvio11: identify the MC2 ethernet adapter in second port of the top drawer in slot P1-C3

      lsdev -Cc adapter | grep ent
      ETHADAPT='ent1'
    

    # mdcapvio11: Create the MC2 etherchannel adapter

      if mkdev -c adapter -s pseudo -t ibm_ech -a adapter_names="${ETHADAPT}"
      then
        /usr/lib/methods/defif
      fi
      lsdev -Cc adapter | grep ent
    

      chdev -l ent10 -a mode=round_robin
      chdev -l ent11 -a mode=standard
      lsattr -El ent10
      lsattr -El ent11
    

    # mdcapvio11: build the SEA's (shared ethernet adapters) Use the virtual ethernet adapters associated with slots 500 and 850.

      /usr/ios/cli/ioscli mkvdev -sea ent10 -vadapter ent6 -default ent6 -defaultid 2012
      /usr/ios/cli/ioscli mkvdev -sea ent11 -vadapter ent8 -default ent8 -defaultid 520
    

    # mdcapvio11: configure IP addresses on virtual ethernet adapters associated with slots 510 and 860

      smitty tcpip
    

    # mdcapvio11: en7: inet 10.189.41.8 netmask 255.255.255.0

    # mdcapvio11: en9: inet 206.245.38.62 netmask 255.255.255.0

      chdev -l inet0 -a delroute='net,-hopcount,0,,0,206.245.38.1'
      route add 206.245.37.0 206.245.38.1
      vi /etc/rc.net
          route add 206.245.37.0 206.245.38.1
    

    # mdcapvio11: Shutdown VIO LPAR and remove the SCSI adapters from HMC # profile for this LPAR.

    # mdcapvio11: DQDPRNR-T12 mdcapvio11 Storage Controller

    # mdcapvio11: Reboot VIO server from SAN disk.


    # mdcapvio10: login to VIO server as padmin and change to "oem_setup_env" and # start a Korn shell 93 shell.

      oem_setup_env
      ksh93
    

  • Identify SAN disk to use for operating system of LPAR mdcapdef00
  • Identify SAN disk to use for operating system of LPAR mdcapdef01
  • Identify SAN disk to use for operating system of LPAR mdcapdef02
  • Identify SAN disk to use for operating system of LPAR mdcapdef03
  • Identify SAN disk to use for operating system of LPAR mdcapdef04

      lspv
    

  • Identify vhost adapter to use for OS of LPAR mdcapdef00
  • Identify vhost adapter to use for OS of LPAR mdcapdef01
  • Identify vhost adapter to use for OS of LPAR mdcapdef02
  • Identify vhost adapter to use for OS of LPAR mdcapdef03
  • Identify vhost adapter to use for OS of LPAR mdcapdef04

      /usr/ios/cli/ioscli lsmap -all | grep vhost | head -30
    

  • Use vhost adapter in slot C10 for OS of LPAR mdcapdef00

      vhost adapter will probably be "vhost0"
    

  • Use vhost adapter in slot C20 for OS of LPAR mdcapdef01

      vhost adapter will probably be "vhost3"
    

  • Use vhost adapter in slot C30 for OS of LPAR mdcapdef02

      vhost adapter will probably be "vhost6"
    

  • Use vhost adapter in slot C40 for OS of LPAR mdcapdef03

      vhost adapter will probably be "vhost9"
    

  • Use vhost adapter in slot C50 for OS of LPAR mdcapdef04

      vhost adapter will probably be "vhost12"
    

    # mdcapvio10: Ensure the vhost adapters are empty, assuming the above # vhost adapter numbers.

      /usr/ios/cli/ioscli rmdev -pdev vhost0
      /usr/ios/cli/ioscli rmdev -pdev vhost3
      /usr/ios/cli/ioscli rmdev -pdev vhost6
      /usr/ios/cli/ioscli rmdev -pdev vhost9
      /usr/ios/cli/ioscli rmdev -pdev vhost12
    

    # mdcapvio10: Add the SAN boot disk to the vhost adapter for each LPAR

      /usr/ios/cli/ioscli mkvdev -vdev hdisk3 -vadapter vhost0  -dev Amdcapdef00003
      /usr/ios/cli/ioscli mkvdev -vdev hdisk4 -vadapter vhost3  -dev Amdcapdef01004
      /usr/ios/cli/ioscli mkvdev -vdev hdisk5 -vadapter vhost6  -dev Amdcapdef02005
      /usr/ios/cli/ioscli mkvdev -vdev hdisk6 -vadapter vhost9  -dev Amdcapdef03006
      /usr/ios/cli/ioscli mkvdev -vdev hdisk7 -vadapter vhost12 -dev Amdcapdef04007
    


    # mdcapvio11: login to VIO server as padmin and change to "oem_setup_env" and # start a Korn shell 93 shell.

      oem_setup_env
      ksh93
    

  • Identify SAN disk to use for operating system of LPAR mdcapdef00
  • Identify SAN disk to use for operating system of LPAR mdcapdef01
  • Identify SAN disk to use for operating system of LPAR mdcapdef02
  • Identify SAN disk to use for operating system of LPAR mdcapdef03
  • Identify SAN disk to use for operating system of LPAR mdcapdef04

      lspv
    

  • Identify vhost adapter to use for OS of LPAR mdcapdef00
  • Identify vhost adapter to use for OS of LPAR mdcapdef01
  • Identify vhost adapter to use for OS of LPAR mdcapdef02
  • Identify vhost adapter to use for OS of LPAR mdcapdef03
  • Identify vhost adapter to use for OS of LPAR mdcapdef04

      /usr/ios/cli/ioscli lsmap -all | grep vhost | head -30
    

  • Use vhost adapter in slot C10 for OS of LPAR mdcapdef00

      vhost adapter will probably be "vhost0"
    

  • Use vhost adapter in slot C20 for OS of LPAR mdcapdef01

      vhost adapter will probably be "vhost3"
    

  • Use vhost adapter in slot C30 for OS of LPAR mdcapdef02

      vhost adapter will probably be "vhost6"
    

  • Use vhost adapter in slot C40 for OS of LPAR mdcapdef03

      vhost adapter will probably be "vhost9"
    

  • Use vhost adapter in slot C50 for OS of LPAR mdcapdef04

      vhost adapter will probably be "vhost12"
    

    # mdcapvio11: Ensure the vhost adapters are empty, assuming the above vhost adapter numbers.

      /usr/ios/cli/ioscli rmdev -pdev vhost0
      /usr/ios/cli/ioscli rmdev -pdev vhost3
      /usr/ios/cli/ioscli rmdev -pdev vhost6
      /usr/ios/cli/ioscli rmdev -pdev vhost9
      /usr/ios/cli/ioscli rmdev -pdev vhost12
    

    # mdcapvio11: Add the SAN boot disk to the vhost adapter for each LPAR

      /usr/ios/cli/ioscli mkvdev -vdev hdisk3 -vadapter vhost0  -dev Amdcapdef00003
      /usr/ios/cli/ioscli mkvdev -vdev hdisk4 -vadapter vhost3  -dev Amdcapdef01004
      /usr/ios/cli/ioscli mkvdev -vdev hdisk5 -vadapter vhost6  -dev Amdcapdef02005
      /usr/ios/cli/ioscli mkvdev -vdev hdisk6 -vadapter vhost9  -dev Amdcapdef03006
      /usr/ios/cli/ioscli mkvdev -vdev hdisk7 -vadapter vhost12 -dev Amdcapdef04007
    


    # mdcapnim01: Create the client LPAR boot image on the NIM Server

  • Prepare Installation files:
  • Login to mdcapnim01 as root and copy installation files from ddcapnim01:

        scp root@ddcapnim01:/export/mksysb/mksysb_gold_5300-05-04 /export/mksysb
    

  • Define NIM Resources:
  • Define the mksysb_image resource object

        nim -o define -t mksysb \
        -a location=/export/mksysb/mksysb_gold_5300-05-04 \
        -a server=master mksysb_gold_5300-05-04
    

  • Define the SPOT resource object

        mkdir -p /export/spot
    

        nim -o define -t spot -a server=master \
        -a location=/export/spot \
        -a source=mksysb_gold_5300-05-04  aixspot_gold_5300-05-04
    


    # mdcapdef00: From the HMC, boot the system to SMS and define the network boot IP information.

       Client IP: 206.245.38.63
       Server IP: 206.245.37.100
      Gateway IP: 206.245.38.1
         NetMask: 255.255.255.0
    

    # mdcapnim01: Define the LPAR as a machine to NIM using the node name "mdcapdef00-mc2"

    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the client LPAR "mdcapdef00-mc2":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapdef00-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_5300-05-04
              Select the SPOT to use for the installation - aixspot_gold_5300-05-04
      
              Install the Base Operating System on Standalone Clients
    

          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    

    # mdcapdef00: Continue the network boot.


    # mdcapdef01: From the HMC, boot the system to SMS and define the network boot IP information.

       Client IP: 206.245.38.64
       Server IP: 206.245.37.100
      Gateway IP: 206.245.38.1
         NetMask: 255.255.255.0
    

    # mdcapnim01: Define the LPAR as a machine to NIM using the node name "mdcapdef01-mc2"

    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the client LPAR "mdcapdef01-mc2":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapdef01-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_5300-05-04
              Select the SPOT to use for the installation - aixspot_gold_5300-05-04
    

              Install the Base Operating System on Standalone Clients
      
          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    

    # mdcapdef01: Continue the network boot.


    # mdcapdef02: From the HMC, boot the system to SMS and define the network boot IP information.

       Client IP: 206.245.38.65
       Server IP: 206.245.37.100
      Gateway IP: 206.245.38.1
         NetMask: 255.255.255.0
    

    # mdcapnim01: Define the LPAR as a machine to NIM using the node name "mdcapdef02-mc2"

    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the client LPAR "mdcapdef02-mc2":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapdef02-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_5300-05-04
              Select the SPOT to use for the installation - aixspot_gold_5300-05-04
      
              Install the Base Operating System on Standalone Clients
      
          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    

    # mdcapdef02: Continue the network boot.


    # mdcapdef03: From the HMC, boot the system to SMS and define the network boot IP information.

       Client IP: 206.245.38.66
       Server IP: 206.245.37.100
      Gateway IP: 206.245.38.1
         NetMask: 255.255.255.0
    

    # mdcapnim01: Define the LPAR as a machine to NIM using the node name "mdcapdef03-mc2"

    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the client LPAR "mdcapdef03-mc2":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapdef03-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_5300-05-04
              Select the SPOT to use for the installation - aixspot_gold_5300-05-04
      
              Install the Base Operating System on Standalone Clients
      
          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    

    # mdcapdef03: Continue the network boot.


    # mdcapdef04: From the HMC, boot the system to SMS and define the network boot IP information.

       Client IP: 206.245.38.67
       Server IP: 206.245.37.100
      Gateway IP: 206.245.38.1
         NetMask: 255.255.255.0
    

    # mdcapnim01: Define the LPAR as a machine to NIM using the node name "mdcapdef04-mc2"

    # mdcapnim01: Configure the NIM server to perform a remote operating system load of the client LPAR "mdcapdef04-mc2":

      smitty nim
        Perform NIM Software Installation and Maintenance Tasks
          Install and Update Software
            Install the Base Operating System on Standalone Clients
              Select Target Machine - mdcapdef04-mc2
              Select the installation TYPE - mksysb
              Select the MKSYSB to use for the installation - mksysb_gold_5300-05-04
              Select the SPOT to use for the installation - aixspot_gold_5300-05-04
      
              Install the Base Operating System on Standalone Clients
      
          ACCEPT new license agreements?                   [yes]
        Initiate reboot and installation now?              [no]
          ACCEPT new license agreements?                   [yes]
    

    # mdcapdef04: Continue the network boot.


    # mdcapdef0?: On each client LPAR: copy the vscsiPriority script from the NIM server to the VIO server and set the path priority for each disk.

      mkdir /usr/local/scripts
      scp root@206.245.37.100:/home/s45x/dukeEnergy/vscsiPriority.ksh /usr/local/scripts
      /usr/local/scripts/vscsiPriority.ksh -voi 20
      
      for i in $( lsdev -Cc disk -s vscsi -F name )
      do
        P0=$( lspath -Al ${i} -p vscsi0 -F value -a priority )     
        P1=$( lspath -Al ${i} -p vscsi1 -F value -a priority )      
        print "${i} : vscsi0 : priority = ${P0}"     
        print "${i} : vscsi1 : priority = ${P1}"     
      done
    


    # mdcapdef0?: On each client LPAR: clean-up any leftover info from mksysb install

      rmuser oradef0
      rmuser oradef1
      rmuser oradef2
      rmuser oradef3
      rmuser oradef4
      rmuser oradef5
      rmuser oradef6
      rmuser oradef7
      rmuser oradef8
      rmuser oraedn1
      rmuser oraedn2
      rmuser shre
      rmuser organ
      
      rm -rf /home/organ
      rm -rf /home/oradef
      rm -rf /home/oraedn1
      rm -rf /home/oraedn2
      rm -rf /home/shre
      rm  -f /home/tibco
      
      rm -rf /ednddtu1
      rm -rf /ednddtu2
      rm -rf /aacal01
      rm -rf /adcal01
      rm -rf /mnt1
      rm -rf /mnt2
      rm -rf /mnt3
      rm -rf /mnt4
      rm -rf /mnt5
      rm -rf /nohup.out
      rm -rf smit.*
      rm -rf /dolvs.*
      rm /usr/local/scripts/defdd*
      rm /usr/local/hascripts/edn*
      rm /usr/local/hascripts/start_*
      rm /usr/local/hascripts/stop_*
    


    # mdcapdef0?: On each Client LPAR: configure the node name and host name

      uname -S mdcapdef00
      hostname mdcapdef00
    

      uname -S mdcapdef01
      hostname mdcapdef01
    

      uname -S mdcapdef02
      hostname mdcapdef02
    

      uname -S mdcapdef03
      hostname mdcapdef03
    

      uname -S mdcapdef04
      hostname mdcapdef04
    

    # mdcapdef0?: On each Client LPAR: Configure LPAR etherchannel devices

    # mdcapdef0?: On each client LPAR: configure a static route to the mdcapnim01 network

      lsattr -El inet0
      chdev -l inet0 -a delroute='net,-hopcount,0,,0,206.245.38.1'
      lsattr -El inet0
      route add 206.245.37.0 206.245.38.1
      netstat -rn
      
    

    # mdcapdef0?: ADMINISTRATORS NOTE: It is usually easier to remove all ethernet information and start from the beginning than to attempt to fix a flawed configuration.

    # mdcapdef0?: Unconfigure all ethernet adapters

      lscfg -l ent*
      for i in 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
      do
        ifconfig en${i} down  
        ifconfig en${i} detach
        ifconfig et${i} down  
        ifconfig et${i} detach
        rmdev -Rdl ent${i}
        rmdev -Rdl en${i}
        rmdev -Rdl et${i}
      done
      ifconfig -a
      lsdev -Cc adapter | grep ent
    

    # mdcapdef0?: Rediscover all ethernet adapters

      cfgmgr
      lsdev -Cc adapter | grep ent
      lsdev -C | grep inet
      lsdev -C | grep lo
      lscfg -l ent*
    

    # mdcapdef0?: turn off the chksum_offload parameter on all adapters

      for i in 10 9 8 7 6 5 4 3 2 1 0
      do
        lsattr -El ent${i} | grep chksum_offload
        chdev -l ent${i} -a chksum_offload=no   
        chdev -l ent${i} -a chksum_offload=no -P
        lsattr -El ent${i} | grep chksum_offload
      done
    

    # mdcapdef0?: Even numbered hosts should use the even numbered virtual ethernet adapter as primary network path.

    # mdcapdef0?: Odd numbered hosts should use the odd numbered virtual ethernet adapter as primary network path.

      
      NETADDR="10.189.40.1"   
      MC2ADDR="206.245.38.1"  
      ZERO=0
      ONE=1
      TWO=2
      THREE=3
    

    # mdcapdef0?: If the hostname is odd numbered, reverse the adapter order

      if [[ "$( hostname )" == *[13579] ]]
      then
        ZERO=1
        ONE=0
        TWO=3
        THREE=2
      fi
      
      if mkdev -c adapter -s pseudo -t ibm_ech \
         -a adapter_names="ent${ZERO}" \
         -a backup_adapter="ent${ONE}" \
         -a netaddr="${NETADDR}"  
      then
          /usr/lib/methods/defif
      fi
      if mkdev -c adapter -s pseudo -t ibm_ech \
         -a adapter_names="ent${TWO}" \
         -a backup_adapter="ent${THREE}" \
         -a netaddr="${MC2ADDR}"
      then
          /usr/lib/methods/defif
      fi
      lsdev -Cc adapter | grep ent   
      
      lsattr -El ent4
      lsattr -El ent5
      
    
    


    # mdcapdef0?: On each client LPAR: configure IP addresses on etherchannels

      smitty tcpip
    

    # mdcapdef0?: use the following information specific to each client LPAR

      
    
  • mdcapdef00-pers: en4: inet 10.189.41.10 netmask 0xffffff00
  • mdcapdef00-mc2: en5: inet 206.245.38.63 netmask 0xfffffe00
  • mdcapdef01-pers: en4: inet 10.189.41.11 netmask 0xffffff00
  • mdcapdef01-mc2: en5: inet 206.245.38.64 netmask 0xfffffe00
  • mdcapdef02-pers: en4: inet 10.189.41.12 netmask 0xffffff00
  • mdcapdef02-mc2: en5: inet 206.245.38.65 netmask 0xfffffe00
  • mdcapdef03-pers: en4: inet 10.189.41.13 netmask 0xffffff00
  • mdcapdef03-mc2: en5: inet 206.245.38.66 netmask 0xfffffe00
  • mdcapdef04-pers: en4: inet 10.189.41.14 netmask 0xffffff00
  • mdcapdef04-mc2: en5: inet 206.245.38.67 netmask 0xfffffe00
  • # mdcapdef0?: On each client LPAR: configure a static route to the mdcapnim01 network

      lsattr -El inet0
      chdev -l inet0 -a delroute='net,-hopcount,0,,0,206.245.38.1'
      lsattr -El inet0
      route add 206.245.37.0 206.245.38.1
      netstat -rn
      
      vi /etc/rc.net
          /usr/sbin/route add 206.245.37.0 206.245.38.1
          /bin/hostname mdcapdef0?
    


    # mdcapdef0?: On each client LPAR: Add the following entries to the /etc/hosts file on all client LPAR's, VIO servers, and mdcapnim01

      127.0.0.1	loopback		localhost
      206.245.37.100	mdcapnim01-mc2.def.ad	mdcapnim01-mc2	mdcapnim01
      
      206.245.38.60	mdclphmc10-mc2.def.ad	mdclphmc10-mc2
      206.245.38.61	mdcapvio10-mc2.def.ad	mdcapvio10-mc2
      206.245.38.62	mdcapvio11-mc2.def.ad	mdcapvio11-mc2
      206.245.38.63	mdcapdef00-mc2.def.ad	mdcapdef00-mc2
      206.245.38.64	mdcapdef01-mc2.def.ad	mdcapdef01-mc2
      206.245.38.65	mdcapdef02-mc2.def.ad	mdcapdef02-mc2
      206.245.38.66	mdcapdef03-mc2.def.ad	mdcapdef03-mc2
      206.245.38.67	mdcapdef04-mc2.def.ad	mdcapdef04-mc2
      
      10.189.41.6	mdclphmc10.def.ad	mdclphmc10
      10.189.41.7	mdcapvio10.def.ad	mdcapvio10
      10.189.41.8	mdcapvio11.def.ad	mdcapvio11
      
      10.189.41.10	mdcapdef00-pers.def.ad	mdcapdef00-pers
      10.189.41.11	mdcapdef01-pers.def.ad	mdcapdef01-pers
      10.189.41.12	mdcapdef02-pers.def.ad	mdcapdef02-pers
      10.189.41.13	mdcapdef03-pers.def.ad	mdcapdef03-pers
      10.189.41.14	mdcapdef04-pers.def.ad	mdcapdef04-pers
      10.189.41.20	mdcapdef00.def.ad	mdcapdef00
      10.189.41.21	mdcapdef01.def.ad	mdcapdef01
      10.189.41.22	mdcapdef02.def.ad	mdcapdef02
      10.189.41.23	mdcapdef03.def.ad	mdcapdef03
      10.189.41.24	mdcapdef04.def.ad	mdcapdef04
      10.189.41.30	mdcapdef00-rg01.def.ad	mdcapdef00-rg01
      10.189.41.31	mdcapdef01-rg01.def.ad	mdcapdef01-rg01
      10.189.41.32	mdcapdef02-rg01.def.ad	mdcapdef02-rg01
      10.189.41.33	mdcapdef03-rg01.def.ad	mdcapdef03-rg01
      10.189.41.34	mdcapdef04-rg01.def.ad	mdcapdef04-rg01
    


    # mdcapdef0?: Configure groups


    # mdcapdef0?: On each client LPAR: Configure users and set passwords

      mkdir /usr/local/bin
      scp root@mdcapnim01:/usr/local/bin/setpwd /usr/local/bin
    

      UID=$( echo avanduyn | sum -r )
      UID="${UID//[!0-9]/}"
      mkuser id=${UID} gecos="Al Vanduyn|CGE|816.459.3059|Alvin.VanDuyne@capgemini.com" avanduyn
      /usr/local/bin/setpwd -u avanduyn -p 'yrXB8jKX'
      grep avanduyn /etc/passwd
    

      UID=$( echo skuditin | sum -r )
      UID="${UID//[!0-9]/}"
      mkuser id=${UID} gecos="Sanjay Kuditini|CGE|816.347.7602|sanjay.kuditini@capgemini.com" skuditin
      /usr/local/bin/setpwd -u skuditin -p 'mixM5jm='
      grep skuditin /etc/passwd
    

      UID=$( echo avonnied | sum -r )
      UID="${UID//[!0-9]/}"
      mkuser id=${UID} gecos="Adam vonNieda|CGE|816.347.7941|adam.vonnieda@capgemini.com" avonnied
      /usr/local/bin/setpwd -u avonnied -p 'uA@Lj44&'
      grep avonnied /etc/passwd
    

      mkgroup -A id=369751 dbaora
      mkgroup -A id=574551 defs
    

      mkuser id=214 gecos="People Soft Account" groups='staff,defs' psoft
      chuser fsize='-1' psoft
      chuser  data='-1' psoft
      chuser stack='-1' psoft
      /usr/local/bin/setpwd -u psoft -p password
      id psoft
    

      mkuser id=3553 gecos="Oracle DB Account" groups='dbaora,defs' oracle
      chuser fsize='-1' oracle
      chuser  data='-1' oracle
      chuser stack='-1' oracle
      /usr/local/bin/setpwd -u oracle -p password
      id oracle
    

      mkgroup -A id=369751 dbaora
      chuser pgrp='dbaora' groups='dbaora,defs' psoft
      chuser pgrp='dbaora' groups='dbaora,defs' oracle
      egrep '^dbaora:|^defs:' /etc/group
     
    
    


    # mdcapdef0?: On each client LPAR: Configure performance tools/nfs directory

      smitty mknfsmnt
        Add a File System for Mounting
          Pathname of mount point                            [/prfpmce0]
          Pathname of remote directory                       [/prfpmce0]
          Host where remote directory resides                [206.245.37.100]
          Security method                                    [sys]
          Mount now, add entry to /etc/filesystems or both?   both
          /etc/filesystems entry will mount the directory     yes
            on system restart. 
          Mode for this NFS file system                       read-write
          Attempt mount in background or foreground           background
          Mount file system soft or hard                      hard
    

      rmfs /prfdmce0
      rmfs /prfpmce0
      /usr/sbin/mknfsmnt -f /prfpmce0 -d /prfpmce0 -h 206.245.37.100 -M sys \
        -B -A -t rw -w bg -Y -Z -X -H -j -q -g
    

      lsfs /prfpmce0
      df
    

      mkdir -p /prfpmce1/mdcapdef00/Top
      mkdir -p /prfpmce0/mdcapdef00/wlm
      mkdir -p /prfpmce0/mdcapdef01/Top
      mkdir -p /prfpmce0/mdcapdef01/wlm
      mkdir -p /prfpmce0/mdcapdef02/Top
      mkdir -p /prfpmce0/mdcapdef02/wlm
      mkdir -p /prfpmce0/mdcapdef03/Top
      mkdir -p /prfpmce0/mdcapdef03/wlm
      mkdir -p /prfpmce0/mdcapdef04/Top
      mkdir -p /prfpmce0/mdcapdef04/wlm
    


    # mdcapdef0?: On each client LPAR: Configure NFS installation NFS directory

      mount 206.245.37.100:/export/defs /mnt
    





    # mdcapdef0?: Request application storage from SAN Group - Mike Wilson


    # mdcapvio??: Configure application storage from SAN on both VIO servers

    # mdcapvio10: discover the application SAN storage disks

      cfgmgr
    

    # mdcapvio10: Change reserve policy on hdisks to "no_reserve"

        
      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        chdev -l ${i} -a pv=yes
        chdev -l ${i} -a reserve_policy=no_reserve
        chdev -l ${i} -a algorithm=round_robin
        chdev -l ${i} -a hcheck_interval=20
        chdev -l ${i} -a queue_depth=16
      done
    

      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        lsattr -El ${i} -a reserve_policy -F name=value
        lsattr -El ${i} -a algorithm -F name=value
        lsattr -El ${i} -a hcheck_interval -F name=value
        lsattr -El ${i} -a queue_depth -F name=value
      done
    

    # mdcapvio10: set the path priority for each disk.

      /usr/local/scripts/vscsiPriority.ksh -vi 20
      /usr/local/scripts/vscsiPriority.ksh -voi 20
    

      for i in $( lsdev -Cc disk -s fcp -F name )
      do
        P0=$( lspath -Al ${i} -p fscsi0 -F value -a priority )
        P1=$( lspath -Al ${i} -p fscsi1 -F value -a priority )
        print "${i} : fscsi0 : priority = ${P0}"
        print "${i} : fscsi1 : priority = ${P1}"
      done
    

    # mdcapvio10: copy the storage allocation script from the NIM server to mdcapvio10 and execute it on mdcapvio10.

    # mdcapvio10: You will need to EDIT mkvdev.mdcapvio10.ksh to have the correct hdisk numbers

    # mdcapvio10: allocate the hdisks to the vhost adapters using a prewritten script

      scp root@mdcapnim01:/home/s45x/dukeEnergy/mkvdev.mdcapvio10.ksh /home/padmin
      cd /home/padmin
      vi  ./mkvdev.mdcapvio10.ksh  # EDIT hdisk numbers
      ./mkvdev.mdcapvio10.ksh
    

    # mdcapvio10: reboot the VIO server so that path priority settings take effect


    # mdcapvio11: discover the application SAN storage disks

      cfgmgr
    

    # mdcapvio11: Change reserve policy on hdisks to "no_reserve"

        
      for i in $( lsdev -Cc disk -s fcp -F name | grep hdisk )
      do
        chdev -l ${i} -a reserve_policy=no_reserve
        chdev -l ${i} -a algorithm=round_robin  
        chdev -l ${i} -a hcheck_interval=20
        chdev -l ${i} -a queue_depth=16
        chdev -l ${i} -a pv=yes
      done
    

    # mdcapvio11: set the path priority for each disk.

      /usr/local/scripts/vscsiPriority.ksh -vi 20
      /usr/local/scripts/vscsiPriority.ksh -voi 20
    

      for i in $( lsdev -Cc disk -s fcp -F name )
      do
        P0=$( lspath -Al ${i} -p fscsi0 -F value -a priority )
        P1=$( lspath -Al ${i} -p fscsi1 -F value -a priority )
        print "${i} : fscsi0 : priority = ${P0}"
        print "${i} : fscsi1 : priority = ${P1}"
      done
    

    # mdcapvio11: copy the storage allocation script from the NIM server to mdcapvio11 and execute it on mdcapvio11.

    # mdcapvio11: You will need to EDIT mkvdev.mdcapvio11.ksh to have the correct hdisk numbers

    # mdcapvio11: allocate the hdisks to the vhost adapters using a prewritten script

      scp root@mdcapnim01:/home/s45x/dukeEnergy/mkvdev.mdcapvio11.ksh /home/padmin
      cd /home/padmin
      vi  ./mkvdev.mdcapvio11.ksh  # EDIT hdisk numbers
      ./mkvdev.mdcapvio11.ksh
    

    # mdcapvio11: reboot the VIO server so that path priority settings take effect

      shutdown -Fr
    


    # mdcapdef0?: On each client LPAR: configure application storage on LPAR's


    # mdcapdef0?: On each client LPAR: Configure path priorities for virtual disks

    # mdcapnim01: copy the vscsiPriority script from the NIM server to each client LPAR and set the path priority for each disk.

      if cd /home/s45x/dukeEnergy
      then
    

        for i in 0 1 2 3 4
        do
          ssh -x root@mdcapdef0${i}-mc2 'mkdir -p /usr/local/scripts'
          scp ./vscsiPriority.ksh root@mdcapdef0${i}-mc2:/usr/local/scripts
          ssh -x mdcapdef0${i}-mc2 '/usr/local/scripts/vscsiPriority.ksh -voi 20'
        done
    

        for i in 0 1 2 3 4
        do
          print -- "# mdcapdef0${i}-mc2"
          ssh -x mdcapdef0${i}-mc2 'for i in $( lsdev -Cc disk -s vscsi -F name )
            do
            P0=$( lspath -Al ${i} -p vscsi0 -F value -a priority )
            P1=$( lspath -Al ${i} -p vscsi1 -F value -a priority )
            print "${i} : vscsi0 : priority = ${P0}"
            print "${i} : vscsi1 : priority = ${P1}"
          done'
          print
        done
    

      fi
    


    # mdcapnim01: Configure VG, LVs, LG, FSs (attach dolvs.defpdcg?.sh)

    # mdcapdef0?: # You may create the Volume groups, logical volumes, log volumes, and filesystems manually, or you can use the provided scripts:

    # mdcapnim01: transfer the "dolvs" script to each client LPAR and execute it to create the VGs, LVs, LGs, and FSs

      if cd /home/s45x/dukeEnergy
      then
        for i in 0 1 2 3 4
        do
          ssh -x root@mdcapdef0${i}-mc2 "mkdir -p /usr/local/scripts"
          scp ./dolvs.defpdcg${i}.sh mdcapdef0${i}-mc2:/usr/local/scripts
          ssh -x mdcapdef0${i}-mc2 "/usr/local/scripts/dolvs.defpdcg${i}.sh"
      
    

    # mdcapdef00: dolvs.defpdcg0.sh should be run on mdcapdef00

    # mdcapdef01: dolvs.defpdcg1.sh should be run on mdcapdef01

    # mdcapdef02: dolvs.defpdcg2.sh should be run on mdcapdef02

    # mdcapdef03: dolvs.defpdcg3.sh should be run on mdcapdef03

    # mdcapdef04: dolvs.defpdcg4.sh should be run on mdcapdef04 ssh -x mdcapdef0${i}-mc2 "chown -R psoft:defs /defddcg*" ssh -x mdcapdef0${i}-mc2 "chmod -R 775 /defddcg*" ssh -x mdcapdef0${i}-mc2 "lsuser psoft" ssh -x mdcapdef0${i}-mc2 "lsuser oracle" ssh -x mdcapdef0${i}-mc2 "lsgroup defs" ssh -x mdcapdef0${i}-mc2 "find /defddcg* -exec ls -ld {} \;" ssh -x mdcapdef0${i}-mc2 "rm /etc/ora*" ssh -x mdcapdef0${i}-mc2 "touch /etc/oratab" ssh -x mdcapdef0${i}-mc2 "chown oracle:defs /etc/oratab" ssh -x mdcapdef0${i}-mc2 "chmod 775 /etc/oratab" ssh -x mdcapdef0${i}-mc2 "ls -l /etc/oratab" done fi


    # mdcapnim01: Configure application server start/stop scripts

      DD_HASCR="/usr/local/hascripts"
      DD_LOC="/home/s45x/dukeEnergy"
      
      if cd "${DD_LOC}"
      then
       
        for i in 0 1 2 3 4
        do
      
          print -- "#!/usr/bin/ksh93
    ################################################################
    ifconfig en4 10.189.41.2${i} netmask 255.255.255.0 alias
    ifconfig en4 10.189.41.3${i} netmask 255.255.255.0 alias
    
    varyonvg defpdcg${i}01vg
    mount /defpdcg${i}
    init c
    cd /defpdcg${i}/mflmf
    /defpdcg${i}/mflmf/mflmman
    
    exit 0" > ${DD_LOC}/defpdcg${i}_appl01_start.sh
    
          print -- "#!/usr/bin/ksh93
    ################################################################
    ifconfig en4 10.189.41.2${i} netmask 255.255.255.0 delete   
    ifconfig en4 10.189.41.3${i} netmask 255.255.255.0 delete
    
    cd /defpdcg${i}/mflmf
    /defpdcg${i}/mflmf/lmfgetpv k
    umount -f /defpdcg${i}
    varyoffvg defpdcg${i}01vg
    
    exit 0" > ${DD_LOC}/defpdcg${i}_appl01_stop.sh
      
          chmod 755 ${DD_LOC}/defpdcg${i}_appl01_start.sh
          ls -l ${DD_LOC}/defpdcg${i}_appl01_start.sh
      
          chmod 755 ${DD_LOC}/defpdcg${i}_appl01_stop.sh
          ls -l ${DD_LOC}/defpdcg${i}_appl01_stop.sh
      
          ssh -x root@mdcapdef0${i}-mc2 "mkdir -p ${DD_HASCR}"
          scp ${DD_LOC}/defpdcg${i}_appl01_start.sh root@mdcapdef0${i}-mc2:${DD_HASCR}
          scp ${DD_LOC}/defpdcg${i}_appl01_stop.sh root@mdcapdef0${i}-mc2:${DD_HASCR}
          scp ${DD_LOC}/dolvs.defpdcg${i}.sh  root@mdcapdef0${i}-mc2:${DD_HASCR}
          ssh -x root@mdcapdef0${i}-mc2 "ls -alrt ${DD_HASCR}; echo"
          print -- "####"
      
        done
      
      fi
    


    # mdcapnim01: Configure PLM control of LPARs

      cd /etc/plm/setup
      for i in 0 1 2 3 4
      do
        print --     ./plmsetup mdcapdef0${i}-mc2.def.ad root
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.HostPublic
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.LPAR
      
        print --     ./plmsetup mdcapdef0${i}-mc2.def.ad root
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.HostPublic
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.LPAR
      
        print --     ./plmsetup mdcapdef0${i}-mc2.def.ad root
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.HostPublic
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.LPAR
      
        print --     ./plmsetup mdcapdef0${i}-mc2.def.ad root
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.HostPublic
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.LPAR
      
        print --     ./plmsetup mdcapdef0${i}-mc2.def.ad root
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.HostPublic
        CT_CONTACT=mdcapdef0${i}-mc2 lsrsrc IBM.LPAR
        
      done
    


    # mdcapdef0?: Miscellaneous Tasks to perform on each client LPAR

    # mdcapdef0?: On each client LPAR: Add directory exclusions for mksysb backups to /etc/exclude.rootvg.

      print '^./tmp/\n./usr/websm/pc_client/\n./usr/sys/inst.images' > /etc/exclude.rootvg
    


    # mdcapdef0?: On each client LPAR: Set ulimits to unlimited as follows:

      UNAMES[0]='root'
      UNAMES[1]='oracle'
      UNAMES[2]='psoft'
      
      for UNAME in "${UNAMES[@]}"
      do
        chuser rss_hard=-1 ${UNAME}
        chuser stack_hard=-1 ${UNAME}
        chuser fsize=-1 ${UNAME}
        chuser cpu=-1 ${UNAME}
        chuser data=-1 ${UNAME}
        chuser rss=-1 ${UNAME}
        chuser stack=-1 ${UNAME}
        lsuser -a rss_hard stack_hard fsize cpu data rss stack ${UNAME}
      done
    


    # mdcapdef0?: On each client LPAR: AIX tuning parameters

      chdev -l sys0 -a maxuproc=4096
      
      vmo -po maxclient%=45
      vmo -po maxperm%=45
      vmo -po minperm%=3
      vmo -po lru_file_repage=0
      vmo -po strict_maxclient=1
      vmo -po strict_maxperm=0
      vmo -po maxfree=10880
      vmo -po minfree=9600
      vmo -po v_pinshm=1
      vmo -ro memory_affinity=0
      
      vmo -o maxclient%
      vmo -o maxperm%
      vmo -o minperm%
      vmo -o lru_file_repage
      vmo -o strict_maxclient
      vmo -o strict_maxperm
      vmo -o minfree
      vmo -o maxfree
      vmo -o v_pinshm
      vmo -o memory_affinity
    


    # mdcapdef0?: On each client LPAR: Asynchronous I/O and System Tuning Parameters

  • Maximum number of processes per user = 3000
  • Maximum Async I/O requests = 16386
  • Maximum number of Async I/O servers = 300
  • Minimum number of Async I/O servers = 150
  • Set aio0 to start at reboot and make it available in the active kernel

      chdev -l sys0 -a maxuproc=3000 -P
      chdev -l aio0 -a maxreqs=16386 -P
      chdev -l aio0 -a maxservers=300 -P
      chdev -l aio0 -a minservers=150 -P
      chdev -l aio0 -a autoconfig=available -P
      mkdev -l aio0
      lsdev -l aio0
      lsattr -El aio0
    


    # mdcapdef0?: On each client LPAR: Verify settings on each DEFS client LPAR

      ulimit -a
      lsps -a
      lsdev -l aio0
      lsattr -El aio0
      
      for i in $( lsdev -Cc disk -F name )
      do
        print "${i}: $( lsattr -El ${i} | grep queue)"
      done
      
      lsattr -El sys0 -a maxuproc
      vmo -o maxclient%
      vmo -o maxperm%
      vmo -o minperm%
      vmo -o lru_file_repage
      vmo -o strict_maxclient
      vmo -o strict_maxperm
      vmo -o minfree
      vmo -o maxfree
      vmo -o memory_affinity
    


    # mdcapdef0?: On each client LPAR: reboot each system to insure all changes take effect

      shutdown -Fr
    


    # mdcapvio10: create password-less ssh login to mdclphmc10-mc2

    # mdcapvio10: Copy the "mapluns.sh" script from the NIM server and execute it to create a DISKMAP of the LUNs configured by this VIO server:

      scp root@206.245.37.100:/home/s45x/dukeEnergy/mapluns.sh /home/padmin
      cd /home/padmin
      ./mapluns.sh -v \
        -h mdclphmc10-mc2 \
        -u hscroot \
        -s Server-9117-570-SN1013D6E 2>&1 | tee DISKMAP.$( date +"%Y%m%d" )
    


    # mdcapvio11: create password-less ssh login to mdclphmc10-mc2

    # mdcapvio11: Copy the "mapluns.sh" script from the NIM server and execute it to create a DISKMAP of the LUNs configured by this VIO server:

      scp root@206.245.37.100:/home/s45x/dukeEnergy/mapluns.sh /home/padmin
      cd /home/padmin
      ./mapluns.sh -v \
        -h mdclphmc10-mc2 \
        -u hscroot \
        -s Server-9117-570-SN1013D6E 2>&1 | tee DISKMAP.$( date +"%Y%m%d" )
    


    # Backup the client LPAR systems to mdcapnim01

    # mdcapnim01: export the mksysb storage directory

      exportfs -i -o 'root=*' /export/mksysb
    

    # mdcapdef0?: mount the mksysb NFS directory and backup the system

      umount /mnt
      mount 206.245.37.100:/export/mksysb /mnt
      ls -l /mnt/mksysb_[md]dcapdef0[0-9]_*
    

      mksysb -Xive /mnt/mksysb_$( hostname )_$( oslevel -s )_$( date +"%y%m%d" )
    

      ls -l /mnt/mksysb_[md]dcapdef0[0-9]_*
      df
      umount /mnt
      mount 206.245.37.100:/export/defs /mnt
      df
    


    # Backup the VIO servers to mdcapnim01

    # mdcapnim01: export the mksysb storage directory

      exportfs -i -o 'root=*' /export/mksysb
    

    # mdcapvio??: mount the mksysb NFS directory and backup the system

      umount /mnt
      mount 206.245.37.100:/export/mksysb /mnt
      ls -l /mnt/backupios_*
      su - padmin
    

      OUTFILE="/mnt/backupios"
      OUTFILE="${OUTFILE}_$( hostname )"
      OUTFILE="${OUTFILE}_$( ioslevel )"
      OUTFILE="${OUTFILE}_$( date +'%y%m%d' )"
      backupios -file "${OUTFILE}" -mksysb
      unset OUTFILE
    

      exit  # exit from the "padmin" shell
    

      ls -l /mnt/backupios_*
      df
      umount /mnt