Showing posts with label IBM AIX - HMC. Show all posts
Showing posts with label IBM AIX - HMC. Show all posts

Saturday, December 15, 2012

IBM AIX - Creating a New LPAR using HMC GUI


IBM AIX - Creating a New LPAR using HMC GUI - Dedicated Resource!!

Step1: Login into HMC GUI.
To create a new logical partition, you have to login into HMC either locally or remotely using WebSM or using web browser. Example below uses WebSM to login into the HMC



Type the hostname of HMC that you want to connect to and click on Log on tab.In this example we are logging into adcaphmc01 to create a new logical partition.

                                                        


WebSM client then communicates with WebSM server services on HMC and prompts for user name and password. Enter the username and password for HMC and click on Log on tab.
A successful authentication allows you to access the HCM GUI as shown below.




Step 2: Plan for the resource allocation to a new LPAR.Before creating any new LPAR, one should plan thoroughly for the resource allocation. An agreement should be made on the minimum, desired and maximum value of processors & memory, shared or dedicated processors and type and number of I/O cards.
In the example to follow, we are creating a new LPAR adcapsap03-HRNEW with following resources
1. CPU – Mode - Shared Processing unit - 0.2 min, 0.5 desired, 1.0 max Virual CPU – 1 min, 1 desired, 2 max
2.Memory – 4 GB min, 8 GB desired , 10 GB Max
3.I/0 cards – 1 * SCSI controller with 4 SCSI disks
(U5791.001.99B064P-P1-T5)
2 * 2Gbps fiber channel cards (U5791.001.99B064P-P1-C05) (U5791.001.99B064P-P2-C08)
3 * Virtual Ethernet cards (U5791.001.99B0760-P2-C06)
Resource allocation for the SAP p590 is mentioned in a separate document.

Step 3: Creating new LPAR
On the left panel, click on adcaphmc01.uk.rweutil.net -> server and partitions ->server management. The right panel will now display the p590 server and the
partitions under it. Right click on thames-p50-01



select Create -> logical partition

This would start a wizard for creating the new LPAR



On this screen, type the partition name as adcapsap03-HR3NEW and select partition environment as AIX or Linux.

Click on Next



This screen prompts for adding the logical partition to a Workload group. Since we are not using any Workload group, so select NO and Click on Next. The following screen prompts for logical partition profile name. Type Profile name as Normal and Click on Next. The following wizard screen prompts for the minimum, desired and maximum value of memory.


        


As mentioned in step 2, we select the values of minimum, desired and maximum memory as 4GB, 8GB and 10GBrespectively.
Click on Next The following wizard screen prompts for the Processor allocation.


         


Because we are using micro partitioning for the development, test and training servers, so select the Shared radio button.
For production servers we would be assigning dedicated processors for the LPAR.I this example we are creating LPAR for a SAP development server, so we select Shared mode and Click on Next.
The following screen prompts for the processing setting


        


As mentioned in step 2, we enter the value of minimum, desired and maximum processing units as 0.2, 05 and 1.0 respectively.
click on Advance tab.

  


Select processing sharing mode as Uncapped with Weight as 128. Under Virtual processor panel, select minimum, desired and maximum values as 1,1 and 2 respectively. Click on OK tab. Again Click on Next to proceed further.
The following wizard screen will prompt for I/O resources.

                             


Select the I/O resources as mentioned in step 2

   


Select U5791.001.99B064P-P1-T5 SCSI bus controller and click on Add as required.
This would add the I/O device to the LPAR profile in pane below.

         


In a similar way add I/O U5791.001.99B064P-P1-C05 Fiber channel card and
U5791.001.99B064P-P2-C08 Fiber channel card to the LPAR profile.

 


Similarly add U5791.001.99B0760-P2-C06 Ethernet adapter to the profile I/O devices.


     


Once all the resources are added to the profile I/O devices as required, Click on Next.
The following wizard screen prompts for I/O pools. Since we are not using any shared I/O pool, so ignore this screen.

      


Click on Next
The following wizard screen prompts for the Virtual I/O Adapters. We are not making any use of Virtual I/O devices in this example.

   


Select No and Click on Next
The following screen prompts for the power controlling partition. For the all the LPARS that we have defined, the default partition 83-8C6DB(1) is acting as the power controlling partition.


   


Ensure that the default partition 83-8C6DB(1) is displayed in the drop down list and click Next.
The following screen prompts for the Boot mode.

   


