Thursday, October 25, 2012

Power 6 Video Tutorial / Training by Nigel Griffith

Power Basic Introduction - by Nigel Griffith



Uploading more!! will be here in few days!!!!!!!!!!

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

How to find wwn in Redhat Linux?

How to find wwn in Redhat Linux?

a.    Below is the simple command to find WWN on Redhat servers.

systool -c fc_host –v

# systool -c fc_host -v | grep "port_name"
    port_name           = "0x5001438001347fdc"
    port_name           = "0x5001438001347fde"
    port_name           = "0x50014380013471f0"
    port_name           = "0x50014380013471f2"
#

b.    Below is the simple steps to find WWN in Linux.

Step 1:  cd /sys/class/fc_host
Step 2:  cd to the host# directory.
Step 3: cat node_name

Useful command to find to list the FC Adapter

lspci | grep -i Fibre


c.    To find WWN on linux with Emulex:
If you find difficult to find WWN on linux with Emulex HBA use below hbacmd to list the HBAs. This only available if hbanyware installed.

cd /usr/sbin/hbanyware
[root@tilak_phy01 hbanyware]# ./hbacmd ListHBAs

Manageable HBA List
Port WWN   : 11:00:00:00:d9:58:bf:92
Node WWN   : 10:00:00:00:b9:58:ba:92
Fabric Name: 20:3f:01:04:51:a1:71:00
Flags      : 1100a980
Host Name  : tilak_phy01
Mfg        : Emulex Corporation

Friday, October 19, 2012

Netmask in Bits|Decimal|Hexadecimal|Binary

Netmask in Bits|Decimal|Hexadecimal|Binary 

Subnetmask Converter / Calculator

Bitmask (Bits) Dotted Decimal Hexadecimal Binary
/0 0.0.0.0 0x00000000 00000000 00000000 00000000 00000000
/1 128.0.0.0 0x80000000 10000000 00000000 00000000 00000000
/2 192.0.0.0 0xc0000000 11000000 00000000 00000000 00000000
/3 224.0.0.0 0xe0000000 11100000 00000000 00000000 00000000
/4 240.0.0.0 0xf0000000 11110000 00000000 00000000 00000000
/5 248.0.0.0 0xf8000000 11111000 00000000 00000000 00000000
/6 252.0.0.0 0xfc000000 11111100 00000000 00000000 00000000
/7 254.0.0.0 0xfe000000 11111110 00000000 00000000 00000000
/8 255.0.0.0 0xff000000 11111111 00000000 00000000 00000000
/9 255.128.0.0 0xff800000 11111111 10000000 00000000 00000000
/10 255.192.0.0 0xffc00000 11111111 11000000 00000000 00000000
/11 255.224.0.0 0xffe00000 11111111 11100000 00000000 00000000
/12 255.240.0.0 0xfff00000 11111111 11110000 00000000 00000000
/13 255.248.0.0 0xfff80000 11111111 11111000 00000000 00000000
/14 255.252.0.0 0xfffc0000 11111111 11111100 00000000 00000000
/15 255.254.0.0 0xfffe0000 11111111 11111110 00000000 00000000
/16 255.255.0.0 0xffff0000 11111111 11111111 00000000 00000000
/17 255.255.128.0 0xffff8000 11111111 11111111 10000000 00000000
/18 255.255.192.0 0xffffc000 11111111 11111111 11000000 00000000
/19 255.255.224.0 0xffffe000 11111111 11111111 11100000 00000000
/20 255.255.240.0 0xfffff000 11111111 11111111 11110000 00000000
/21 255.255.248.0 0xfffff800 11111111 11111111 11111000 00000000
/22 255.255.252.0 0xfffffc00 11111111 11111111 11111100 00000000
/23 255.255.254.0 0xfffffe00 11111111 11111111 11111110 00000000
/24 255.255.255.0 0xffffff00 11111111 11111111 11111111 00000000
/25 255.255.255.128 0xffffff80 11111111 11111111 11111111 10000000
/26 255.255.255.192 0xffffffc0 11111111 11111111 11111111 11000000
/27 255.255.255.224 0xffffffe0 11111111 11111111 11111111 11100000
/28 255.255.255.240 0xfffffff0 11111111 11111111 11111111 11110000
/29 255.255.255.248 0xfffffff8 11111111 11111111 11111111 11111000
/30 255.255.255.252 0xfffffffc 11111111 11111111 11111111 11111100
/31 255.255.255.254 0xfffffffe 11111111 11111111 11111111 11111110
/32 255.255.255.255 0xffffffff 11111111 11111111 11111111 11111111

