+ All Categories
Home > Documents > Nim Management AC ToD-NewScale

Nim Management AC ToD-NewScale

Date post: 06-Apr-2018
Category:
Upload: praveenbenkikere
View: 221 times
Download: 0 times
Share this document with a friend

of 17

Transcript
  • 8/3/2019 Nim Management AC ToD-NewScale

    1/17

    NIM Master and Client ManagementAuthor: Pierre Garon

  • 8/3/2019 Nim Management AC ToD-NewScale

    2/17

    Audience .............................................................................................................................. 3Environments ....................................................................................................................... 3Requirements ....................................................................................................................... 3Mksysb backup management by NIM master ..................................................................... 3

    Resource management ..................................................................................................... 4

    Restrictions ...................................................................................................................... 4Recovery prodecure ............................................................................................................. 4#1: ................................................................................................................................ 4#2: ................................................................................................................................ 5#3: ................................................................................................................................ 5#4: ................................................................................................................................ 6#5: ................................................................................................................................ 8NOTE Restore by rebooting in SMS ........................................................................ 8

    Script for mksysbs ..............................................................................................................14Boot standalone or lpar in maintenance mode via NIM .................................................... 15

  • 8/3/2019 Nim Management AC ToD-NewScale

    3/17

    AudienceThis document is intended to the AIX system administrators that manage servers on theAir Canada account, Tivoli on Demand and SDM-NewScale environment (IBM Internal).In this document you will read on the usage of a NIM Master to backup AIX images,manage these backup resources withing the NIM environment and various recovery

    methods (mksysb restores or boot in maintenance mode to recover the standalone serveror LPAR).

    EnvironmentsThe environments consist of two NIM servers:

    Air Canada: NIM resides on a LPAR acsgyul00010 on a P-550

    ToD/SDM-NewScale: NIM resides on a LPAR camtqbr000todxa on P-570

    These two lpars are strictly using virtual devices managed by VIO servers on theirrespective frame.

    RequirementsThe requirements for this process to be fully functional are:

    1. Proper NIM server installed and configured (in the two environments it is alreadydone).

    2. Proper disk space. This is decided upon contractual obligations or negociatedunderstandings. On the Air Canada account, there is a need to keep X versionsand in the ToD/SDM-NewScale environment two versions are to be kept.

    3. Backup location file system to be exported to all registered NIM clients.4. Proper NIM client communication with the master.

    Mksysb backup management by NIM masterTo backup an AIX OS image by the NIM master, the client has to be registered andcommunication allowed with the master. Take note that if the NIM client was installedvia a NIM installation, the requirements should be met.

    To manage the mksysb images via the NIM master the following command is to be usedand will produce the following output:nim -o define -t mksysb -a server=master -a source=testlpar -a mk_image=yes -a

    location=/export/backups/mksysb/testlpar testlpar_mksysb_test

    +---------------------------------------------------------------------+System Backup Image Space Information

    (Sizes are displayed in 1024-byte blocks.)+---------------------------------------------------------------------+Required = 1117553 (1092 MB) Available = 10671176 (10422 MB)Creating information file (/image.data) for rootvg..Creating list of files to back up ..Backing up 29300 files..............................17531 of 29300 files backed up (59%)...................29300 of 29300 files backed up (100%)0512-038 savevg: Backup Completed Successfully.

  • 8/3/2019 Nim Management AC ToD-NewScale

    4/17

    Resource management

    Once the backup is completed, a new resource was created at the NIM master level. Toview the resource type the following command:# lsnim -t mksysb5300-03master_sysb resources mksysb

    testlpar_mksysb_1430160407 resources mksysbacsgyul00002_mksysb_1713140407 resources mksysbtestlpar_mksysb_1430170407 resources mksysbacsgyul00005_mksysb_1725140407 resources mksysb

    In the above output, all the mksysb resources managed by the NIM master are listed.

    Via smitty, the deletion of the resource is done via command:nim o remove imagename where image name is the resource listed from the list

    mksysb resources (lsnim t mksysb). There is an additional parameter that can bepassed along which is delete the image file (yes or no).

    More information will be made available in this document as this process is going to be

    managed more and more and situations will be encountered.

    Restrictions

    If mksysb backups are to be triggered and managed by the NIM master, only one backupcan be running at a specific time therefore, serial backups have to be done. A quickrecommendation would be to create a script that will run all the required mksysb backupsin sequence.

    Recovery prodecureThis test case will demonstrate a recovery of server/lpar using a mksysb image resource.

    The scenario will use NIM server on lpar acsgyul00010 and a test LPAR named testlpar.

    The steps that this test case will demonstrate are:1. creation of a dummy file for proof of proper recovery.2. mksysb backup taken from the NIM.3. setup of NIM master to allow recovery of the test lpar.4. recovery steps from a standalone server or LPAR. In this case, it will be LPAR.5. verification of the recovered lpar.

    #1:

    # hostname

    testlpar# cd /tmp# ls.all_media_efix_packages.295166 299108.mnt0 dpi_socket.ctinst.log Spmi_shm_hook lost+found.oslevel.datafiles _nim_299108.err rc.net.out.sr_migrate.log _nim_319626 rc.net.serial.out.strload.mutex _nim_dir_299108 vgdata.toc bos# touch TOCONFIRMMKSYSBBACKEDUPTHISFILE

  • 8/3/2019 Nim Management AC ToD-NewScale

    5/17

    # ls.all_media_efix_packages.295166 299108.mnt0 bos.ctinst.log Spmi_shm_hook dpi_socket.oslevel.datafiles TOCONFIRMMKSYSBBACKEDUPTHISFILE lost+found.sr_migrate.log _nim_299108.err rc.net.out.strload.mutex _nim_319626 rc.net.serial.out

    .toc _nim_dir_299108 vgdataThe file was created.

    #2:

    Backup command and status:root@acsgyul00010:/export/backups/mksysb/testlpar#nim -o define -t mksysb -a server=master -a source=testlpar -a mk_image=yes -alocation=/export/backups/mksysb/testlpar_mksysb_test testlpar_mksysb_test /tftpboot/530spot_res.chrp.mp.ent-rw-r--r-- 1 root system 1142 Apr 17 21:41 testlpar.info

    Reboot to SMS the standalone server or LPAR:Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------Main Menu1. Select Language2. Setup Remote IPL (Initial Program Load)3. Change SCSI Settings4. Select Console5. Select Boot Options-------------------------------------------------------------------------------Navigation Keys:

    X = eXit System Management Services

    -------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key: 2

  • 8/3/2019 Nim Management AC ToD-NewScale

    10/17

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------NIC Adapters

    Device Location Code HardwareAddress

    1. Interpartition Logical LAN U9113.550.10E12FF-V6-C3-T1 626a6819c03d

    -------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key: 1

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------Network Parameters

    Interpartition Logical LAN: U9113.550.10E12FF-V6-C3-T11. IP Parameters2. Adapter Configuration3. Ping Test4. Advanced Setup: BOOTP

    -------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services

    -------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key: 1

    Select each option and enter the proper information. Use the NIM IP address as thegateway IP address.Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------IP Parameters

    Interpartition Logical LAN: U9113.550.10E12FF-V6-C3-T11. Client IP Address [10.43.2.29]2. Server IP Address [10.43.2.199]

    3. Gateway IP Address [10.43.2.199]4. Subnet Mask [255.255.255.0]-------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key: 1

  • 8/3/2019 Nim Management AC ToD-NewScale

    11/17

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------

    Network ParametersInterpartition Logical LAN: U9113.550.10E12FF-V6-C3-T11. IP Parameters2. Adapter Configuration3. Ping Test4. Advanced Setup: BOOTP-------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key:2

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------Adapter Configuration

    Interpartition Logical LAN: U9113.550.10E12FF-V6-C3-T11. Speed,Duplex2. Spanning Tree Enabled3. Protocol-------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------

    Type menu item number and press Enter or select Navigation key: 1

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------Speed,Duplex

    Interpartition Logical LAN: U9113.550.10E12FF-V6-C3-T11. auto,auto ( none )

  • 8/3/2019 Nim Management AC ToD-NewScale

    12/17

    2. No

  • 8/3/2019 Nim Management AC ToD-NewScale

    13/17

    -------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key:1

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------

    Select Device Type1. Diskette2. Tape3. CD/DVD4. IDE5. Hard Drive6. Network7. List all Devices-------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------

    Type menu item number and press Enter or select Navigation key:6

    Version SF240_284SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.

    -------------------------------------------------------------------------------Select DeviceDevice Current DeviceNumber Position Name1. - Virtual Ethernet

    ( loc=U9113.550.10E12FF-V6-C3-T1 )

    -------------------------------------------------------------------------------Navigation keys:

    M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key:1

    SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.-------------------------------------------------------------------------------Select Task

    Virtual Ethernet( loc=U9113.550.10E12FF-V6-C3-T1 )

    1. Information2. Normal Mode Boot3. Service Mode Boot-------------------------------------------------------------------------------Navigation keys:M = return to Main MenuESC key = return to previous screen X = eXit System Management Services-------------------------------------------------------------------------------Type menu item number and press Enter or select Navigation key:2

  • 8/3/2019 Nim Management AC ToD-NewScale

    14/17

    Once Yes is answered to continue, something similar to the messages below shouldappear and the install should then begin:

    BOOTP: chosen-network-type = ethernet,auto,none,autoBOOTP: server IP = 10.43.2.199BOOTP: requested filename =

    BOOTP: client IP = 10.43.2.29BOOTP: client HW addr = 62 6a 68 19 c0 3dBOOTP: gateway IP = 10.43.2.199BOOTP: device /vdevice/l-lan@30000003BOOTP: loc-code U9113.550.10E12FF-V6-C3-T1

    BOOTP R = 1 BOOTP S = 2

    Script for mksysbsThe following is a simple script that will cleanup the backup file location, delete therequired mksysb resources and trigger the mksysb from the NIM master:#!/bin/ksh# To perform an lpar mksysb onto the nim.# This will create a new nim resource therefore maintenance# is required on a regular basis in order to keep a clean# filesystem and nim environment.## Declare varsexport NIM_MKSYSB_SUBDIRS=yesexport MKSYSBDIR=/export/backups/mksysbexport DATE=`date +%H%M%d%m%y`export LPARMKSYSBDIR=/export/backups/mksysb/testlpar_mksysb_$DATE################################################# Verify the mksysb resources for the lpar################################################/usr/bin/echo "List of NIM mksysb resources for testlpar"lsnim -t'mksysb' | grep testlpar/usr/bin/echo "Deleting old mksysb resources and files"# NIM Maintenance section# Change dir and check for files to deletecd /export/backups/mksysb/testlparoldres=`find . -mtime +1 -print;`echo $oldres > /root/NIM/testlpar.listsed "s/.\///g" /root/NIM/testlpar.list > /root/NIM/testlpar.list.delete# This section is to delete the NIM resourcefor i in cat /root/NIM/testlpar.list.deletedo

    nim -o remove $idone# This section is to delete the NIM backup file.for i in cat /root/NIM/testlpar.list`dorm -f /export/backups/mksysb/testlpar/$idone

    # List NIM resources and files

  • 8/3/2019 Nim Management AC ToD-NewScale

    15/17

    /usr/bin/echo "NIM res and files after maintenance:"lsnim -t'mksysb'ls -l /export/backups/mksysb/testlpar# Trigger the mksysbnim -o define -t mksysb -a server=master -a source=testlpar -a mk_image=yes -alocation=$LPARMKSYSBDIR testlpar_mksysb_$DATE

    Boot standalone or lpar in maintenance mode via NIMDifferent situation may require a standalone server or lpar to be booted in maintenancemode (root password lost, kernel stuck at startup due to a wrong value in a parameter,etc). To boot in maintenance mode via the NIM master server, do the steps listedbelow:

    On the NIM master:root@acsgyul00010:/root#lsnim -l testlpar

    testlpar:class = machinestype = standaloneconnect = shellcomments = test lpar for a nim installplatform = chrpnetboot_kernel = mpif1 = master_net testlpar 0cable_type1 = tpCstate = ready for a NIM operation

    prev_state = not runningMstate = currently runningcpuid = 00CE12FF4C00

    Cstate_result = successroot@acsgyul00010:/root#nim -o maint_boot -a spot=530spot_res testlpar

    root@acsgyul00010:/root#lsnim -l testlpar

    testlpar:class = machinestype = standaloneconnect = shellcomments = test lpar for a nim installplatform = chrpnetboot_kernel = mpif1 = master_net testlpar 0cable_type1 = tpCstate = maintenance boot has been enabled

    prev_state = ready for a NIM operationMstate = currently runningboot = bootspot = 530spot_rescpuid = 00CE12FF4C00control = master

  • 8/3/2019 Nim Management AC ToD-NewScale

    16/17

    On the standalone server or lpar, boot in SMS using the same steps as in the NOTE Restore by rebooting in SMS section (configure IP, etc). Once the environment isbooted in maintenance mode, import rootvg and start a shell. Here are some of the screenshots:

    You will be prompted to press 1 and enter to select the console and to press 1 again forEnglish during the maintenance.

    Maintenance

    Type the number of your choice and press Enter.

    >>> 1 Access a Root Volume Group2 Copy a System Dump to Removable Media3 Access Advanced Maintenance Functions4 Erase Disks

    88 Help ?

    99 Previous Menu

    >>> Choice [1]: 1

    Warning:

    If you choose to access a root volume group, you will NOT be able to returnto the Base Operating System Installation menus without rebooting.

    Type the number of your choice and press Enter.

    0 Continue

    88 Help ?>>> 99 Previous Menu

    >>> Choice [99]: 0

    Access a Root Volume Group

    Type the number for a volume group to display the logical volume informationand press Enter.

    1) Volume Group 00ce12ff00004c000000011201a13ab3 contains these disks:hdisk0 17216 vscsi

    Choice: 1

    ------------------------------------------------------------------------------Volume Group ID 00ce12ff00004c000000011201a13ab3 includes the followinglogical volumes:

    hd5 hd6 hd8 hd4 hd2 hd9varhd3 hd1 hd10opt

    ------------------------------------------------------------------------------

  • 8/3/2019 Nim Management AC ToD-NewScale

    17/17

    Type the number of your choice and press Enter.1) Access this Volume Group and start a shell2) Access this Volume Group and start a shell before mounting filesystems

    99) Previous Menu

    Choice [99]: 1

    Importing Volume Group...Once the file system checks are completed, you should get your prompt to start doing themaintenance work:

    Filesystems mounted for maintenance work.# df -kFilesystem 1024-blocks Free %Used Iused %Iused Mounted on/dev/ram0 32768 14076 58% 1855 36% /acsgyul00010.aircanada.ca:/export/aix53/spot/530spot_res/usrdf: /SPOT/usr: No such file or directory/dev/hd4 32768 14076 58% 1855 36% //dev/hd2 1146880 83832 93% 25401 55% /usr/dev/hd3 65536 64028 3% 38 1% /tmp

    /dev/hd9var 32768 24888 25% 344 6% /var


Recommended