Select the Boot mode as Normal and click on next
The following wizard screen is a summary Screen. If you want to make any changes on previous screens, the you can use previous tab to scroll back and make changes if any. If you are sure of your selections, the click on Finish tab and this would create the new LPAR.
You will now see a status screen

    


Once the creation of LPAR is successful, the new LPAR is displayed under the managed system thames-p50-01.

                                                     


You can see that the new LPAR adcapsap03-HRNEW under managed system thames-p590-01.
You can recheck the resource allocation by right clicking the profile and selecting properties.



             


This end the procedure to create a new LPAR using dedicated resources.

IBM AIX - Creating a New LPAR using HMC CLI

IBM AIX - Creating a New LPAR using HMC CLI

Here is an example, for more information see '''man mksyscfg'''
mksyscfg -r lpar -m MACHINE -i name=LPARNAME, profile_name=normal, lpar_env=aixlinux, shared_proc_pool_util_auth=1, min_mem=512, desired_mem=2048, max_mem=4096, proc_mode=shared, min_proc_units=0.2, desired_proc_units=0.5, max_proc_units=2.0, min_procs=1, desired_procs=2, max_procs=2, sharing_mode=uncap, uncap_weight=128, boot_mode=norm, conn_monitoring=1, shared_proc_pool_util_auth=1

If you want to create more LPARS at once you can use a configuration file and provide it as input for mksyscfg.
Here is an example for 3 LPARs, each definition starting at new line:

name=LPAR1,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/11/1,7/client/9/vio2a/11/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1
name=LPAR2,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/12/1,7/client/9/vio2a/12/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1
name=LPAR3,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=15360,max_mem=15360,proc_mode=shared,min_proc_units=0.4,desired_proc_units=1.0,max_proc_units=4.0,min_procs=1,desired_procs=4,max_procs=4,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/13/1,7/client/9/vio2a/13/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1 
Copy this file to HMC and run: mksyscfg -r lpar -m SERVERNAME -f /tmp/profiles.txt

If you already have LPARs created you can use this command to get their configuration which can be reused as template: lssyscfg -r prof -m SERVERNAME --filter "lpar_ids=X, profile_names=normal"



Thursday, October 25, 2012

HMC Upgrade using network images

HMC Upgrade using network images

01. Download the appropriate HMC V7 network images and put them on an FTP server.

02. Verify that the following files have been downloaded:

 initrd.gz, bzImage, disk1.img, disk2.img, and disk3.img

03. On the HMC, you must first save upgrade data by running the following commands:

   3a. To save data to both DVD and disk:
        mount /media/cdrom
        saveupgdata -r diskdvd
   3b. To save to disk alone:
        saveupgdata -r disk

04. Next, copy the files over to the bootable disk partition on the HMC from FTP server

    4a. getupgfiles -h remote_hostname  -u --passwd -d
    Note: use -s to use sftp instead of ftp.
    4b. If you want to see the progress of copy process, run the following command
    while true; do ls -la /hmcdump; sleep 30; done

05. After the files are copied over, run the following command:

    chhmc -c altdiskboot -s enable --mode upgrade

    Now the HMC is ready to be rebooted and automatically upgraded with the code copied to the bootable disk partition.

06. Finally, reboot the HMC and start the upgrade.

    hmcshutdown -r -t now

Friday, September 7, 2012

Creating Virtual SCSI Adapter for VIO & LPAR through HMC

Creating Virtual SCSI Adapter for VIO & LPAR through HMC

For VIO

Creating Virtual SCSI Adapter on VIO Dynamically, which will be removed on the next reboot. To make it static check
the next step (b)

a. Login to HMC - Navigate to VIO server - Select the VIO server - Select Dynamic Logical Partition - Select Virtual
Adapter - Goto Actions - Create Virtual Adapter - SCSI Adapter

Create Virtual SCSI Adapter: tilakvio1
Virtual SCSI adapter

Adapter : 6

Type of adapter : Server

[ ] This adapter is required for partition activation.

( ) Any client partition can connect

(•) Only selected client partition can connect
Client partition : aixtest(03)

Client adapter ID : 04

Click on OK

To make the Virtual SCSI Adapter for VIO Permanently.

b. Once created make the same entry on
Login to HMC - Navigate to VIO server - Select the VIO server - Select Configuration - Manage Profile - Select the
profile - Goto Actions - Edit - Select Virtual Adapters - Actions - Create Virtual Adapter - SCSI Adapter