Thursday, October 11, 2012

IBM AIX - ODM

What is ODM?
ODM
  • Maintains system config, device and vital product data
  • Provide a more robust, secure and sharable resource
  • Provide a reliable object oriented database facility
Data Managed By ODM
  • Device Configuration Information
  • Software Vital Product Data
  • SRC information
  • Communications configuration data
  • Menus and commands for SMIT
ODM has three components
  • Object class - These are datafiles.
  • Objects - Records within Datafiles
  • Descriptors - Field within a record

Where ODM Object Class files are stored?
This can be defined in /etc/environment file. The ODM object clases are held in three repositories
  1. /etc/objrepos
  2. /usr/lib/objrepos
  3. /usr/share/lib/objrepos

Some important ODM Database files

Supported devices and attributes and connection information are stored in
PdDv, PdAt, PdCn, etc..

Records or customizrd Devices and attributes, VPD are stored in
CuDv, CuAt, CuDep, Config_Rules, CuVPD, etc ...

Have software information
lpp, history, product, inventory, etc..
SMIT menus, commands, options
sm_cmd_hdr, sm_cmd_opt, sm_menu_opt
NIM Resource and configuraion informations
nim_object, nim_pdattr, nim_altr
Errorlog, alog and dump file info
SWservAt

Useful ODM Commands

odmget - To retrives objects from an Object Class in stanza format 

odmdelete - To delete objects what meet a specifig criteria. If no criteria specified, all objects are deleted 

odmadd - To add a new object to an object class 

odmchange - To change all objects with in an Object Class that meet a specifig criteria 

odmshow - To display object class definition 

odmcreate - To create Object Class for application that will use ODM DB 

odmdrop - To remove an Oobject Class


Some ODM Command examples

To list all records with an Object Class CuDv
# odmget CuDv

To find out an object within CuAt with condition name=sys0 and attibute=maxuproc
# odmget -q "name=sys0 and attribute=maxuproc" CuAt CuAt: name = "sys0" attribute = "maxuproc" value = "2000" type = "R" generic = "DU" rep = "nr" nls_index = 20

To delete the above object
# odmget -q "name=sys0 and attribute=maxuproc" CuAt > file.1 # odmdelete -q "name=sys0 and attribute=maxuproc" -o CuAt

To add the deleted object again to the above object class
# odmadd file.1 # add the file content to appropriate Object class

Fix ODM related errors for devices (CuDv Object Class)
$ cfgmgr
cfgmgr: 0514-604 Cannot access the CuDv object class in the
device configuration database.
The Fix:
01. cd /etc/oberepos 02. cp Config_Rules Config_Rules.backup 03. odmget -q rule="/etc/methods/darcfgrule" Config_Rules 04. odmdelete -q rule="/etc/methods/darcfgrule" -o Config_Rules 05. savebase -v 06. cfgmgr

Wednesday, October 10, 2012

IBM AIX - Boot Process

