Mapping new hdisk to LPAR from VIO

. logon to vio server ( BRKSVX29-VIO ) through padmin (user name)
2. execute lsmap to check the no.of lpars mapped.
NOTE: In $ promt you can’t execute AIX commands.

$ lsmap -all |more
SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost0 U9133.55A.0621FCH-V1-C20 0x00000003

VTD 29a_app
LUN 0x8200000000000000
Backing device x29a_app
Physloc

VTD 29a_os
LUN 0x8100000000000000
Backing device x29a_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost2 U9133.55A.0621FCH-V1-C22 0x00000004

VTD 29b_os
LUN 0x8100000000000000
Backing device x29b_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost4 U9133.55A.0621FCH-V1-C24 0x00000005

VTD 29c_os
LUN 0x8100000000000000
Backing device x29c_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost6 U9133.55A.0621FCH-V1-C26 0x00000006

VTD 29d_os
LUN 0x8100000000000000
Backing device x29d_os
Physloc

SVSA Physloc Client Partition ID

NOTE: go to the AIX command prompt
$ oem_setup_env

# ( now you can run AIX commands)

scan for new lun to create vg

#cfgmgr
#lspv

It will display new hdisk

Create app_vg and LVs in this VG ( LVs naming convention should be as lpar names )

comeout of the # prompt
Create virtual devices to map all LPARs according to their respective vhost adapters.

$ mkvdev -vdev x29a_app -vadapter vhost0 -dev 29a_app
29a_app Available
$ mkvdev -vdev x29b_app -vadapter vhost2 -dev 29b_app
29b_app Available
$ mkvdev -vdev x29c_app -vadapter vhost4 -dev 29c_app
29c_app Available
$ mkvdev -vdev x29d_app -vadapter vhost6 -dev 29d_app
29d_app Available
$ mkvdev -vdev x29e_app -vadapter vhost8 -dev 29e_app
29e_app Available
$ mkvdev -vdev x29f_app -vadapter vhost10 -dev 29f_app
29f_app Available
Now check whether these virtual devices mapped or not.

$ lsmap -all |more
SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost0 U9133.55A.0621FCH-V1-C20 0x00000003

VTD 29a_app
LUN 0x8200000000000000
Backing device x29a_app
Physloc

VTD 29a_os
LUN 0x8100000000000000
Backing device x29a_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost2 U9133.55A.0621FCH-V1-C22 0x00000004

VTD 29b_app
LUN 0x8200000000000000
Backing device x29b_app
Physloc

VTD 29b_os
LUN 0x8100000000000000
Backing device x29b_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost4 U9133.55A.0621FCH-V1-C24 0x00000005

VTD 29c_app
LUN 0x8200000000000000
Backing device x29c_app
Physloc

VTD 29c_os
LUN 0x8100000000000000
Backing device x29c_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost6 U9133.55A.0621FCH-V1-C26 0x00000006

VTD 29d_app
LUN 0x8200000000000000
Backing device x29d_app
Physloc

VTD 29d_os
LUN 0x8100000000000000
Backing device x29d_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost8 U9133.55A.0621FCH-V1-C28 0x00000007

VTD 29e_app
LUN 0x8200000000000000
Backing device x29e_app
Physloc

VTD 29e_os
LUN 0x8100000000000000
Backing device x29e_os
Physloc

SVSA Physloc Client Partition ID
————— ——————————————– ——————
vhost10 U9133.55A.0621FCH-V1-C30 0x00000008

VTD 29f_app
LUN 0x8200000000000000
Backing device x29f_app
Physloc

VTD 29f_os
LUN 0x8100000000000000
Backing device x29f_os
Physloc

Now go to each LPAR and scan for the new disk.Add the disk to app_vg ang mirror the app_vg as following steps:

