Tag Archives: linux

Usefull Linux Commands for SAN LUN allocation in RHEL

ls -l /dev/disk/by-* | grep lun-31
ls -l /dev/disk/by-* | grep lun-33
ls -l /dev/disk/by-* | grep lun-20
ls -l /dev/disk/by-* | grep lun-10
cat /sys/class/fc_transport/*/node_name
grep 50060160bee045be /sys/class/fc_transport/*/node_name
lsscsi
./inq.LinuxAMD64 -clariion
multipath -ll
df -h
cat /etc/fstsb
cat /etc/fstab
multipath -ll | grep mpathg
ls -ltr /data*
ls -ls /data*
ls -ld /data*
df -h
mount/dev/mapper/mpathg /data10
mount /dev/mapper/mpathg /data10
df -h
cd /data10
ls -ltr
du -hs regcss
rm -rf regcss
df -h
ls -ltr
vi /etc/fstab
cat /etc/fstsb
cat /etc/fstab
cd
mount /data10
umount /data10
mount /data10
df -h
multipath -ll | grep mpathk
multipath -ll | grep mpathl
ls -l /dev/disk/by-* | grep lun-33
echo “0 5 33” > /sys/class/scsi_host/host2/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 4 33” > /sys/class/scsi_host/host2/scan
ls -l /dev/disk/by-* | grep lun-33
ls -l /dev/disk/by-* | grep lun-31
cat /sys/class/fc_transport/*/node_name
echo “0 5 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
cd /proc/scsi
ls
cd scsi
cd sg
ls
cd device
cd devices
cat devices
grep 0x50060160bee045be  /sys/class/fc_transport/*/node_name
echo “0 0 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 1 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 3 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 3 33” > /sys/class/scsi_host/host2/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 1 33” > /sys/class/scsi_host/host2/scan
ls -l /dev/disk/by-* | grep lun-33
grep 0x5006016b08605821  /sys/class/fc_transport/*/node_name
cat /sys/class/fc_transport/*/node_name
grep 0x5006016088605821  /sys/class/fc_transport/*/node_name
echo “0 2 33” > /sys/class/scsi_host/host2/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 4 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 2 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
grep 0x50060160bea0597f  /sys/class/fc_transport/*/node_name
echo “0 3 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
echo “0 5 33” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-33
ls -l /dev/disk/by-* | grep lun-34
echo “0 5 34” > /sys/class/scsi_host/host1/scan
ls -l /dev/disk/by-* | grep lun-34
echo “0 2 34” > /sys/class/scsi_host/host2/scan
echo “0 2 34” > /sys/class/scsi_host/host1/scan
echo “0 4 34” > /sys/class/scsi_host/host1/scan
echo “0 4 34” > /sys/class/scsi_host/host2/scan
ls -l /dev/disk/by-* | grep lun-34
cd
mkdir /data11
mkdir /data12
multipath ll
multipath -ll
df -h | grep mpathp
history | grep ext4
mkfs.ext4 -L DATA11 -m 0 -b 2048 /dev/mapper/mpathp
df -h | grep mpathq
mkfs.ext4 -L DATA12 -m 0 -b 2048 /dev/mapper/mpathq
df -h
mkdir /data11
mkdir /data12
mount /dev/mapper/mpathp /data11
mount /dev/mapper/mpathp /data12
umount /data12
umount /data11
mount /dev/mapper/mpathp /data11
mount /dev/mapper/mpathq /data12
df -h
umount /data12
vi /etc/fstsb
vi /etc/fstab
df -h
umount /data11
mount all
mount -all
df -h
cat /etc/fstab
df -h
ls -ld /data*
chown -R orarh11g:dba /data11 /data12
ls -ld /data*
df -h
rm -rf /data12
cat /proc/scsi/scsi | egrep -i ‘Host:’ | wc -l
ls /sys/class/fc_host
df -h
cat /etc/fstsb
cat /etc/fstab
vi /etc/fstab
df -h
mount all
mount -all
mkdir /data12
mount -all
df -h
chown -R orarh11g:dba  /data12
df -h
cat /sys/class/scsi_host/host*/device/fc_host/host*/node_name
for i in 0 1 2 3 4 5; do cat host$i/device/fc_host/host$i/port_name;  done
for i in 0 1 2 3 4 5 6 7 8 9 10; do cat host$i/device/fc_host/host$i/port_name;  done
cd  /sys/class/scsi_host/
for i in 0 1 2 3 4 5 6 7 8 9 10; do cat host$i/device/fc_host/host$i/port_name;  done
ls /sys/class/fc_host
fdisk -l |egrep ‘^Disk’ |egrep -v ‘dm-‘
multipath -ll
lspci | grep Fibre
lspci -v -s 05:00.0
ls -l /sys/class/scsi_host
ind /sys/class/pci_bus/0000\:05/device/0000\:05\:00.0/host*/rport-*/target*/*/state | awk -F’/’ ‘{print $11}’ | sort
find /sys/class/pci_bus/0000\:05/device/0000\:05\:00.0/host*/rport-*/target*/*/state | awk -F’/’ ‘{print $11}’ | sort
find /sys/class/pci_bus/0000\:05/device/0000\:05\:00.1/host*/rport-*/target*/*/state | awk -F’/’ ‘{print $11}’ | sort
cat /proc/scsi/scsi | grep scsi2
cat /proc/scsi/scsi | grep scsi1
find   /sys/class/pci_bus/0000\:05/device/0000\:05\:00.0/host*/rport-*/target*/*/block/*/stat | awk -F’/’ ‘{print $11,$13}’
find   /sys/class/pci_bus/0000\:05/device/0000\:05\:00.1/host*/rport-*/target*/*/block/*/stat | awk -F’/’ ‘{print $11,$13}’
udevadm info –query=path –name /dev/sdad
df -h
udevadm info –query=path –name /dev/mapper/mpathq
udevadm info –query=path –name /devices/virtual/block/dm-13
for port in /sys/class/fc_host/host[0-9]/port_name; { echo -n “$port : “; cat $port; }
history
CAILDB-63 scsi_host]#

