Advertisements

Tag Archives: lsattr

Checking HBA status on AIX

Storage team checked and it was not showing light on the fiber

Index Slot Port Address Media Speed State Proto
===================================================
298 3 42 28a280 id N4 In_Sync FC
314 4 42 28b280 id N4 In_Sync FC

298 3/42 28a280 Online F 4 G AN A_S4_VIT_aix_HBA5C93 Emulex HBA 10:00:00:00:c9:86:5c:93
314 4/42 28b280 Online F 4 G AN A_S4_VIT_aix_HBA5C92 Emulex HBA 10:00:00:00:c9:86:5c:92

Listing HBA cards on AIX

root@aix:/ # lsdev -Cc adapter |grep fcs
fcs0 Available 01-00 4Gb FC PCI Express Adapter (df1000fe)
fcs1 Available 01-01 4Gb FC PCI Express Adapter (df1000fe)
fcs2 Available 06-00 4Gb FC PCI Express Adapter (df1000fe)
fcs3 Available 06-01 4Gb FC PCI Express Adapter (df1000fe)
fcs4 Available 0B-00 4Gb FC PCI Express Adapter (df1000fe)
fcs5 Available 0B-01 4Gb FC PCI Express Adapter (df1000fe)
fcs6 Available 0I-00 4Gb FC PCI Express Adapter (df1000fe)
fcs7 Available 0I-01 4Gb FC PCI Express Adapter (df1000fe)
fcs8 Available 0K-00 4Gb FC PCI Express Adapter (df1000fe)
fcs9 Available 0K-01 4Gb FC PCI Express Adapter (df1000fe)

Listing the WWPN of the HBA cards

root@aix:/ # lsdev -Cc adapter |grep fcs | awk ‘{print “echo “$1” `lscfg -vl “$1” | grep \”Network Address\”`”‘} | sh
fcs0 Network Address………….10000000C986EF2E
fcs1 Network Address………….10000000C986EF2F
fcs2 Network Address………….10000000C9865C92
fcs3 Network Address………….10000000C9865C93
fcs4 Network Address………….10000000C986ECDC
fcs5 Network Address………….10000000C986ECDD
fcs6 Network Address………….10000000C986F158
fcs7 Network Address………….10000000C986F159
fcs8 Network Address………….10000000C9865B8C
fcs9 Network Address………….10000000C9865B8D

Shows that the cable is connected

root@aix:/ # lsattr -El fscsi2 | grep attach
attach switch How this adapter is CONNECTED False
root@aix:/ # lsattr -El fscsi3 | grep attach
attach switch How this adapter is CONNECTED False

Fibre was replaced

Checking HBA link status

root@aix:/ # fcstat fcs2

FIBRE CHANNEL STATISTICS REPORT: fcs2

Device Type: 4Gb FC PCI Express Adapter (df1000fe) (adapter/pciex/df1000fe)
Serial Number: 1C910080BA
Option ROM Version: 02E8277F
ZA: Z1F2.70A5
World Wide Node Name: 0x20000000C9865C92
World Wide Port Name: 0x10000000C9865C92

FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 4 GBIT
Port Speed (running): 4 GBIT
Port FC ID: 0x28b280
Port Type: Fabric
Attention Type: Link Up
Topology: Point to Point or Fabric

Seconds Since Last Reset: 11518131

Transmit Statistics Receive Statistics
——————- ——————
Frames: 391415147 1672088546
Words: 100836128512 731260150528

LIP Count: 0
NOS Count: 124979
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 3
Loss of Sync Count: 2
Loss of Signal: 1
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 1420
Invalid CRC Count: 0

IP over FC Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0

FC SCSI Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
No Command Resource Count: 0

IP over FC Traffic Statistics
Input Requests: 0
Output Requests: 0
Control Requests: 0
Input Bytes: 0
Output Bytes: 0

FC SCSI Traffic Statistics
Input Requests: 143103337
Output Requests: 57507565
Control Requests: 1604694
Input Bytes: 2879322009348
Output Bytes: 387479621632
root@aix:/ # fcstat fcs3

FIBRE CHANNEL STATISTICS REPORT: fcs3