AIX Boot Process
  1. When the server is Powered on Power on self test(POST) is run and checks the hardware
  2. On successful completion on POST Boot logical volume is searched by seeing the bootlist
  3. The AIX boot logical contains AIX kernel, rc.boot, reduced ODM & BOOT commands. AIX kernel is loaded in the RAM.
  4. Kernel takes control and creates a RAM file system.
  5. Kernel starts /etc/init from the RAM file system
  6. init runs the rc.boot 1 ( rc.boot phase one) which configures the base devices.
  7. rc.boot1 calls restbase command which copies the ODM files from Boot Logical Volume to RAM file system
  8. rc.boot1 calls cfgmgr –f command to configure the base devices
  9. rc.boot1 calls bootinfo –b command to determine the last boot device
  10. Then init starts rc.boot2 which activates rootvg
  11. rc.boot2 calls ipl_varyon command to activate rootvg
  12. rc.boot2 runs fsck –f /dev/hd4 and mount the partition on / of RAM file system
  13. rc.boot2 runs fsck –f /dev/hd2 and mounts /usr file system
  14. rc.boot2 runs fsck –f /dev/hd9var and mount /var file system and runs copy core command to copy the core dump if available from /dev/hd6 to /var/adm/ras/vmcore.0 file. And unmounts /var file system
  15. rc.boot2 runs swapon /dev/hd6 and activates paging space
  16. rc.boot2 runs migratedev and copies the device files from RAM file system to /file system
  17. rc.boot2 runs cp /../etc/objrepos/Cu* /etc/objrepos and copies the ODM files from RAM file system to / filesystem
  18. rc.boot2 runs mount /dev/hd9var and mounts /var filesystem
  19. rc.boot2 copies the boot log messages to alog
  20. rc.boot2 removes the RAM file system
  21. Kernel starts /etc/init process from / file system
  22. The /etc/init points /etc/inittab file and rc.boot3 is started. Rc.boot3 configures rest of the devices
  23. rc.boot3 runs fsck –f /dev/hd3 and mount /tmp file system
  24. rc.boot3 runs syncvg rootvg &
  25. rc.boot3 runs cfgmgr –p2 or cfgmgr –p3 to configure rest of the devices. Cfgmgr –p2 is used when the physical key on MCA architecture is on normal mode and cfgmgr –p3 is used when the physical key on MCA architecture is on service mode.
  26. rc.boot3 runs cfgcon command to configure the console
  27. rc.boot3 runs savebase command to copy the ODM files from /dev/hd4 to /dev/hd5
  28. rc.boot3 starts syncd 60 & errordaemon
  29. rc.boot3 turn off LED’s
  30. rc.boot3 removes /etc/nologin file
  31. rc.boot3 checks the CuDv for chgstatus=3 and displays the missing devices on the console
  32. The next line of Inittab is executed
/etc/inittab file format: identifier:runlevel:action:command
Mkitab-----Add records to the /etc/inittab file
Lsitab-----List records in the /etc/inittab file
Chitab-----changes records in the /etc/inittab file
Rmitab-----removes records from the /etc/inittab file


Friday, October 5, 2012

zLinux - LVM using Multipath disks!!




1. Take a backup of /etc/zfcp.conf file.

2. Add the LUN entries which are provided in /etc/zfcp.conf file.

Example:
## 300GB LUN for the FS /opt/tibcoBPM
0.0.dc00   0x50060e800571f006      0x0051000000000000
0.0.dd00   0x50060e800571f007      0x0051000000000000
0.0.de00   0x50060e800571f016      0x0051000000000000
0.0.df00   0x50060e800571f017      0x0051000000000000
## 200GB LUN for the FS /opt/dataSTG
0.0.dc00   0x50060e800571f006      0x0052000000000000
0.0.dd00   0x50060e800571f007      0x0052000000000000
0.0.de00   0x50060e800571f016      0x0052000000000000
0.0.df00   0x50060e800571f017      0x0052000000000000

Make note of the LUN ID as highlighted above (51 & 52)

3. Take the fdisk -l | grep -i "/dev/dm-" and multipath -ll output.

4. Execute this sbin script zfcpconf.sh from anywhere as root to get the allocated disk.

5. Take fdisk -l and multipath -ll output and cross verify multipath -ll with the previous one, to get the newly added disks mpath. For the newly added mpath name will look like this /dev/dm-xx, add /dev to the mpath name for the device name. Example /dev/dm-xx.

Example : from Fdisk Output, found the below were the new disk after comparing with previous output.
Disk /dev/dm-12 doesn't contain a valid partition table
Disk /dev/dm-23 doesn't contain a valid partition table

