Sie sind auf Seite 1von 8

1.

AIX VIO - Cluster - Dual VIO - HOST


Based
From Unixwiki
Jump to: navigation, search
AIX VIO - Cluster - Dual VIO - HOST Based

1.1

Contents

[hide]

1 Detect the new LUNs


o 1.1 Identify the new LUNs
o 1.2 Determine the sizes of your LUNs
o 1.3 Apply PVIDs to the new LUNs
o 1.4 Verify the PVIDs are assigned
o 1.5 Change the reserve policy for the disks
o 1.6 Determine the LDEV # for each LUN

2 Map new LUNs


o 2.1 Assign the disks to LPARS

3 Migrating Disks on LPARs (which receive their disk from VIO)


o 3.1 Detect the new LUNs
o 3.2 Change hcheck_interval
o 3.3 Migrate from old to new

3.3.1 Application Volumes

3.3.2 System Volumes: rootvg

o 3.4 If you experience savebase errors


o 3.5 Remove old disks from client

2.1

4 Removing the virtual devices (on the VIO servers)

Detect the new LUNs

Login to the first VIO server


Detect the new LUNs
in oem_setup_env shell

# cd /var/tmp; lspv > lspv.b4;lsdev -Cc disk >lsdev.b4


#cfgmgr
#lspv > lspv.after; lsdev -Cc disk >lsdev.after

Identify the new LUNs


# diff lspv.b4 lspv.after | grep hdisk
hdisk141
none
hdisk142
none
hdisk143
none
hdisk144
none
hdisk145
none
hdisk146
none
hdisk147
none
hdisk148
none
hdisk149
none
hdisk150
none
hdisk151
none

Determine the sizes of your LUNs


in oem_setup_env shell
Determine the sizes of your new hdisks
#bootinfo -s <hdisk#>

Apply PVIDs to the new LUNs


in padmin shell
Syntax:
chdev -dev <hdiskname> -attr pv=yes

None
None
None
None
None
None
None
None
None
None
None

Example: (loops through disks and, if they do not have a PVID, assigns them
one)
$ for i in `diff lspv.b4 lspv.after | grep hdisk |awk '{print $2}'`; do
> echo $i
> chdev -dev $i -attr pv=yes
> done
hdisk141
hdisk141 changed
hdisk142
hdisk142 changed
hdisk143
hdisk143 changed
hdisk144
hdisk144 changed
hdisk145
hdisk145 changed
hdisk146
hdisk146 changed
hdisk147
hdisk147 changed
hdisk148
hdisk148 changed
hdisk149
hdisk149 changed
hdisk150
hdisk150 changed
hdisk151
hdisk151 changed

Verify the PVIDs are assigned


# cd /var/tmp
#lspv > lspv.after1

Verify the new hdisks all have their own PVID now
Example:
# diff lspv.after lspv.after1 | grep hdisk
hdisk141
00c6cdf45bd40363
hdisk142
00c6cdf45bd4071b
hdisk143
00c6cdf45bd40a76
hdisk144
00c6cdf45bd40dd4
hdisk145
00c6cdf45bd41130
hdisk146
00c6cdf45bd41481
hdisk147
00c6cdf45bd417c4
hdisk148
00c6cdf45bd41b10
hdisk149
00c6cdf45bd41e64
hdisk150
00c6cdf45bd421bd
hdisk151
00c6cdf45bd4250a

None
None
None
None
None
None
None
None
None
None
None

Change the reserve policy for the disks


It is neccesary to change the reserve policy on the disks in order for both VIO servers to be
able to access them.

Syntax:
chdev -dev <hdisk#> -attr reserve_policy=no_reserve

Example:
# chdev -dev hdisk141
hdisk141 changed
# chdev -dev hdisk142
hdisk142 changed
# chdev -dev hdisk143
hdisk143 changed
# chdev -dev hdisk144
hdisk144 changed
# chdev -dev hdisk145
hdisk145 changed
# chdev -dev hdisk146
hdisk146 changed
# chdev -dev hdisk147
hdisk147 changed
# chdev -dev hdisk148
hdisk148 changed
# chdev -dev hdisk149
hdisk149 changed
# chdev -dev hdisk150
hdisk150 changed
# chdev -dev hdisk151
hdisk151 changed

-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve
-attr reserve_policy=no_reserve

Determine the LDEV # for each LUN


in oem_setup_env shell
You will need the LDEV number for when you assign the virtual device's VTD name
Syntax:
ls /dev/<hdiskname> | /usr/HORCM/bin/inqraid | grep LDEV | awk '{print $1,
$9}'