Device Type: 4Gb FC PCI Express Adapter (df1000fe) (adapter/pciex/df1000fe)
Serial Number: 1C910080BA
Option ROM Version: 02E8277F
ZA: Z1F2.70A5
World Wide Node Name: 0x20000000C9865C93
World Wide Port Name: 0x10000000C9865C93

FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 4 GBIT
Port Speed (running): 4 GBIT
Port FC ID: 0x28a280
Port Type: Fabric
Attention Type: Link Up
Topology: Point to Point or Fabric

Seconds Since Last Reset: 11518140

Transmit Statistics Receive Statistics
——————- ——————
Frames: 4294967295 4294967295
Words: 1099511627520 1099511627520

LIP Count: 0
NOS Count: 305070
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 3
Loss of Sync Count: 310
Loss of Signal: 2
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 633
Invalid CRC Count: 0

IP over FC Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0

FC SCSI Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
No Command Resource Count: 0

IP over FC Traffic Statistics
Input Requests: 0
Output Requests: 0
Control Requests: 0
Input Bytes: 0
Output Bytes: 0

FC SCSI Traffic Statistics
Input Requests: 262598606
Output Requests: 731955157
Control Requests: 736433
Input Bytes: 68507685800533
Output Bytes: 191832750846466
root@aix:/ # lsattr -El fscsi2
attach switch How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True+
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True+
scsi_id 0x28b280 Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True

Advertisements

Creating a jfs2 filesystem in AIX

Listing physical volumes

root@aix:/ # lspv
hdisk0 00c94ad454a2d4c5 rootvg active
hdisk1 00c94ad45808a18f rootvg active
hdisk3 00c94ad4229190d8 tsmpoolvg active
hdisk21 00ce196f4b9604c3 aplicvg active
hdisk22 00ce196f418e3f6d aplicvg active
hdisk44 00c94ad4c75dfb09 aplicvg active
hdisk2 none None
hdisk57 00c94ad481c4f2aa aplicvg active
hdisk55 00c94ad4f99f7480 tsm55dbvg active
hdisk56 00c94ad4f99f2d43 tsm55logvg active

Configures devices

root@aix:/ # cfgmgr

Listing physical volumes

root@aix:/ # lspv
hdisk0 00c94ad454a2d4c5 rootvg active
hdisk1 00c94ad45808a18f rootvg active
hdisk3 00c94ad4229190d8 tsmpoolvg active
hdisk21 00ce196f4b9604c3 aplicvg active
hdisk22 00ce196f418e3f6d aplicvg active
hdisk44 00c94ad4c75dfb09 aplicvg active
hdisk2 none None
hdisk57 00c94ad481c4f2aa aplicvg active
hdisk55 00c94ad4f99f7480 tsm55dbvg active
hdisk56 00c94ad4f99f2d43 tsm55logvg active
hdisk4 none None

Comparing lspv output, the new disk is hdisk4. Checking ID to see if it matches

root@aix:/ # lsattr -El hdisk4 | grep -i 600507680191818C1000000000000C98
unique_id 33213600507680191818C1000000000000C9804214503IBMfcp Device Unique Identification False

Using script to query all disks

for i in `lspv | awk ‘{print $1’}`
do
echo $i `lsattr -El $i | grep unique_id`
done

Creating volume group with PP SIZE 16MB is not possible

root@aix:/ # mkvg -y tsmdbtmp -s 16 hdisk4
0516-1254 mkvg: Changing the PVID in the ODM.
0516-1208 mkvg: Warning, The Physical Partition Size of 16 requires the
creation of 32000 partitions for hdisk4. The system limitation is 16256
physical partitions per disk at a factor value of 16. Specify a larger
Physical Partition Size or a larger factor value in order create a
volume group on this disk.
0516-862 mkvg: Unable to create volume group.

Creating volume group with PP SIZE 32MB.

root@aix:/ # mkvg -y tsmdbtmp -s 32 hdisk4
tsmdbtmp

Listing volume group information