Example : from multipath -ll output got the below new mpath with disk name
mpath8 (360060e800571f000000071f00000fd52) dm-23 HITACHI,OPEN-V
[size=200G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
 \_ 3:0:0:7    sdy   65:128 [active][ready]
 \_ 0:0:0:9    sdz   65:144 [active][ready]
 \_ 1:0:0:6    sdaa  65:160 [active][ready]
 \_ 2:0:0:6    sdab  65:176 [active][ready]
mpath7 (360060e800571f000000071f00000fd51) dm-12 HITACHI,OPEN-V
[size=300G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][enabled]
 \_ 0:0:0:8    sdv   65:80  [active][ready]
 \_ 1:0:0:5    sdw   65:96  [active][ready]
 \_ 2:0:0:5    sdx   65:112 [active][ready]
 \_ 3:0:0:8    sdac  65:192 [active][ready]

Make sure all the paths available in mpath. Like if you see the zfcp.conf entry for each disk 4 entries made, so 4 path should be available in the multipath –ll output aswell.
If not contact Storage Team or Mainframe team to get the failed paths fixed before creating the Physical Volume.

6. Create the PV with the mpath device name.
Example : pvcreate /dev/dm-12 /dev/dm-23
Cross check in pvdisplay or pvs output
/dev/dm-12             lvm2 --   300.00G 300.00G
/dev/dm-23             lvm2 --   200.00G 200.00G

7. Create the mountpoint if it is not available already.
mkdir /opt/tibcoBPM and /opt/dataSTG.

8. Set the ownership for the mount points created, verify with the requester.
Example:
chown -R tibco_u:tibco_g /opt/tibcoBPM
chown -R datastg_u:datastg_g /opt/dataSTG

9. Here, I am creating separate volume groups for each filesystem as per the request.
vgcreate (You can identify from multipath –ll for the new disk size)
vgcreate tibcoBPM_vg /dev/dm-12
vgcreate dataSTG_vg /dev/dm-23

Verify it with vgdisplay and vgs output.
tibcoBPM_vg      1   0   0 wz--n- 300.00G 300.00G
dataSTG_vg      1   0   0 wz--n- 200.00G 200.00G

10. Create the LV on the appropriate VG with the requested FS size. I had used the below command to use the entire VG space.
lvcreate -l 100%FREE -n tibcoBPM_lv tibcoBPM_vg
lvcreate -l 100%FREE -n dataSTG_lv dataSTG_vg

Verify with lvdisplay and lvs outputs
tibcoBPM_lv    tibcoBPM_vg    -wi-a- 300.00G
dataSTG_lv    dataSTG_vg    -wi-a- 200.00G

lvscan output
ACTIVE            '/dev/tibcoBPM_vg/tibcoBPM_lv' [300.00 GB] inherit
ACTIVE            '/dev/dataSTG_vg/dataSTG_lv' [200.00 GB] inherit

11. Format it to ext3 filesystem with the below command. Get the LV path from lvscan output.
mkfs.ext3 /dev/tibcoBPM_vg/tibcoBPM_lv
mkfs.ext3 /dev/dataSTG_vg/dataSTG_lv

12. Mount the LV to the created mount point, by making the entry to /etc/fstab. Manual mount is not recommended.
Similar way get the LV full path from lvscan output and make the entry as below. Take a backup of /etc/fstab “cp /etc/fstab /etc/fstab_bkp_”.

/dev/tibcoBPM_vg/tibcoBPM_lv      /opt/tibcoBPM   ext3    defaults        1 2
/dev/dataSTG_vg/dataSTG_lv      /opt/dataSTG   ext3    defaults        1 2

13. Take df –hT output prior mounting the FS and use “mount /opt/tibcoBPM” and “mount /opt/dataSTG
[root@zos_linux1 /]# df -hT /opt/tibcoBPM /opt/dataSTG
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/tibcoBPM_vg-tibcoBPM_lv
              ext3    296G  191M  281G   1% /opt/tibcoBPM
/dev/mapper/dataSTG_vg-dataSTG_lv
              ext3    197G  188M  187G   1% /opt/dataSTG
[root@zos_linux1 /]#

14. The End!!
 

Pages