root@brksvx29b:/ # lspv
hdisk0 0001dbc9a4bdeb91 rootvg active
hdisk1 0001dbc9a4eec4e3 rootvg active
hdisk2 0001dbc9b95d933a app_vg active
root@brksvx29b:/ # lsvg
rootvg
app_vg
root@brksvx29b:/ # lsvg -p app_vg
app_vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 703 0 00..00..00..00..00
root@brksvx29b:/ # cfgmgr
root@brksvx29b:/ # lspv
hdisk0 0001dbc9a4bdeb91 rootvg active
hdisk1 0001dbc9a4eec4e3 rootvg active
hdisk2 0001dbc9b95d933a app_vg active
hdisk3 none None
root@brksvx29b:/ # bootinfo -s hdisk2
22528
root@brksvx29b:/ # bootinfo -s hdisk3
22528
root@brksvx29b:/ # extendvg app_vg hdisk3
0516-1254 extendvg: Changing the PVID in the ODM.
root@brksvx29b:/ # lsvg -p app_vg
app_vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 703 0 00..00..00..00..00
hdisk3 active 703 703 141..141..140..140..141
root@brksvx29b:/ # mirrorvg -S app_vg
0516-1804 chvg: The quorum change takes effect immediately.
root@brksvx29b:/ # ps -ef |grep sync
root 102500 1 0 Aug 28 – 2:38 /usr/sbin/syncd 60
root 295146 327872 6 13:41:14 pts/0 0:00 lresynclv -l 0001dbc90000d6000000012ab95d94a6
root 327872 1 0 13:41:10 pts/0 0:00 /bin/ksh /usr/sbin/syncvg -v app_vg
root 356430 254134 0 13:41:44 pts/0 0:00 grep sync
root@brksvx29b:/ # lsvg -l app_vg
app_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv jfs2log 1 2 2 open/syncd N/A
federationlv jfs2 702 1404 2 open/stale /federation
root@brksvx29b:/ #

root@brksvx29c:/ # cfgmgr
root@brksvx29c:/ # lspv
hdisk0 0001dbc9a55e37fb rootvg active
hdisk1 0001dbc9a59904ed rootvg active
hdisk2 0001dbc9b96810b5 app_vg active
hdisk3 none None
root@brksvx29c:/ # bootinfo -s hdisk2
22528
root@brksvx29c:/ # bootinfo -s hdisk3
22528
root@brksvx29c:/ # extendvg app_vg hdisk3
0516-1254 extendvg: Changing the PVID in the ODM.
root@brksvx29c:/ # lsvg -p app_vg
app_vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 703 0 00..00..00..00..00
hdisk3 active 703 703 141..141..140..140..141
root@brksvx29c:/ # mirrorvg -S app_vg
0516-1804 chvg: The quorum change takes effect immediately.
root@brksvx29c:/ # ps -ef |grep -i sync
root 139372 1 0 Aug 28 – 2:43 /usr/sbin/syncd 60
root 303244 340190 2 13:45:15 pts/0 0:00 lresynclv -l 0001dbc90000d6000000012ab968121b
root 340190 1 0 13:45:09 pts/0 0:00 /bin/ksh /usr/sbin/syncvg -v app_vg
root@brksvx29c:/ # lsvg app_vg
VOLUME GROUP: app_vg VG IDENTIFIER: 0001dbc90000d6000000012ab968121b
VG STATE: active PP SIZE: 32 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1406 (44992 megabytes)
MAX LVs: 512 FREE PPs: 0 (0 megabytes)
LVs: 2 USED PPs: 1406 (44992 megabytes)
OPEN LVs: 2 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 1 STALE PPs: 698
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 130048
MAX PPs per PV: 1016 MAX PVs: 128
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
root@brksvx29c:/ # lsvg -l app_vg
app_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv jfs2log 1 2 2 open/syncd N/A
federationlv jfs2 702 1404 2 open/stale /federation
root@brksvx29c:/ #

root@brksvx29d:/ # cfgmgr
root@brksvx29d:/ # lspv
hdisk0 0001dbc9a5cdf8d8 rootvg active
hdisk1 0001dbc9a5ff2591 rootvg active
hdisk2 0001dbc9b96f02ef app_vg active
hdisk3 none None
root@brksvx29d:/ # bootinfo -s hdisk2
22528
root@brksvx29d:/ # bootinfo -s hdisk3
22528
root@brksvx29d:/ # extendvg app_vg hdisk3
0516-1254 extendvg: Changing the PVID in the ODM.
root@brksvx29d:/ # lsvg -l app_vg
app_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv jfs2log 1 1 1 open/syncd N/A
federationlv jfs2 702 702 1 open/syncd /federation
root@brksvx29d:/ # mirrorvg -S app_vg
0516-1804 chvg: The quorum change takes effect immediately.
root@brksvx29d:/ # lsvg -l app_vg
app_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv jfs2log 1 2 2 open/syncd N/A
federationlv jfs2 702 1404 2 open/stale /federation
root@brksvx29d:/ # ps -ef |grep -i sync
root 98344 1 0 13:50:16 pts/0 0:00 /bin/ksh /usr/sbin/syncvg -v app_vg
root 139372 1 0 Aug 28 – 2:42 /usr/sbin/syncd 60
root 331796 250004 0 13:50:40 pts/0 0:00 grep -i sync
root 372936 98344 3 13:50:23 pts/0 0:00 lresynclv -l 0001dbc90000d6000000012ab96f044f
root@brksvx29d:/ #
root@brksvx29e:/ # lspv
hdisk0 0001dbc9aa17ac04 rootvg active
hdisk1 0001dbc9aa4a992e rootvg active
hdisk2 0001dbc9b9879529 app_vg active
root@brksvx29e:/ # lsvg -p app_vg
app_vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 703 0 00..00..00..00..00
root@brksvx29e:/ # cfgmgr
root@brksvx29e:/ # lspv
hdisk0 0001dbc9aa17ac04 rootvg active
hdisk1 0001dbc9aa4a992e rootvg active
hdisk2 0001dbc9b9879529 app_vg active
hdisk3 none None
root@brksvx29e:/ # bootinfo -s hdisk2
22528
root@brksvx29e:/ # bootinfo -s hdisk3
22528
root@brksvx29e:/ # extendvg app_vg hdisk3
0516-1254 extendvg: Changing the PVID in the ODM.
root@brksvx29e:/ # lsvg -p app_vg
app_vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 703 0 00..00..00..00..00
hdisk3 active 703 703 141..141..140..140..141
root@brksvx29e:/ # mirrorvg -S app_vg
0516-1804 chvg: The quorum change takes effect immediately.
root@brksvx29e:/ # ps -ef | grep -i sync
root 139372 1 0 Aug 28 – 2:45 /usr/sbin/syncd 60
root 315574 1 0 13:55:36 pts/0 0:00 /bin/ksh /usr/sbin/syncvg -v app_vg
root 372856 315574 5 13:55:45 pts/0 0:00 lresynclv -l 0001dbc90000d6000000012ab987967e
root@brksvx29e:/ # lsvg -l app_vg
app_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv jfs2log 1 2 2 open/syncd N/A
federationlv jfs2 702 1404 2 open/stale /federation
root@brksvx29e:/ # lsvg app_vg
VOLUME GROUP: app_vg VG IDENTIFIER: 0001dbc90000d6000000012ab987967e
VG STATE: active PP SIZE: 32 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1406 (44992 megabytes)
MAX LVs: 512 FREE PPs: 0 (0 megabytes)
LVs: 2 USED PPs: 1406 (44992 megabytes)
OPEN LVs: 2 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 1 STALE PPs: 698
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 130048
MAX PPs per PV: 1016 MAX PVs: 128
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
root@brksvx29e:/ #

root@brksvx29f:/ # lspv
hdisk0 0001dbc9aafb0945 rootvg active
hdisk1 0001dbc9ab30f66f rootvg active
hdisk2 0001dbc9b998a221 app_vg active
root@brksvx29f:/ # cfgmgr
root@brksvx29f:/ # lspv
hdisk0 0001dbc9aafb0945 rootvg active
hdisk1 0001dbc9ab30f66f rootvg active
hdisk2 0001dbc9b998a221 app_vg active
hdisk3 none None
root@brksvx29f:/ # bootinfo -s hdisk2
22528
root@brksvx29f:/ # bootinfo -s hdisk3
22528
root@brksvx29f:/ # extendvg app_vg hdisk3
0516-1254 extendvg: Changing the PVID in the ODM.
root@brksvx29f:/ # lsvg -p app_vg
app_vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 703 0 00..00..00..00..00
hdisk3 active 703 703 141..141..140..140..141
root@brksvx29f:/ # mirrorvg -S app_vg
0516-1804 chvg: The quorum change takes effect immediately.
root@brksvx29f:/ # ps -ef | grep -i sync
root 139372 1 0 Aug 28 – 2:45 /usr/sbin/syncd 60
root 249968 114852 0 13:58:45 pts/0 0:00 grep -i sync
root 348164 356396 3 13:58:38 pts/0 0:00 lresynclv -l 0001dbc90000d6000000012ab998a39f
root 356396 1 0 13:58:36 pts/0 0:00 /bin/ksh /usr/sbin/syncvg -v app_vg
root@brksvx29f:/ # lsvg -l app_vg
app_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv jfs2log 1 2 2 open/syncd N/A
federationlv jfs2 702 1404 2 open/stale /federation
root@brksvx29f:/ #

Thanks

Leave a comment