LPAR Removal

This page details the removal of an LPAR and the deletion of the associated filesystems, LUNS and VIO mappings.

Information required.

LPAR Name            webdb
Frame                Server-9119-595-2-SN83627FE
LPAR partition id    43 (2Bh)
Vio servers          b0022-vios1sp, b0022-vios2sp
Scsi adapter number  Adapter 40

Volume groups        rootvg, rootvgm, webdb_flashvg

LPAR work

Find out LPAR partition id eg. 43 == web_db (43d = 2Bh)

List Volume Groups, usually rootvg, rootvgm and application specific VG's. It would be usual for these to be created from one LUN each.

VIO Remove VTD device

Find out vhost number:-

$ lsdev -virtual |grep vhost |awk {'print $1'} |while read v
do
lsmap -vadapter $v |grep $v
done
...edited...
vhost37         U9119.595.83627FE-V4-C40                     0x0000002b

Find out all the mappings:-

$ lsmap -all | grep webdb
VTD                   webdb_flashrec
VTD                   webdb_rootvg
VTD                   webdb_rootvgm
$

Find out the disk backing devices:-

$ lsmap -all | grep -p webdb_rootvg
VTD                   webdb_rootvg
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk136
Physloc               U5791.001.99B0GMF-P1-C02-T1-W50050768011038B1-LB1000000000000

VTD                   webdb_rootvgm
Status                Available
LUN                   0x8200000000000000
Backing device        hdisk333
Physloc               U5791.001.99B0GMF-P1-C02-T1-W50050768011038B1-LB2000000000000
$ 

Then on each VIO server remove the VTD device (LUN name) & the backing device.

rmvdev -vtd webdb_flashrec

Remove the associated hdisks:-

$ lsmap -all | grep -p webdb_rootvg
VTD                   webdb_rootvg
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk136
Physloc               U5791.001.99B0GMF-P1-C02-T1-W50050768011038B1-LB1000000000000

VTD                   webdb_rootvgm
Status                Available
LUN                   0x8200000000000000
Backing device        hdisk333
Physloc               U5791.001.99B0GMF-P1-C02-T1-W50050768011038B1-LB2000000000000

$ rmvdev -vtd webdb_rootvg
webdb_rootvg deleted

$ rmvdev -vtd webdb_rootvgm
webdb_rootvgm deleted


$ rmdev -dev hdisk136
hdisk136 deleted

$ rmdev -dev hdisk333
hdisk333 deleted
$

Also remove the vhost device, this is the odd one out, one would expect it to be a rmvdev, but it an rmdev:-

$ rmdev -dev vhost37
vhost37 deleted
$

In the HMC GUI, delete the profile entry for the virtual scsi adapter, and also DLPAR it out.

SVC work

On the appropriate nim server. the luns presented to VIO for SVC need deleting.

bash-3.00# ssh admin@SVC2 svcinfo lshostvdiskmap | grep webdb
0                B0038_VIOS1SP     77             88             webdb_rootvg      10000000C95F9B21 60050768019201D9B00000000000026F
0                B0038_VIOS1SP     78             182            webdb_rootvgm     10000000C95F9B21 60050768019201D9B000000000000270
0                B0038_VIOS1SP     80             178            webdb_flashrec    10000000C95F9B21 60050768019201D9B000000000000274
1                B0038_VIOS2SP     77             88             webdb_rootvg      10000000C9603CE3 60050768019201D9B00000000000026F
1                B0038_VIOS2SP     78             182            webdb_rootvgm     10000000C9603CE3 60050768019201D9B000000000000270
1                B0038_VIOS2SP     80             178            webdb_flashrec    10000000C9603CE3 60050768019201D9B000000000000274
4                B0022_VIOS1SP     176            178            webdb_flashrec    10000000C95AAF4B 60050768019201D9B000000000000274
4                B0022_VIOS1SP     177            88             webdb_rootvg      10000000C95AAF4B 60050768019201D9B00000000000026F
4                B0022_VIOS1SP     178            182            webdb_rootvgm     10000000C95AAF4B 60050768019201D9B000000000000270
5                B0022_VIOS2SP     176            178            webdb_flashrec    10000000C95A8BE1 60050768019201D9B000000000000274
5                B0022_VIOS2SP     177            88             webdb_rootvg      10000000C95A8BE1 60050768019201D9B00000000000026F
5                B0022_VIOS2SP     178            182            webdb_rootvgm     10000000C95A8BE1 60050768019201D9B000000000000270
bash-3.00#

Run script appropriate for the VIO server:-

bash-3.00# ./rmmaptoviosB22P.ksh webdb_flashrec
bash-3.00#  

Delete the vdisks…..

LPAR work (2)

To finish off, delete the LPAR profile. This will free up the used CPU and memory back to the frame.

 
aix/aix_lparremoval.txt · Last modified: 06/04/2022 08:18 by andrew