root@aix:/ # lsvg tsmdbtmp
VOLUME GROUP: tsmdbtmp VG IDENTIFIER: 00c94ad400004c000000015d801914eb
VG STATE: active PP SIZE: 32 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 15999 (511968 megabytes)
MAX LVs: 256 FREE PPs: 15999 (511968 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 16256 MAX PVs: 2
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
DISK BLOCK SIZE: 512 CRITICAL VG: no

Creating filesystem. Logical volume name is fslvXX

root@aix:/ # smitty crfs

Add a File System

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System
Add a Journaled File System
Add a CDROM File System

F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do

Add an Enhanced Journaled File System

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System
Add an Enhanced Journaled File System on a Previously Defined Logical Volume

F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do

Add an Enhanced Journaled File System

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System
Add an Enhanced Journaled File System on a Previously Defined Logical Volume

+————————————————————————–+
| Volume Group Name |
| |
| Move cursor to desired item and press Enter. |
| |
| rootvg |
| aplicvg |
| tsmpoolvg |
| tsm55logvg |
| tsm55dbvg |
| tsmdbtmp |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
F1| /=Find n=Find Next |
F9+————————————————————————–+

Add an Enhanced Journaled File System

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
Volume group name tsmdbtmp
SIZE of file system
Unit Size Megabytes +
* Number of units [511900] #
* MOUNT POINT [/tsmdbtmp]
Mount AUTOMATICALLY at system restart? yes +
PERMISSIONS read/write +
Mount OPTIONS [] +
Block Size (bytes) 4096 +
Logical Volume for Log +
Inline Log size (MBytes) [] #
Extended Attribute Format +
ENABLE Quota Management? no +
Enable EFS? no +
Allow internal snapshots? no +
Mount GROUP []

Mount logical volume

root@aix:/ # mount /tsmdbtmp

Check filesystem size

root@aix:/ # df -m /tsmdbtmp
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/fslv08 511904.00 511825.51 1% 4 1% /tsmdbtmp

Checking AIX HBA link

lsattr -El fscsi. Look for the attach parameter

root@aix:/ # lsattr -El fscsi1
attach none How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True
scsi_id Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True
root@aix:/ # lsattr -El fscsi3
attach al How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True
scsi_id 0x1 Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True

The adapter fcs2 I know that is connected

root@aix:/ # lsattr -El fscsi2
attach switch How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True
scsi_id 0x2bd00 Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True

After plugging the fibre, I ran cfgmgr to recognize the hardware

root@aix:/ # cfgmgr

And runnning again lsattr -El fscsi I see that the attach parameter changed to switch

root@aix:/ # lsattr -El fscsi1
attach switch How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True
scsi_id 0x14fdc0 Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True
root@aix:/ # lsattr -El fscsi3
attach al How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True
scsi_id 0x1 Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True

root@aix:/ # fcstat fcs1

FIBRE CHANNEL STATISTICS REPORT: fcs1

Device Type: 4Gb FC PCI Express Adapter (df1000fe) (adapter/pciex/df1000fe)
Serial Number: 1C91308281
Option ROM Version: 02E8277F
ZA: Z1F2.70A5
World Wide Node Name: 0x20000000C986EF2F
World Wide Port Name: 0x10000000C986EF2F

FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 4 GBIT
Port Speed (running): 4 GBIT
Port FC ID: 0x28af80
Port Type: Fabric
Attention Type: Link Up
Topology: Point to Point or Fabric

Seconds Since Last Reset: 11519187

Transmit Statistics Receive Statistics
——————- ——————
Frames: 4294967295 4294967295
Words: 1099511627520 1099511627520

LIP Count: 0
NOS Count: 0
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 1
Loss of Sync Count: 1
Loss of Signal: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 3
Invalid CRC Count: 0

IP over FC Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0

FC SCSI Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
No Command Resource Count: 0

IP over FC Traffic Statistics
Input Requests: 0
Output Requests: 0
Control Requests: 0
Input Bytes: 0
Output Bytes: 0

FC SCSI Traffic Statistics
Input Requests: 614967916
Output Requests: 1227673574
Control Requests: 1180997
Input Bytes: 160727856996239
Output Bytes: 321763800652003

%d bloggers like this: