Tag: cfgmgr

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

AIX lspath Missing path

Reviewing disk paths, I found some paths showing as Missing and some enabled on the same fscsi

root@aix:/ # lspath -l hdisk31
Enabled hdisk31 fscsi0
Missing hdisk31 fscsi0
Enabled hdisk31 fscsi0
Missing hdisk31 fscsi0
Enabled hdisk31 fscsi2
Missing hdisk31 fscsi2
Enabled hdisk31 fscsi2
Missing hdisk31 fscsi2

To correct this situation we will remove the path and recognize again. Check if there is a disk with only one path

root@aix:/ # lspath

Remove one path, run cfgmgr. Remove the other one and run cfgmgr

root@aix:/ # rmpath -p fscsi2 -d
root@aix:/ # cfgmgr
root@aix:/ # rmpath -p fscsi0 -d
root@aix:/ # cfgmgr

It should display like this

root@aix:/ # lspath -l hdisk31
Enabled hdisk31 fscsi0
Enabled hdisk31 fscsi0
Enabled hdisk31 fscsi2
Enabled hdisk31 fscsi2

AIX – Removing disks from a volume group and then inserting a new disk

This activity they intend to remove a disk array drawer and so a new disk will be added and some old disks will be removed

Listing the disks

root@aix:/ # lspv
hdisk0 0003416af966647d rootvg active
hdisk1 0003416af740bb45 rootvg active
hdisk2 0003416a783c13a2 datavg active
hdisk3 0003416af7cc1c47 datavg active
hdisk4 0003416af7cc1cef datavg active
hdisk5 0003416af7cc1d8e datavg active
hdisk6 0003416af7cc1e47 datavg active
hdisk7 0003416a702e8968 datavg active
hdisk8 0003416af7cc1f97 datavg active
hdisk9 0003416afae71331 datavg active
hdisk10 0003416afae713de None
hdisk11 0003416afae7147e datavg active
hdisk12 0003416afae71520 datavg active
hdisk13 0003416afae715c5 datavg active
hdisk14 0003416afae7166c datavg active
hdisk15 0003416abe0699e3 datavg active
hdisk18 0003416a96438ea0 poolvg active
hdisk19 0003416a964390f3 poolvg active
hdisk20 0003416a96439327 poolvg active
hdisk21 0003416a964395d5 poolvg active
hdisk16 0003416a2f20c609 pool02vg active
hdisk17 0003416a2f20e88c pool03vg active

The command to find the newly inserted disk

root@aix:/ # cfgmgr

Listing the disk again. The new disk is the hdisk22

root@aix:/ # lspv
hdisk0 0003416af966647d rootvg active
hdisk1 0003416af740bb45 rootvg active
hdisk2 0003416a783c13a2 datavg active
hdisk3 0003416af7cc1c47 datavg active
hdisk4 0003416af7cc1cef datavg active
hdisk5 0003416af7cc1d8e datavg active
hdisk6 0003416af7cc1e47 datavg active
hdisk7 0003416a702e8968 datavg active
hdisk8 0003416af7cc1f97 datavg active
hdisk9 0003416afae71331 datavg active
hdisk10 0003416afae713de None
hdisk11 0003416afae7147e datavg active
hdisk12 0003416afae71520 datavg active
hdisk13 0003416afae715c5 datavg active
hdisk14 0003416afae7166c datavg active
hdisk15 0003416abe0699e3 datavg active
hdisk18 0003416a96438ea0 poolvg active
hdisk19 0003416a964390f3 poolvg active
hdisk20 0003416a96439327 poolvg active
hdisk21 0003416a964395d5 poolvg active
hdisk16 0003416a2f20c609 pool02vg active
hdisk17 0003416a2f20e88c pool03vg active
hdisk22 none None

Checking if the hdisk22 is coming from the disk array