Example: (loops through hdisk141 - hdisk151 giving hdisk name and associated LDEV#)
# ls /dev/ | egrep 'disk14[1-9]|disk1[0-1]' | /usr/local/scripts/inqraid |
grep LDEV | awk '{print $1, $9}'
hdisk141 =1026
hdisk142 =1058
hdisk143 =1059
hdisk144 =1060
hdisk145 =1061
hdisk146 =1062
hdisk147 =1063
hdisk148 =1064
hdisk149 =1065
hdisk150 =1066
hdisk151 =1067

3.1

Map new LUNs


1. Ensure you have gathered the HDISK, PVIDs, LDEV information you gathered from
above steps
2. Export the data to a spreadsheet
3. Add several extra columns to the right side of the spreadsheet for "New HDISK",
"New PVID", and "New LDEV"
4. Match up the new hdisks to a an existing hdisk for the hosts you are migrating. You
need only match them by their size.

Here is my spreadsheet from the last migration I performed


(if you have any questions about the spreadsheet, or about the formulas I used to quickly
create VIO mkdev commands, please ask me - MS, Gurunathan)

Assign the disks to LPARS


in padmin shell
Create the virtual devices using the following syntax:
$mkdev -vdev <vio hdisk number> -vadapter <vhost number for the LPAR> -dev
<LPAR hostname-LDEV#>

Repeat this for the other VIO server keeping in mind that the hdisk name may be different on
the other VIO server, use the PVID to be certain you have the right hdisk names!

4.1
Migrating Disks on LPARs (which receive their disk
from VIO)
Detect the new LUNs
# cfgmgr

Change hcheck_interval
Before assigning the new disks to the VG's we need to change the hcheck_interval attribute
of disks in VIO Client. we use 60 as the default value hcheck_interval.
Syntax:
$chdev -l hdisk## -a hcheck_interval=60

Migrate from old to new

Application Volumes
List the physical volumes
# lsvg -p db2dmpvg
db2dmpvg:
PV_NAME
PV STATE
DISTRIBUTION
hdisk20
active
00..00..24..00..07

TOTAL PPs

FREE PPs

207

31

FREE

Determine the PVID of the disks in this VG


# lspv | grep hdisk20
hdisk20
00c6cdf42a1a3d74

db2dmpvg

active

Look at your spreadsheet and determine what the replacement disk PVID is.
find the replacement disk hdisk# using the pvid
# lspv | grep 4071b
hdisk46
00c6cdf45bd4071b

None

extend the VG with the new replacement PV


# extendvg db2dmpvg hdisk46

Mirror the old PV and new PV


# mirrorvg -S hdisk20 hdisk46

verify the PP's have transfered from the old PVs to the new PVs
# lsvg -p db2dmpvg
db2dmpvg:
PV_NAME
PV STATE
DISTRIBUTION
hdisk20
active
26..00..00..00..05
hdisk46
active
26..00..00..00..05

TOTAL PPs

FREE PPs

207

31

207

31

TOTAL PPs

FREE PPs

207

31

FREE

Remove the old PV from the VG


# unmirrorvg db2dmpvg hdisk20
# reducevg db2dmpvg hdisk20

Verify only the new PV remains


# lsvg -p db2dmpvg
db2dmpvg:
PV_NAME
PV STATE
DISTRIBUTION
hdisk46
active
26..00..00..00..05

FREE

System Volumes: rootvg


We do not use SAN disk as a boot disk in AIX LPAR.

If you experience savebase errors


0516-1734 reducevg: Warning, savebase failed.
'savebase' before rebooting.

Please manually run

Simply run savebase to fix this.

Remove old disks from client


Once data is completely moved off from old disks and removed from respective VG's, you
can remove the hdisk## from client
#rmdev -dl hdisk##

Do not run cfgmgr on this client until its VTDs are removed from both VIO's.

5.1

Removing the virtual devices (on the VIO servers)

Using the spreadsheet identify old VTD and remove its using rmvdev -vtd <VTD Name>
M.S.Gurunathan (talk) 02:57, 31 July 2014 (UTC)
Retrieved from "http://tsunixwiki.uk.standardchartered.com/unixwiki/index.php?
title=AIX_VIO_-_Cluster_-_Dual_VIO_-_HOST_Based&oldid=3473"
Personal tools

Log in

Namespaces

Page

Discussion

Variants
Views

Read

View source

View history

Actions

Search
Go

Search

Special:Search

Navigation

Main page

Recent changes

Help

Toolbox

What links here

Related changes

Special pages

Printable version

Permanent link

This page was last modified on 31 July 2014, at 03:41.

This page has been accessed 62 times.

Privacy policy

About Unixwiki

Disclaimers

Das könnte Ihnen auch gefallen