How to recover a deleted file in Linux ?

A step-by-step guide for recovering files using debugfs

[root@unix-support-server ~]# mount

/dev/sda2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /var/www type ext3 (rw)
/dev/sdd1 on /LUN93 type ext3 (rw)
/dev/sdc on /LUN92 type ext3 (rw)
/dev/sde1 on /LUN94 type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

Create a text file called data.txt, enter:
echo 'This is a test' > data.txt
Display the index number (inode) of data.txt, enter:
[root@unix-support-server LUN94]# ls -li data.txt

2113537 -rw-r--r-- 1 root root 15 Jun  9 18:19 data.txt

[root@unix-support-server LUN94]#
[root@unix-support-server LUN94]# debugfs -w /dev/sde1

debugfs 1.41.12 (17-May-2010)
debugfs:  logdump -i  <2113537>
Inode 2113537 is at group 129, block 4227074, offset 0
Journal starts at block 25167, transaction 344454
  FS block 4227074 logged at sequence 344484, journal block 31233 (flags 0x2)
    (inode block for inode 2113537):
    Inode: 2113537   Type: regular        Mode:  0644   Flags: 0x0
    Generation: 1054075619    Version: 0x00000000
    User:     0   Group:     0   Size: 15
    File ACL: 0    Directory ACL: 0
    Links: 1   Blockcount: 8
    Fragment:  Address: 0    Number: 0    Size: 0
    ctime: 0x575965d9 -- Thu Jun  9 18:19:29 2016
    atime: 0x575965d9 -- Thu Jun  9 18:19:29 2016
    mtime: 0x575965d9 -- Thu Jun  9 18:19:29 2016
    Blocks:  (0+1): 4247552
No magic number at block 31238: end of journal.

debugfs:  cat  <2113537>
This is a test
debugfs:
debugfs:  q

[root@unix-support-server LUN94]# rm data.txt
rm: remove regular file `data.txt’? y
[root@unix-support-server LUN94]# cat data.txt
cat: data.txt: No such file or directory
[root@unix-support-server LUN94]#
[root@unix-support-server LUN94]# dd if=/dev/sde1 of=data.txt bs=4096 count=1 skip=4247552

1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000536678 s, 7.6 MB/s

[root@unix-support-server LUN94]#
[root@unix-support-server LUN94]# cat data.txt

This is a test

[root@unix-support-server LUN94]#

Reclaim Space in a VM on Thin or Thick VMDKs

Fedora/CentOs/RedHat
[root@rac1 ~]$ yum install zerofree
updates/metalink | 12 kB 00:00
updates | 4.5 kB 00:00
updates/primary_db | 4.3 MB 00:21
Setting up Install Process
Resolving Dependencies
Running transaction check
Package zerofree.i686 0:1.0.1-8.fc15 will be installed
Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
zerofree i686 1.0.1-8.fc15 fedora 20 k

Transaction Summary
================================================================================
Install 1 Package

Total download size: 20 k
Installed size: 20 k
Is this ok [y/N]: y
Downloading Packages:
zerofree-1.0.1-8.fc15.i686.rpm | 20 kB 00:00
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : zerofree-1.0.1-8.fc15.i686 1/1

Installed:
zerofree.i686 0:1.0.1-8.fc15

Complete!
For Debian/Ubuntu:
[root@rac1 ~]$ apt-get install zerofree
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
zerofree
0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
Need to get 7,272 B of archives.
After this operation, 61.4 kB of additional disk space will be used.
Get:1 http://ubuntu.cs.utah.edu/ubuntu/ oneiric/universe zerofree amd64 1.0.1-2ubuntu1 [7,272 B]
Fetched 7,272 B in 0s (41.5 kB/s)
Selecting previously deselected package zerofree.
(Reading database ... 22748 files and directories currently installed.)
Unpacking zerofree (from .../zerofree_1.0.1-2ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Setting up zerofree (1.0.1-2ubuntu1) ...

Then you need to mount the partition as read-only and run zerofree on it. If you need perform this on your OS/root partition, then power off your VM and attach the OS disk to another Linux VM. Here is how it looks like:

[root@rac1 ~]$ mount -o remount,ro /dev/mapper/test-lvol0
[root@rac1 ~]$ zerofree -v /dev/mapper/test-lvol0
1106/485301/512000

How to Add Linux route ?

You can use any one of the following tool to add, display, delete Linux kernel routing table:

(a) route command : show / manipulate the IP routing table on Linux.

(b) ip command : show / manipulate routing, devices, policy routing and tunnels on Linux.

Display your current routing table

Open the Terminal or login to server using ssh/console. Type the  following command to display routing table:

# route
 OR
# route -n

route

 # ip route show
 OR
 # ip route list

Linux add a default route using route  command

Route all traffic via 192.168.1.254 gateway connected via eth0 network interface:

 # route add default gw 192.168.1.254 eth0

Linux add a default gateway (route) using ip command

Route all traffic via 192.168.1.254 gateway connected via eth0 network interface:

 # ip route add 192.168.1.0/24 dev eth0

Verify newly added route ip in the Linux kernel routing table

To verify new routing table, enter:
 # ip route list
 OR
 # route -n

How do I make routing changes persistent across reboots?

To make route entry persistent in the Linux kernel routing table, you need to modify config file as per your Linux distributions.

RHEL/CentOS/Fedora/Scientific Linux persistent routing configuration

Edit /etc/sysconfig/network and set default gateway IP address:
# vi /etc/sysconfig/network
Sample outputs:

GATEWAY=192.168.1.254

You can add additional static route for eth0 by editing /etc/sysconfig/network-scripts/route-eth0 file as follows:

10.0.0.0/8 via 10.10.29.65

The above config sets static routing for network 10.0.0.0/8 via 10.9.38.65 router.

Debian / Ubuntu Linux persistence static routing configuration

Edit /etc/network/interfaces file, enter:
# vi /etc/network/interfaces
Append the following in eth0 section:

up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.254
down route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.254

Save and close the file.

Generic method to add persistent static routing on Linux

The following method works with almost all Linux distributions.

Edit /etc/rc.d/rc.local or /etc/rc.local, enter
# vi /etc/rc.local
Append the following line:

/sbin/ip route add 192.168.1.0/24 dev eth0

Save and close the file.

How to Rescan new LUN’s added in Linux, HP-UX, Aix, Solaris ?

HP-UX

1. Rescan the devices:

ioscan -fnC <disk|tape>

2. Generate device files:

 insf -e

3. Verify the new devices:

 ioscan -funC <disk|tape>

AIX

1. Rescan the devices ):

 cfgmgr -vl fcsx

Where x is FC adapter number

2. Verify the new devices:

 lsdev -Cc <disk|tape>

Linux

The rescan in Linux is HBA-specific.

For QLogic:

echo scsi-qlascan > /proc/scsi/qla<model#>/<adapter instance>

For Emulex:

 sh force_lpfc_scan.sh lpfc<adapter-instance>

For each identified device, run the following:

echo scsi add-single-device <host> <channel> <ID> <lun> >   /proc/scsi/scsi

Solaris

1. Determine the FC channels:

 cfgadm -al

2. Force rescan :

 cfgadm -o force_update -c configure cx

Where x is the FC channel number

3. Force rescan at HBA port level:

 luxadm -e forcelip /dev/fc/fpx

4. Force rescan on all FC devices:

 cfgadm -al -o show_FCP_dev

5. Install device files:

 devfsadm

6. Display all Qlogic HBA ports

 luxadm -e port

7. Display HBA port information

 luxadm -v display <WWPN>

8. Display HBA port information

 luxadm -e dump_map

Notes If one specific SANclient is missing a drive, please verify that your zoning is correct. Please also make sure the host initiator and VTL™s target ports are showing online via the Fibre Channel switch. (Check HBA link light and check the cable.)

 

Where are yum downloaded packages saved in linux?

The packages will be saved in /var/cache/yum/<repo-name>/packages/

You have to edit the /etc/yum.conf
from : keepcache=0 to : keepcache=1

keepcache=0  { Remove packages after successful instillation }

keepcache=1  { Keep packages after successful instillation }

[root@sip3 base]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
bugtracker_url=http://bugs.centos.org/yum5bug

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[rootsip3 base]#

How to configure Proxy Settings for the Unix / Linux Console

You can use the following methods to configure your console to use a proxy server so that console based programs like wget could get connect to the internet through the proxy.

1 – Set the environment variable
# export http_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/
# export ftp_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/

In the above configuration you can ommit the DOMAIN\USERNAME:PASSWORD@ part if you are not using proxy authentication.

Note: If you get the following error when you try to use wget, you might have to pass the proxy authentication credentials to wget as arguments.

Connecting to SERVER:PORT... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
11:14:45 ERROR 407: Proxy Authentication Required.
1.1 – Passing proxy authentication credentials to wget as arguments
$ wget --proxy-user "DOMAIN\USERNAME" --proxy-passwd "PASSWORD" URL
2 – Configure the proxy settings in the .bashrc
If you want set the proxy for all the users you can do it in the system wide .bashrc file.

nano /etc/bash.bashrc#proxy settings
export http_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/
export ftp_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/

Note: The system wide .bashrc file may not be available in all Linux systems and only can be used if you are using the bash shell

2.1 – Having an alias for wget with proxy
If you don’t want to pass the proxy arguments to wget all the time, you create an alias for wget in the .bashrc file

alias wget 'wget --proxy-user "DOMAIN\USERNAME" --proxy-passwd "PASSWORD"'

How to Unzip Multiple Files from Linux / Unix single Command Line

 
bash-3.2# ls *.zip
118666-47.zip  120830-06.zip  138852-01.zip  142394-01.zip  147217-02.zip
118777-16.zip  120849-04.zip  139520-02.zip  142933-05.zip  148027-03.zip
119081-25.zip  124204-04.zip  142240-01.zip  143506-06.zip
119963-24.zip  126425-01.zip  142251-02.zip  146470-08.zip
bash-3.2#
bash-3.2#

Problem :

bash-3.2# unzip *.zip
Archive:  118666-47.zip
caution: filename not matched:  118777-16.zip
caution: filename not matched:  119081-25.zip
caution: filename not matched:  119963-24.zip
caution: filename not matched:  120830-06.zip
caution: filename not matched:  120849-04.zip
caution: filename not matched:  124204-04.zip
caution: filename not matched:  126425-01.zip
caution: filename not matched:  138852-01.zip
caution: filename not matched:  139520-02.zip
caution: filename not matched:  142240-01.zip
caution: filename not matched:  142251-02.zip
caution: filename not matched:  142394-01.zip
caution: filename not matched:  142933-05.zip
caution: filename not matched:  143506-06.zip
caution: filename not matched:  146470-08.zip
caution: filename not matched:  147217-02.zip
caution: filename not matched:  148027-03.zip
bash-3.2#
bash-3.2#
bash-3.2#

Solution :

Use single quotes [ ‘  ‘ ]
bash-3.2# unzip ‘*.zip’
Archive:  146470-08.zip
inflating: 146470-08/LEGAL_LICENSE.TXT
inflating: 146470-08/prepatch
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/EST
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/tab/zone_sun.tab
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/tab/country.tab
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Broken_Hill
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Eucla
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Melbourne
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Sydney
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Adelaide
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Perth
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Lord_Howe
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Hobart
inflating: 146470-08/SUNWcsu/reloc/usr/share/lib/zoneinfo/Australia/Currie

How to Upgrade IBM Power server firmware fixes through AIX or Linux without an HMC

Installing server firmware fixes through the operating system is a disruptive process. You will need to restart the system.

Notes:

  1. If your system is managed by an HMC, you must apply server firmware through the HMC. For details, see Managed system updates in Updates.
  2. If you have a System i® model running IBM® i, you must either apply server firmware through an HMC or through an IBM i logical partition. If you have a POWER6® Power Systems™ server that is managed by an HMC, you must use the HMC.
  3. By default, the server firmware is installed on the temporary side only after the existing contents of the temporary side are permanently installed on the permanent side. (This process is performed automatically when you install a server firmware fix.)
  4. If you are unable to start your AIX or Linux operating system or server, refer to Obtaining fixes through AIX or Linux when you are unable to start the system.

Perform Steps 1 through 6 to get server firmware fixes through AIX or Linux when you do not have an HMC.

Step 1. View existing firmware levels for AIX or Linux

The Advanced System Management Interface (ASMI) is the user interface to access the server firmware. You can also use the AIX or Linux operating system to view the firmware levels.
  1. Select from the following options:
    • To use the ASMI (AIX or Linux): On the ASMI Welcome pane, view the existing level of server firmware in the upper-right corner below the copyright statement, for example, EM310_006.
    • To use the AIX command prompt (you must have AIX diagnostics installed on your server), continue with step 2.
    • To use the Linux command prompt, continue with step 4.
  2. At an AIX command prompt, enter the following command:
    lsmcode
    The existing levels of server firmware are displayed. For example, you might see output similar to the following:

    DISPLAY MICROCODE LEVEL                                                   802811
    IBM,8231-E1C
    
    The current permanent system firmware image is AL740_088
    The current temporary system firmware image is AL740_088
    The system is currently booted from the temporary firmware image.
    
    Use Enter to continue.
    Notes:

    • The permanent level is also known as the backup level.
    • The temporary level is also known as the installed level.
    • The system was booted from the temporary side, so at this time, the temporary level is also the activated level.
  3. Continue with Step 2. View or download the firmware fix.
  4. To view existing levels of server firmware for Linux, you must have the following service tools installed on your server:
    • Platform Enablement Library – librtas-xxxxx.rpm
    • Service Aids – ppc64-utils-xxxxx.rpm
    • Hardware Inventory – lsvpd-xxxxx.rpm

    where xxxxx represents a specific version of the RPM file.

    Note: If you do not have the service tools on your server, refer to Obtaining service and productivity tools for Linux.
  5. After the service tools are installed on the server running Linux, enter the following at a Linux command prompt:
    lsmcode

    The existing level of server firmware is displayed. For example, you might see output similar to the following:

    Version of system firmware is: AL740_088 (t)  AL740_088 (p)  AL740_088 (t)

    The following table provides descriptions for each of the server firmware levels displayed in the output.

    Table 1. Server firmware levels
    Server firmware levels displayed
    AL740_088 (t) AL740_088 (p) AL740_088 (t)
    The installed level.Also known as the temporary level. The backup level.Also known as the permanent level. The activated level.The level on which the server is currently running.
  6. Continue with the next step.

Step 2. View or download the firmware fix

Follow this procedure to view or download the firmware fix. You can download the fix directly to your server, or you can download it to a computer with an Internet connection and create a fix CD that you apply on the server. If necessary, contact service and support to order the fix on CD. You can also download the firmware fix to a computer that has a network connection to your server and use FTP to download the firmware fix from the computer to the server.

Note: If you plan to create a CD, you will need a CD burner and software.
  1. From a computer or server with an Internet connection, go to the Fix Central Web site at http://www.ibm.com/support/fixcentral/.
  2. Choose from the following options:
    1. If you have a System p® server, select System p in the Product Group list.
    2. If you have a POWER6 Power Systems server, select Power in the Product Group list.
  3. Select Firmware and HMC in the Product list.
  4. If prompted, select POWER5 and POWER6 class in the Processor type list.
  5. Select your Machine Type-Model and click Continue.
  6. Follow the on-screen prompts to download the fix file.
  7. Select from the following options:

Step 3. View and unpack the RPM file that contains the server firmware

If you created a CD with the RPM file, you will need to view and unpack the RPM file that contains the server firmware.
  1. Select from the following options:
    • If you created a CD with the RPM file, continue with the next step.
    • If you downloaded the RPM file to your server from the Fix Central Web site at http://www.ibm.com/support/fixcentral/ or by using the FTP method, continue with step 6.
  2. Insert the CD that contains the RPM file into the media drive on your server.
  3. To mount the CD, select from the following options (you need root user authority):
    • If you are working on an AIX system, enter the following at an AIX command prompt:
      mount /dev/cd0 /mnt
    • If you are working on a Linux system, enter one of the following commands at a Linux command prompt:
      mount -t iso9660 /dev/cdrom /mnt 

      or

      mount -t iso9660 /dev/dvdrom /mnt
  4. Select from the following options:
    • If the mount was successful, continue with step 6.
    • If the mount was unsuccessful, continue with the next step.
  5. If you received the message,
    mount: 0506-324 Cannot mount /dev/cd0 on /mnt, perform the following steps to mount the CD:

    1. Enter the command:
      /usr/sbin/mount -v 'cdrfs' -f'' -p'' -r'' /dev/cd0 /mnt

      The quotation marks following the f, p, and r are two single quotation marks with no space between them.

      Note: If you prefer, you can use the System Management Interface Tool (SMIT) to mount the CD.
    2. Continue with the next step.
  6. To view the RPM file name, enter the following command at the AIX or Linux command prompt:
    • If the RPM file is on CD, type:
      ls /mnt
    • If the RPM file is on the server, type:
      ls /tmp/fwupdate
    The name of the RPM file is displayed. For example, you might see output similar to the following:

    01EM3xx_yyy_zzz.rpm
  7. To unpack the RPM file, enter one of the following commands at the AIX or Linux command prompt:
    • If you want to unpack from a CD, enter:
      rpm -Uvh --ignoreos /mnt/filename.rpm
    • If you want to unpack from the server’s hard drive, enter:
      rpm -Uvh --ignoreos /tmp/fwupdate/filename.rpm
      where filename is the name of the RPM file that contains the server firmware. For example, 01EM3xx_yyy_zzz.rpm.

      Note: When you unpack the RPM file, the server firmware fix file is saved in the /tmp/fwupdate directory on the server’s hard drive in the following format: 01EM3xx_yyy_zzz.img.
  8. Continue with the next step.

Step 4. Apply server firmware fixes through AIX or Linux to the temporary side of the service processor

Important:

  • Do not interrupt this process after you begin.
  • Do not attempt to log into the ASMI, or use any of the ASMI’s functions, while a firmware installation is in progress.
  1. Ensure you are starting the system from the temporary side of the service processor; the firmware installation will fail if the system has booted from the permanent side. To learn which side you are starting from, and how to change to the other side if necessary, refer to Working with the temporary and permanent side of the service processor.
  2. To use the update_flash command (AIX or Linux) to install the server firmware, continue with step 3.
    Note: If you have AIX installed, you can choose to use the AIX diagnostics to install the fix. However, if you plan to install the fix from CD, you will need to obtain the Microcode Updates Files & Discovery Tool CD to use the AIX diagnostics.
  3. You will need the server firmware fix file name in the next step. To view the name, enter the following at an AIX or Linux command prompt:
    Note: To perform this step, you must have root user authority.
    ls /tmp/fwupdate
    The name of the server firmware fix file is displayed. For example, you might see output similar to the following:

    01EM3xx_yyy_zzz.img
  4. To install the server firmware fix, select from the following options:
    • If you are updating AIX, enter the following at an AIX command prompt:
      cd /tmp/fwupdate
      /usr/lpp/diagnostics/bin/update_flash -f fwlevel
    • # rpm -Uvh --ignoreos 01AL740_100_042.rpm
      01AL740_100_042             ##################################################
      # cd /tmp/fwupdate
      # ls
      01AL740_100_042.img
      # /usr/lpp/diagnostics/bin/update_flash -f 01AL740_100_042
      Error in opening the file 01AL740_100_042
      #  /usr/lpp/diagnostics/bin/update_flash -f 01AL740_100_042.img
      The image is valid and would update the temporary image to AL740_100.
      The new firmware level for the permanent image would be AL740_088.
      
      The current permanent system firmware image is AL740_088.
      The current temporary system firmware image is AL740_088.
      
      ***** WARNING: Continuing will reboot the system! *****
      
      Do you wish to continue?
      Enter 1=Yes or 2=No
      1
      
      SHUTDOWN PROGRAM
      Tue May 14 10:08:53 IST 2013
      0513-044 The sshd Subsystem was requested to stop.
      
      Wait for 'Rebooting...' before stopping.
      Error reporting has stopped.
      Advanced Accounting has stopped...
      Process accounting has stopped.
      nfs_clean: Stopping NFS/NIS Daemons
      0513-004 The Subsystem or Group, nfsd, is currently inoperative.
      0513-044 The biod Subsystem was requested to stop.
      0513-044 The rpc.lockd Subsystem was requested to stop.
      0513-044 The rpc.statd Subsystem was requested to stop.
      0513-004 The Subsystem or Group, gssd, is currently inoperative.
      0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative.
      0513-004 The Subsystem or Group, rpc.mountd, is currently inoperative.
      0513-004 The Subsystem or Group, ypserv, is currently inoperative.
      0513-004 The Subsystem or Group, ypbind, is currently inoperative.
      0513-004 The Subsystem or Group, yppasswdd, is currently inoperative.
      0513-004 The Subsystem or Group, ypupdated, is currently inoperative.
      0513-004 The Subsystem or Group, nis_cachemgr, is currently inoperative.
      0513-004 The Subsystem or Group, rpc.nisd, is currently inoperative.
      0513-004 The Subsystem or Group, rpc.nispasswdd, is currently inoperative.
      0513-044 The qdaemon Subsystem was requested to stop.
      0513-044 The writesrv Subsystem was requested to stop.
      0513-044 The clcomd Subsystem was requested to stop.
      0513-044 The lldpd Subsystem was requested to stop.
      0513-044 The ecpvdpd Subsystem was requested to stop.
      0513-044 The ctrmc Subsystem was requested to stop.
      0513-044 The IBM.ServiceRM Subsystem was requested to stop.
      0513-044 The IBM.MgmtDomainRM Subsystem was requested to stop.
      0513-044 The IBM.DRM Subsystem was requested to stop.
      0513-044 The cas_agent Subsystem was requested to stop.
      All processes currently running will now be killed...
      Unmounting the file systems...
      umount: 0506-349 Cannot unmount /dev/hd10opt: The requested resource is busy.
      umount: 0506-349 Cannot unmount /dev/hd1: The requested resource is busy.

      where fwlevel is the specific file name of the server firmware fix, such as 01EM3xx_yyy_zzz.img

    • If you are updating Linux, enter the following at a Linux command prompt:
      cd /tmp/fwupdate
      /usr/sbin/update_flash -f fwlevel

      where fwlevel is the specific file name of the server firmware fix, such as 01EM3xx_yyy_zzz.img

    During the server firmware installation process, reference codes CA2799FD and CA2799FF are alternately displayed on the control panel. After the installation is complete, the system is automatically powered off and powered on.

    Note: If you receive a message stating:
    This partition does not have the authority to perform the requested function, see Message regarding a server that was previously managed by an HMC.
  5. Continue with the next step.

Step 5. Verify that the fix installed correctly

  1. Select from the following options:
    • To use the AIX or Linux command prompt (the operating system must be running and the diagnostics must be available), continue with the next step.
    • To use the ASMI, view the level of server firmware displayed in the upper-right corner below the copyright statement on the ASMI Welcome pane; for example, EM310_006. If the level of server firmware displayed is not the level that you installed, refer to step 4.
  2. Enter the following at a command prompt:
    lsmcode

    The existing levels of server firmware are displayed. For example, you might see output similar to the following:

    DISPLAY MICROCODE LEVEL                                                   802811
    IBM,8231-E1C
    
    The current permanent system firmware image is AL740_088
    The current temporary system firmware image is AL740_100
    The system is currently booted from the temporary firmware image.
    
    Use Enter to continue.
    
    
    Notes:

    • The permanent level is also known as the backup level.
    • The temporary level is also known as the installed level.
    • The system was booted from the temporary side, so at this time, the temporary level is also the activated level.
  3. Verify that the level of server firmware displayed is the level that you installed.
  4. If the level of server firmware displayed is not the level that you installed, perform the following steps:
    1. Retry the fix procedure. If you created a CD or DVD for this procedure, use a new media.
    2. If the problem persists, contact your next level of support.