root@aix:/ # lsdev -Cc disk
hdisk0 Available 1Z-08-00-8,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 1Z-08-00-9,0 16 Bit LVD SCSI Disk Drive
hdisk2 Available 1Z-08-00-10,0 16 Bit LVD SCSI Disk Drive
hdisk3 Available 1Z-08-00-11,0 16 Bit LVD SCSI Disk Drive
hdisk4 Available 25-08-00-8,0 16 Bit LVD SCSI Disk Drive
hdisk5 Available 25-08-00-9,0 16 Bit LVD SCSI Disk Drive
hdisk6 Available 25-08-00-10,0 16 Bit LVD SCSI Disk Drive
hdisk7 Available 25-08-00-11,0 16 Bit LVD SCSI Disk Drive
hdisk8 Available 25-08-00-12,0 16 Bit LVD SCSI Disk Drive
hdisk9 Available 25-08-00-13,0 16 Bit LVD SCSI Disk Drive
hdisk10 Available 25-09-00-8,0 16 Bit LVD SCSI Disk Drive
hdisk11 Available 25-09-00-9,0 16 Bit LVD SCSI Disk Drive
hdisk12 Available 25-09-00-10,0 16 Bit LVD SCSI Disk Drive
hdisk13 Available 25-09-00-11,0 16 Bit LVD SCSI Disk Drive
hdisk14 Available 25-09-00-12,0 16 Bit LVD SCSI Disk Drive
hdisk15 Available 25-09-00-13,0 16 Bit LVD SCSI Disk Drive
hdisk16 Available 1f-08-02 1722-600 (600) Disk Array Device
hdisk17 Available 2a-08-02 1722-600 (600) Disk Array Device
hdisk18 Available 2a-08-02 1722-600 (600) Disk Array Device
hdisk19 Available 2a-08-02 1722-600 (600) Disk Array Device
hdisk20 Available 2a-08-02 1722-600 (600) Disk Array Device
hdisk21 Available 2a-08-02 1722-600 (600) Disk Array Device
hdisk22 Available 1f-08-02 1722-600 (600) Disk Array Device

Adding hdisk22 to the volume group poolvg

root@aix:/ # extendvg poolvg hdisk22
0516-1254 extendvg: Changing the PVID in the ODM.

Listing the disks to check if hdisk22 is in the poolvg

root@aix:/ # lspv | grep hdisk22
hdisk22 0003416a16888bf6 poolvg active

Listing the logical volumes from the volume group poolvg

root@aix:/ # lsvg -l poolvg
poolvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
pool_lv001 raw 128 128 4 open/syncd N/A
pool_lv002 raw 128 128 4 open/syncd N/A
pool_lv003 raw 128 128 4 open/syncd N/A
pool_lv004 raw 128 128 4 open/syncd N/A
pool_lv005 raw 128 128 4 open/syncd N/A
pool_lv006 raw 128 128 4 open/syncd N/A
pool_lv007 raw 128 128 4 open/syncd N/A
pool_lv008 raw 128 128 4 open/syncd N/A
pool_lv009 raw 128 128 4 open/syncd N/A
pool_lv010 raw 128 128 4 open/syncd N/A
pool_lv011 raw 128 128 4 open/syncd N/A
pool_lv012 raw 128 128 4 open/syncd N/A

Checking the characteristics from hdisk22

root@aix:/ # lspv hdisk22
PHYSICAL VOLUME: hdisk22 VOLUME GROUP: hsm_pool_vg
PV IDENTIFIER: 0003416a16888bf6 VG IDENTIFIER 0003416a00004c00000001129644220a
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 256 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 4462 (1142272 megabytes) VG DESCRIPTORS: 1
FREE PPs: 4462 (1142272 megabytes) HOT SPARE: no
USED PPs: 0 (0 megabytes) MAX REQUEST: 1 megabyte
FREE DISTRIBUTION: 893..892..892..892..893
USED DISTRIBUTION: 00..00..00..00..00

Removing the logical volumes. Repeat with all the logical volumes

root@aix:/ # rmlv -f hsm_pool_lv003
rmlv: Logical volume pool_lv003 is removed.

Removing the disks hdisk18, hdisk19, hdisk20 and hdisk21 from the volume group poolvg

root@aix:/ # reducevg poolvg hdisk18
root@aix:/ # reducevg poolvg hdisk19
root@aix:/ # reducevg poolvg hdisk20
root@aix:/ # reducevg poolvg hdisk21

Checking if the disks were removed

root@aix:/ # lspv
hdisk0 0003416af966647d rootvg active
hdisk1 0003416af740bb45 rootvg active
hdisk2 0003416a783c13a2 datavg active
hdisk3 0003416af7cc1c47 datavg active
hdisk4 0003416af7cc1cef datavg active
hdisk5 0003416af7cc1d8e datavg active
hdisk6 0003416af7cc1e47 datavg active
hdisk7 0003416a702e8968 datavg active
hdisk8 0003416af7cc1f97 datavg active
hdisk9 0003416afae71331 datavg active
hdisk10 0003416afae713de None
hdisk11 0003416afae7147e datavg active
hdisk12 0003416afae71520 datavg active
hdisk13 0003416afae715c5 datavg active
hdisk14 0003416afae7166c datavg active
hdisk15 0003416abe0699e3 datavg active
hdisk18 0003416a96438ea0 None
hdisk19 0003416a964390f3 None
hdisk20 0003416a96439327 None
hdisk21 0003416a964395d5 None
hdisk16 0003416a2f20c609 pool02vg active
hdisk17 0003416a2f20e88c pool03vg active
hdisk22 0003416a16888bf6 poolvg active

