simple way to get input caracter in the output text :
cat $i | bla bla | awk '{ var " " bla bla bla $1" "$2 bla bla }' var=$i >> out
mercredi 4 août 2010
How to capture boot debug of a SAN boot PowerVM Virtual I/O Server or AIX/NPIV client partition that is failing to boot.
Problem(Abstract)
How to capture boot debug of a SAN boot PowerVM Virtual I/O Server or AIX/NPIV client partition that is failing to boot.
Symptom
NPIV/AIX Client or VIOS fails to boot from SAN.
Environment REQUIREMENTS
1. POWER6 System
2. A program where console terminal logging can be enabled will be needed. The following procedure uses PuTTY (a Windows ssh client program) as the means to open a console session to capture the boot debug data to a file. It's available for download at http://www.putty.org
Diagnosing the problem Things to check PRIOR to gathering the debug
For a NEW NPIV/AIX Client Install
1. Ensure NPIV mapping is correct
2. Ensure SAN swtich is zoned correctly to the NPIV client's WWPN
3. Ensure resources (LUN) is assigned from the storage directly to the client's WWPN
4. Ensure Installation media meet minimum level required by the storage
For previously running LPAR
1. Check if boot device can be set in SMS
2. Check if rootvg is accessible in Service Mode.
Resolving the problem
1. To capture a boot debug to a file, open an ssh session via PuTTY to the HMC as follows
Under Category
Session
-> click on Logging
-> select "All session output" on the right
-> specify the filename in the "Log file name" box as shown in Figure 1
Terminal
-> click on Keyboard
-> select Control-H for the Backspace key
Click on Session
-> Type in the full domain to the HMC in the Host Name and Saved Sessions box
-> select SSH protocol (HMC must be configured to accept ssh connections)
-> Click on Open (See Figure 2). You will get a PuTTY Security Alert Window
-> Click No to connect just once
-> Login as hscroot and type 'vtmenu' to open a console session to the partition in question
-> Select the Managed System name
-> Select the partition in question =>You may or may not see activity at this point depending on the status of the partition.
2. Boot the partition to Open Firmware (0 >) prompt, run ioinfo utility, and select the FCINFO option as follows:
0 > ioinfo
!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!
This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached to the
system
Select a tool from the following
1. SCSIINFO
2. IDEINFO
3. SATAINFO
4. SASINFO
5. USBINFO
6. FCINFO <=====
7. VSCSIINFO
q - quit/exit
==> 6
3. Select the desired path. In this example, we are selected the 2nd virtual Fibre Channel path:
FCINFO Main Menu
Select a FC Node from the following list:
# Location Code Pathname
---------------------------------------------------------------
1. U9117.MMA.65EBF8C-V32-C5-T1 /vdevice/vfc-client@30000005
2. U9117.MMA.65EBF8C-V32-C6-T1 /vdevice/vfc-client@30000006
q - Quit/Exit
==> 2
4. Select a FC Device
FC Node Menu
FC Node String: /vdevice/vfc-client@30000006
FC Node WorldWidePortName: c05076001ab6003a
-----------------------------------------------------------------
1. List Attached FC Devices
2. Select a FC Device <=====
3. Enable/Disable FC Adapter Debug flags
q - Quit/Exit
==> 2
5. Select the appropriate LUN. In this example option 1 happens to be the bootable device:
1. 50060e801530f310,0 - 10240 MB Disk drive (bootable)
2. 50060e801530f310,1000000000000 - 35840 MB Disk drive
Select a FC Device : 1
FC Device Menu
FC Target Address ==> 50060e801530f310 FC Lun Address ==> 0
FC Device String: /vdevice/vfc-client@30000006/disk@50060e801530f310,0:0
FC Device: 10240 MB Disk drive (bootable)
----------------------------------------------------------------------
6. Select "Display Inquiry Data"
1. Display Inquiry Data <=====
2. Spin up Drive
3. Spin down Drive
4. Continuous random Reads ( hit any key to stop )
5. Enable/Disable FC Device Debug flags
98. Boot from this Device
q - Quit/Exit
==> 1
INQUIRY DATA FOR : TARGET ==> 50060e801530f310 LUN ==> 0 - 10240 MB Disk drive (bootable)
000002f4cd00: 00 00 03 32 cf 00 00 02 48 49 54 41 43 48 49 20 :...2....HITACHI :
000002f4cd10: 4f 50 45 4e 2d 56 20 20 20 20 20 20 20 20 20 20 :OPEN-V :
000002f4cd20: 36 30 30 34 35 30 20 31 33 30 46 33 33 30 33 33 :600450 130F33033:
000002f4cd30: 20 32 41 20 01 01 01 01 00 00 00 00 00 00 00 00 : 2A ............:
000002f4cd40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :................:
000002f4cd50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :................:
000002f4cd60: 05 01 05 70 30 30 ff 00 c0 50 76 00 1a b6 00 3a :...p00...Pv....::
000002f4cd70: c0 50 76 00 1a b6 00 3a 00 00 00 0f 00 00 00 00 :.Pv....:........:
000002f4cd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 :................:
000002f4cd90: 01 01 01 01 00 00 00 00 01 01 01 01 01 01 01 01 :................:
000002f4cda0: 01 01 01 01 01 01 01 01 55 55 55 55 55 55 55 55 :........UUUUUUUU:
000002f4cdb0: 55 55 55 55 00 00 00 00 ff ff ff ff 00 00 00 00 :UUUU............:
000002f4cdc0: 00 00 00 03 00 00 00 01 00 00 00 01 00 01 99 40 :...............@:
000002f4cdd0: 00 00 71 a3 00 00 00 00 00 00 00 00 00 00 00 00 :..q.............:
000002f4cde0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :................:
000002f4cdf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :...............:
Hit a key to continue...
FC Device Menu
FC Target Address ==> 50060e801530f310 FC Lun Address ==> 0
FC Device String: /vdevice/vfc-client@30000006/disk@50060e801530f310,0:0
FC Device: 10240 MB Disk drive (bootable)
----------------------------------------------------------------------
7. Select to "Boot from this Device"
1. Display Inquiry Data
2. Spin up Drive
3. Spin down Drive
4. Continuous random Reads ( hit any key to stop )
5. Enable/Disable FC Device Debug flags
98. Boot from this Device
q - Quit/Exit
==> 98
---------------------------------------------------------------------------------------------------------
Welcome to AIX.
boot image timestamp: 06:26 10/01
The current time and date: 09:46:20 10/01/2009
processor count: 1; memory size: 8192MB; kernel size: 23463042
boot device: /vdevice/vfc-client@30000006/disk@50060e801530f310,0
----------------------------------------------------------------------------------------------------------
8. Rename the putty.log file to reflect the PMR#, Branch#, and Country Code (i.e 12345.678.000.SAN_boot_debug.log) and upload it to:
ftp testcase.software.ibm.com
login: anonymous
password:
ftp> cd /toibm/aix
ftp> prompt
ftp> binary
ftp> put.log
ftp> quit
How to capture boot debug of a SAN boot PowerVM Virtual I/O Server or AIX/NPIV client partition that is failing to boot.
Symptom
NPIV/AIX Client or VIOS fails to boot from SAN.
Environment REQUIREMENTS
1. POWER6 System
2. A program where console terminal logging can be enabled will be needed. The following procedure uses PuTTY (a Windows ssh client program) as the means to open a console session to capture the boot debug data to a file. It's available for download at http://www.putty.org
Diagnosing the problem Things to check PRIOR to gathering the debug
For a NEW NPIV/AIX Client Install
1. Ensure NPIV mapping is correct
2. Ensure SAN swtich is zoned correctly to the NPIV client's WWPN
3. Ensure resources (LUN) is assigned from the storage directly to the client's WWPN
4. Ensure Installation media meet minimum level required by the storage
For previously running LPAR
1. Check if boot device can be set in SMS
2. Check if rootvg is accessible in Service Mode.
Resolving the problem
1. To capture a boot debug to a file, open an ssh session via PuTTY to the HMC as follows
Under Category
Session
-> click on Logging
-> select "All session output" on the right
-> specify the filename in the "Log file name" box as shown in Figure 1
Terminal
-> click on Keyboard
-> select Control-H for the Backspace key
Click on Session
-> Type in the full domain to the HMC in the Host Name and Saved Sessions box
-> select SSH protocol (HMC must be configured to accept ssh connections)
-> Click on Open (See Figure 2). You will get a PuTTY Security Alert Window
-> Click No to connect just once
-> Login as hscroot and type 'vtmenu' to open a console session to the partition in question
-> Select the Managed System name
-> Select the partition in question =>You may or may not see activity at this point depending on the status of the partition.
2. Boot the partition to Open Firmware (0 >) prompt, run ioinfo utility, and select the FCINFO option as follows:
0 > ioinfo
!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!
This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached to the
system
Select a tool from the following
1. SCSIINFO
2. IDEINFO
3. SATAINFO
4. SASINFO
5. USBINFO
6. FCINFO <=====
7. VSCSIINFO
q - quit/exit
==> 6
3. Select the desired path. In this example, we are selected the 2nd virtual Fibre Channel path:
FCINFO Main Menu
Select a FC Node from the following list:
# Location Code Pathname
---------------------------------------------------------------
1. U9117.MMA.65EBF8C-V32-C5-T1 /vdevice/vfc-client@30000005
2. U9117.MMA.65EBF8C-V32-C6-T1 /vdevice/vfc-client@30000006
q - Quit/Exit
==> 2
4. Select a FC Device
FC Node Menu
FC Node String: /vdevice/vfc-client@30000006
FC Node WorldWidePortName: c05076001ab6003a
-----------------------------------------------------------------
1. List Attached FC Devices
2. Select a FC Device <=====
3. Enable/Disable FC Adapter Debug flags
q - Quit/Exit
==> 2
5. Select the appropriate LUN. In this example option 1 happens to be the bootable device:
1. 50060e801530f310,0 - 10240 MB Disk drive (bootable)
2. 50060e801530f310,1000000000000 - 35840 MB Disk drive
Select a FC Device : 1
FC Device Menu
FC Target Address ==> 50060e801530f310 FC Lun Address ==> 0
FC Device String: /vdevice/vfc-client@30000006/disk@50060e801530f310,0:0
FC Device: 10240 MB Disk drive (bootable)
----------------------------------------------------------------------
6. Select "Display Inquiry Data"
1. Display Inquiry Data <=====
2. Spin up Drive
3. Spin down Drive
4. Continuous random Reads ( hit any key to stop )
5. Enable/Disable FC Device Debug flags
98. Boot from this Device
q - Quit/Exit
==> 1
INQUIRY DATA FOR : TARGET ==> 50060e801530f310 LUN ==> 0 - 10240 MB Disk drive (bootable)
000002f4cd00: 00 00 03 32 cf 00 00 02 48 49 54 41 43 48 49 20 :...2....HITACHI :
000002f4cd10: 4f 50 45 4e 2d 56 20 20 20 20 20 20 20 20 20 20 :OPEN-V :
000002f4cd20: 36 30 30 34 35 30 20 31 33 30 46 33 33 30 33 33 :600450 130F33033:
000002f4cd30: 20 32 41 20 01 01 01 01 00 00 00 00 00 00 00 00 : 2A ............:
000002f4cd40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :................:
000002f4cd50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :................:
000002f4cd60: 05 01 05 70 30 30 ff 00 c0 50 76 00 1a b6 00 3a :...p00...Pv....::
000002f4cd70: c0 50 76 00 1a b6 00 3a 00 00 00 0f 00 00 00 00 :.Pv....:........:
000002f4cd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 :................:
000002f4cd90: 01 01 01 01 00 00 00 00 01 01 01 01 01 01 01 01 :................:
000002f4cda0: 01 01 01 01 01 01 01 01 55 55 55 55 55 55 55 55 :........UUUUUUUU:
000002f4cdb0: 55 55 55 55 00 00 00 00 ff ff ff ff 00 00 00 00 :UUUU............:
000002f4cdc0: 00 00 00 03 00 00 00 01 00 00 00 01 00 01 99 40 :...............@:
000002f4cdd0: 00 00 71 a3 00 00 00 00 00 00 00 00 00 00 00 00 :..q.............:
000002f4cde0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :................:
000002f4cdf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :...............:
Hit a key to continue...
FC Device Menu
FC Target Address ==> 50060e801530f310 FC Lun Address ==> 0
FC Device String: /vdevice/vfc-client@30000006/disk@50060e801530f310,0:0
FC Device: 10240 MB Disk drive (bootable)
----------------------------------------------------------------------
7. Select to "Boot from this Device"
1. Display Inquiry Data
2. Spin up Drive
3. Spin down Drive
4. Continuous random Reads ( hit any key to stop )
5. Enable/Disable FC Device Debug flags
98. Boot from this Device
q - Quit/Exit
==> 98
---------------------------------------------------------------------------------------------------------
Welcome to AIX.
boot image timestamp: 06:26 10/01
The current time and date: 09:46:20 10/01/2009
processor count: 1; memory size: 8192MB; kernel size: 23463042
boot device: /vdevice/vfc-client@30000006/disk@50060e801530f310,0
----------------------------------------------------------------------------------------------------------
8. Rename the putty.log file to reflect the PMR#, Branch#, and Country Code (i.e 12345.678.000.SAN_boot_debug.log) and upload it to:
ftp testcase.software.ibm.com
login: anonymous
password:
ftp> cd /toibm/aix
ftp> prompt
ftp> binary
ftp> put
ftp> quit
mardi 17 novembre 2009
HACMP concurrent Vg synchronizing
On a HACMP/PowerHA cluster, with concurrent VG, if a filesystem is created outside HACMP, the cluster is "out of sync"... if we do a lsvg -l on both nodes, some mount point will be N/A on the remote node.
The online way to resynchronize is :
on the passive node :
varyoffvg VGname
on the active node :
/usr/es/sin/cluster/sbin/cl_updatevg -cspoc -g ResourceGroupName VGname
or via Cspoc menu -> HACMP Logical Volume Management -> synchronize a Shared VG definition
On the passive node :
varyonvg -n -c -P VGname
The online way to resynchronize is :
on the passive node :
varyoffvg VGname
on the active node :
/usr/es/sin/cluster/sbin/cl_updatevg -cspoc -g ResourceGroupName VGname
On the passive node :
varyonvg -n -c -P VGname
jeudi 24 septembre 2009
trace réseau
# tcpdump -v -i ent1 -A -w /tmp/tcpdump.out
Peut etre lu par ethereal ou par un tcpdump -r
# tcpdump host machine1 port 53
filtre sur le nom de host et le port named
Peut etre lu par ethereal ou par un tcpdump -r
# tcpdump host machine1 port 53
filtre sur le nom de host et le port named
mardi 15 septembre 2009
mercredi 9 septembre 2009
lundi 24 août 2009
mercredi 12 août 2009
quicky : create / extend a fs on a redhat 5 with lvm
list volume groups :
#vgs
or
#vgdisplay
create a lv :
#lvcreate -L 10G -n lvname vgname
format the lv to ext3:
#mkfs.ext3 /dev/vgname/lvname
to create the fs, need to add the correct entry in /etc/fstab
list the lvm /fs :
#lvdisplay
extend lv :
#lvextend -L +54 /dev/vg01/lvol10 /dev/sdk3
extend fs :
#resize2fs /dev/vg01/lvol10
#vgs
or
#vgdisplay
create a lv :
#lvcreate -L 10G -n lvname vgname
format the lv to ext3:
#mkfs.ext3 /dev/vgname/lvname
to create the fs, need to add the correct entry in /etc/fstab
list the lvm /fs :
#lvdisplay
extend lv :
#lvextend -L +54 /dev/vg01/lvol10 /dev/sdk3
extend fs :
#resize2fs /dev/vg01/lvol10
samedi 13 juin 2009
Verify the PowerHa POL (Priority Override Location)
/usr/es/sbin/cluster/utilities/clRGinfo -p
Primary instance POL : must be blank
Resetted via Cspoc, should not be disruptive.
Primary instance POL : must be blank
Resetted via Cspoc, should not be disruptive.
mercredi 3 juin 2009
useful hmc commands
lspartition -dlpar <= Active <1> for partition to accept commands.
if not 1, then, on the partition :
partition :root / # /usr/sbin/rsct/bin/rmcctrl -z
partition :root / # /usr/sbin/rsct/install/bin/recfgct
0513-071 The ctcas Subsystem has been added.
partition :root / # /usr/sbin/rsct/bin/rmcctrl -s
0513-071 The ctrmc Subsystem has been added.
0513-059 The ctrmc Subsystem has been started.
Subsystem PID is 401430.
partition :root / # /usr/sbin/rsct/bin/rmcctrl -p
Migrate lpar (live mobility) :
migrlpar -o m -m P570origine -t P520destination -p Partitionabasculer
Migrate lpar (from /to MSP):
migrlpar -o v -m srcSystem -t destSystem -p myLPAR –I source_msp_id=2,dest_msp_name=S2_VIOS2
List all the systems :
if not 1, then, on the partition :
partition :root / # /usr/sbin/rsct/bin/rmcctrl -z
partition :root / # /usr/sbin/rsct/install/bin/recfgct
0513-071 The ctcas Subsystem has been added.
partition :root / # /usr/sbin/rsct/bin/rmcctrl -s
0513-071 The ctrmc Subsystem has been added.
0513-059 The ctrmc Subsystem has been started.
Subsystem PID is 401430.
partition :root / # /usr/sbin/rsct/bin/rmcctrl -p
Migrate lpar (live mobility) :
migrlpar -o m -m P570origine -t P520destination -p Partitionabasculer
Migrate lpar (from /to MSP):
migrlpar -o v -m srcSystem -t destSystem -p myLPAR –I source_msp_id=2,dest_msp_name=S2_VIOS2
List all the systems :
lssyscfg -r sys -F name
List the scsi devices defined for a partition :
lssyscfg -r prof -m P570 --filter "lpar_names=darecb1" -F lpar_id,virtual_scsi_adapters
List all the defined scsi devices for a physical server :
lshwres -r virtualio --rsubtype scsi -m P570 --level lpar -F lpar_name,lpar_id,slot_num,remote_lpar_id,remote_slot_num --header
Inscription à :
Articles (Atom)