Put exactly the same as we created through DLPAR above and click on OK.

Where,

Create Virtual SCSI Adapter: VIO Server name will be displayed
Adapter : Adapter ID (Leave it as default if you wish)
[ ] This adapter is required for partition activation. - Haven't selected this option, since i am not using it for
rootvg.

( ) Any client partition can connect - If this selected you can map it to any LPAR
 
(•) Only selected client partition can connect - Selected this option for it should map only to this LPAR and given
the details as below,
Client partition : aixtest(03) --> is my LPAR name and on the bracket it will auto display the LPAR ID, where i am
going to map

Client adapter ID : 04 - Leave it as default.

And notedown LPAR name Adapter ID and Client adapter ID.

 Save the profile.
__________________________________________________________________________________

For LPAR

Creating Virtual SCSI Adapter for LPAR Dynamically,

a. Login to HMC - Navigate to LPAR - Select the LPAR(aixtest(03)) - Select Dynamic Logical Partition - Select Virtual
Adapter - Goto Actions - Create Virtual Adapter - SCSI Adapter

Create Virtual SCSI Adapter: aixtest
Virtual SCSI adapter

Adapter : 04

Type of adapter : Client

Server partition : tilakvio1(1)

Server adapter ID : 6

Click on OK

Note: Here the adapter id and Server adapter ID should be matched as per we created the adapter on VIO.
VIOs Client adapter id should be the adapter ID in LPAR
VIOs Adapter id should be the Server adapter ID in LPAR.

Same should be updated in Managed Profile and Save the profile.

b. Login to HMC - Navigate to LPAR - Select the LPAR(aixtest(03)) - Select Configuration - Manage Profile - Select the
profile - Goto Actions - Edit - Select Virtual Adapters - Actions - Create Virtual Adapter - SCSI Adapter

__________________________________________________________________________________

Run configuration Manager on Both VIO and LPAR to get the Virtual Adapter

Now Run the cfgdev in VIO and cfgmgr on LPAR to get those adapters, And make a note of created vhost name and vscsi
name from Hardware profiles of VIO and LPAR.

Login to HMC - Navigate to VIO/LPAR - Virtual I/O Adapters - SCSI

On VIO
$ cfgdev
$ oem_setup_env
# lsdev -Cc adapter | grep -i vhost
vhost4    Available         Virtual SCSI Server Adapter

On LPAR
aixtest# cfgmgr
aixtest# lsdev -Cc adapter | grep -i vscsi
vscsi1 Available       Virtual SCSI Client Adapter

Thursday, September 6, 2012

IBM AIX - Useful HMC Commands!!

Some very useful HMC commands!!
# lshmc -v
Show the release of the HMC:
# lshmc -V
Show network information of the HMC:
# lshmc -n
Reboot the HMC:
# hmcshutdown -r -t now
Show the connected managed systems:
# lssysconn -r all
Change the password of user hscpe:
# chhmcusr -u hscpe -t passwd -v abc1234
List the users of the HMC:
# lshmcusr
These are intersting log files of the HMC:
# ls -al /var/hsc/log/hmclogger.log
# ls -al /var/hsc/log/cimserver.log
Monitor the disk space:
# monhmc -r disk
This can be used to view the file systems of the HMC. Try using "proc", "mem" and "swap as well. By default this command will loop forever and update the screen every 4 seconds. You can run it only once, with the following command:
# monhmc -r disk -n 0
Zero out log files:
# chhmcfs -o f -d 0
This will delete any temporary files. Extremely useful if the HMC calls home to IBM about high usage of one of its file systems. Open a virtual console from the HMC:
# vtmenu
Exit by typing "~." (tilde dot) or "~~." (tilde tilde dot). Force the closure of a virtual terminal session:
# rmvterm -m SYSTEM-9117-570-SN10XXXXX -p name
Change the state of a partition:
# chsysstate -m SYSTEM-9131-52A-SN10XXXXX -r lpar -o on -n name
-f default_profile
# chsysstate -m SYSTEM-9131-52A-SN10XXXXX -r lpar -o shutdown 
-n name --immed
To start all partitions of one managed server:
# chsysstate -m Prd2-Server-8233-E8B-SN0XXXXXX -r lpar -o on --all
List partition profiles for a managed system:
# lssyscfg -r prof -m SYSTEM-9117-570-SN10XXXXX
List partition information:
# lspartition

Pages