Removing the disk definition from the system

root@aix:/ # rmdev -dl hdisk18
hdisk18 deleted
root@aix:/ # rmdev -dl hdisk19
hdisk19 deleted
root@aix:/ # rmdev -dl hdisk20
hdisk20 deleted
root@aix:/ # rmdev -dl hdisk21
hdisk21 deleted

Checking if the disks are ready to be physically removed

root@aix:/ # lspv
hdisk0 0003416af966647d rootvg active
hdisk1 0003416af740bb45 rootvg active
hdisk2 0003416a783c13a2 datavg active
hdisk3 0003416af7cc1c47 datavg active
hdisk4 0003416af7cc1cef datavg active
hdisk5 0003416af7cc1d8e datavg active
hdisk6 0003416af7cc1e47 datavg active
hdisk7 0003416a702e8968 datavg active
hdisk8 0003416af7cc1f97 datavg active
hdisk9 0003416afae71331 datavg active
hdisk10 0003416afae713de None
hdisk11 0003416afae7147e datavg active
hdisk12 0003416afae71520 datavg active
hdisk13 0003416afae715c5 datavg active
hdisk14 0003416afae7166c datavg active
hdisk15 0003416abe0699e3 datavg active
hdisk16 0003416a2f20c609 pool02vg active
hdisk17 0003416a2f20e88c pool03vg active
hdisk22 0003416a16888bf6 poolvg active

The disks don’t appear anymore

root@aix:/ # lspv | egrep ‘hdisk18|hdisk19|hdisk20|hdisk21’
root@aix:/ #

Creating the logical volumes in the volume group to replace the old ones deleted

mklv -t raw -y pool_lv001 poolvg 128
mklv -t raw -y pool_lv002 poolvg 128
mklv -t raw -y pool_lv003 poolvg 128
mklv -t raw -y pool_lv004 poolvg 128
mklv -t raw -y pool_lv005 poolvg 128
mklv -t raw -y pool_lv006 poolvg 128
mklv -t raw -y pool_lv007 poolvg 128
mklv -t raw -y pool_lv008 poolvg 128
mklv -t raw -y pool_lv009 poolvg 128
mklv -t raw -y pool_lv010 poolvg 128
mklv -t raw -y pool_lv011 poolvg 128
mklv -t raw -y pool_lv012 poolvg 128
mklv -t raw -y pool_lv013 poolvg 128
mklv -t raw -y pool_lv014 poolvg 128
mklv -t raw -y pool_lv015 poolvg 128
mklv -t raw -y pool_lv016 poolvg 128
mklv -t raw -y pool_lv017 poolvg 128
mklv -t raw -y pool_lv018 poolvg 128
mklv -t raw -y pool_lv019 poolvg 128
mklv -t raw -y pool_lv020 poolvg 128
mklv -t raw -y pool_lv021 poolvg 128
mklv -t raw -y pool_lv022 poolvg 128
mklv -t raw -y pool_lv023 poolvg 128
mklv -t raw -y pool_lv024 poolvg 128
mklv -t raw -y pool_lv025 poolvg 128
mklv -t raw -y pool_lv026 poolvg 128
mklv -t raw -y pool_lv027 poolvg 128
mklv -t raw -y pool_lv028 poolvg 128
mklv -t raw -y pool_lv029 poolvg 128
mklv -t raw -y pool_lv030 poolvg 128
mklv -t raw -y pool_lv031 poolvg 128
mklv -t raw -y pool_lv032 poolvg 128
mklv -t raw -y pool_lv033 poolvg 128
mklv -t raw -y pool_lv034 poolvg 128

Verifying the volume group poolvg

root@aix:/ # lsvg poolvg
VOLUME GROUP: poolvg VG IDENTIFIER: 0003416a00004c00000001129644220a
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 4462 (1142272 megabytes)
MAX LVs: 256 FREE PPs: 110 (28160 megabytes)
LVs: 34 USED PPs: 4352 (1114112 megabytes)
OPEN LVs: 0 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 30480
MAX PPs per PV: 5080 MAX PVs: 6
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable