VIOS(Virtual I/O Server, Power Systems のハイパーバイザー) のアップグレードを実施した手順をメモ書きします。
準備
・「PowerVM3.1アップデート&VIOS3.1.0_3.1.1移行ガイド 」をよく読みます。
-> マイグレーション・パスは「新規インストール + 構成情報リストア」で実行
既存と同じディスクにVIOS3.1をインストールします。
VIOS新規インストールはNIM(Network Install Manager)を使用します。
・こちらの文書 「Upgrading to VIOS 3.1 」もよく読みます。
・release notes もよく読みます。
・VIOS 3.1.0.21 Service Pack Release Notes #VIOS3.1.0.20 のリリースノートが記載時点、見当たらなかったので、VIOS3.1.0.21 のリンクです。
・VIOS 3.1.2.10 Fix Pack Release Notes
環境
・VIOS 2.2.6.31
- NPIV(Nport ID Virtualizaion) と vSCSI 混在構成 (テスト環境のため構成ばらばら...)
- SEA (Shared Ethernet Adapter) 1つ
- SSP(Shared Storage Pool)構成なし
- 仮想メディア・レポジトリ あり
- VIOC 50台以上。(AIX/Linux/IBM i 混在)
・NIMサーバ (AIX 7.2TL4)
0. 事前構成情報取得
この手順メモでは、冗長構成VIOSの副系で確認しています。
VIOS のhostmane は VIOS2 とします。
$ viosbr -backup -file /tmp/VIOS2.viosbr
Backup of this node (VIOS2) successful
取得確認
# ls -l /tmp/VIOS2.viosbr*
-rw-r--r-- 1 padmin staff 9457 Dec 29 18:53 /tmp/VIOS2.viosbr.tar.gz
-> tar.gz 形式で取得されています。
構成情報保管のため他サーバーへの転送します。
転送のため oem_setup_env 環境で実施。
$ oem_setup_env
# scp -p /tmp/VIOS2.viosbr.tar.gz <保管サーバーのIPアドレス>:<保管先ディレクトリ>
root@<保管サーバーのIPアドレス>'s password:
VIOS2.viosbr.tar.gz 0% 0 0.0KB/s --:-- ETA
VIOS2.viosbr.tar.gz 100% 9457 10.4MB/s 00:00
# exit
確認のため、一応コマンドでも情報を取得しておきます。(必要に応じてアップグレード後に比較)
コマンドのみ記載します。(出力結果は省略)
$ hostname
$ ioslevel
$ lsdev | grep hdisk
$ lspv
$ lsmap -all
$ lsmap -all -npiv
$ lsdev -slots
$ lsdev -vpd
$ lsdev -virtual
$ lsdev | grep ent
$ lsdev -dev entX -attr #<= X は SEA アダプターの番号を指定
$ lsvg
$ lsvg -lv rootvg
$ lsvopt
$ ls -l /var/vio/VMLibrary
$ errlog
$ oem_setup_env
# lslpp -l *sddpcm*
# manage_disk_drivers -l
# lsattr -El hdiskX | grep reserve #<= X はhdisk 番号。すべてのディスクのreserve_policy を確認
# lsattr -El hdiskX #<= X はhdisk 番号。reserve_policy 以外も念のため確認
# exit
$
・VIOS rootvg 上に配置している仮想メディア・リポジトリの退避 (環境依存)
「/var/vio/VMLibrary」下のisoファイルを別サーバーに転送します。
(配置例)
$ ls -l /var/vio/VMLibrary
-rw------- 1 root staff 3451203584 Apr 26 2017 RHEL-7.3BE.iso
-rw-r----- 1 root staff 8117753856 Jan 01 13:18 RHEL-8.3.0-20201009.2-ppc64le-dvd1.iso
-rw-r--r-- 1 root staff 1718878208 Nov 02 2017 aix_7.2_expansion_pack_42017.iso
-r-------- 1 root staff 918212608 Jan 29 2018 ubuntu-16.04.3-server-ppc64el.iso
・・・
(iso ファイル量が多いと、転送も大変...)
1. NIMの準備
手元にあったリソースの関係で、2段階アップデートを取ることにしました。
① VIOS 2.2.6 -> VIOS 3.1.0.20 へのアップグレード (NIM mksysb install)
② VIOS 3.1.0.20 -> VIOS 3.1.2.10 へのアップデート (NFS マウントを行い、updateios コマンド実施)
①のリソースの確認
-
インストール・メディアからmksysb ファイルを抽出する方法は、 PowerVM3.1アップデート&VIOS3.1.0_3.1.1移行ガイド - p49 参照
-
mksysb リソースのNIMの登録の仕方は割愛。(参考 : NIMの環境構築)
# lsnim -l vios31020_mksysb
vios31020_mksysb:
class = resources
type = mksysb
creation_date = Thu Dec 29 20:45:24 2020
Rstate = ready for use
prev_state = unavailable for use
location = /export/lpp_source/vios31020_mksysb
version = 7
release = 2
mod = 3
oslevel_r = 7200-03
oslevel_s = 7200-03-03-1913
alloc_count = 0
server = master
extracted_spot = vios31020_mksysb_spot
# lsnim -l vios31020_mksysb_spot
vios31020_mksysb_spot:
class = resources
type = spot
plat_defined = chrp
arch = power
Rstate = ready for use
prev_state = verification is being performed
location = /export/spot/vios31020_mksysb_spot/vios31020_mksysb_spot/usr
version = 7
release = 2
mod = 3
oslevel_r = 7200-03
oslevel_s = 7200-03-03-1913
alloc_count = 0
server = master
if_supported = chrp.64 ent
Rstate_result = success
mksysb_source = vios31020_mksysb
#
② 対象VIOS にリソースを定義
(定義方法は割愛 (参考 : NIMの環境構築) )
# lsnim -l VIOS2
VIOS2:
class = machines
type = standalone
connect = nimsh
platform = chrp
netboot_kernel = 64
if1 = network_1 VIOS2 0
cable_type1 = N/A
Cstate = BOS installation has been enabled
prev_state = ready for a NIM operation
Mstate = currently running
boot = boot
mksysb = vios31020_mksysb
nim_script = nim_script
spot = vios31020_mksysb_spot
control = master
#
2. VIOS3.1.0.20 のインストール実行
・VIOS2 を停止し HMC から VIOS2 区画を SMS で起動
・HMC の仮想端末にログインし、ネットワークブートの選択を行う
・System Backup Install and Setting まで進んだら、導入ディスクを間違わないように選択し、他オプションも確認してインストール開始。
System Backup Installation and Settings
Either type 0 and press Enter to install with the current settings, or type the
number of the setting you want to change and press Enter.
Setting: Current Choice(s):
1 Disk(s) where you want to install ...... hdisk0
Use Maps............................. No
2 Shrink File Systems..................... No
3 Import User Volume Groups............... No
4 Recover Devices......................... No
5 Select Edition........................ standard
>>> 0 Install with the settings listed above.
Change Disk(s) Where You Want to Install
Type one or more numbers for the disk(s) to be used for installation and press
Enter. To cancel a choice, type the corresponding number and Press Enter.
At least one bootable disk must be selected. The current choice is indicated
by >>>.
Name Physical Volume Identifier
>>> 1 hdisk0 0xxxdb5c89xxxbxx
2 hdisk1 0000000000000000
3 hdisk2 0000000000000000
4 hdisk3 00fxxxx35ddxxxxx
5 hdisk4 00f9xxxx849xxxxx
6 MORE CHOICES...
>>> 0 Continue with choices indicated above
55 More Disk Options
66 Disks not known to Base Operating System Installation
77 Display More Disk Information
88 Help ?
99 Previous Menu
インストールが完了し、ログインまで到達。新規インストールのため、パスワード変更が要求されました。
login: padmin
[compat]: 3004-610 You are required to change your password.
Please choose a new one.
padmin's New password:
Enter the new password again:
software maintenance terms and condition への同意。
Indicate by selecting the appropriate response below whether you
accept or decline the software maintenance terms and conditions.
Accept (a) | Decline (d) | View Terms (v) > a
ioslevel コマンドを実行しようと思ったのですが、license accept が最初に必要とのこと。
$ ioslevel
The I/O Server license must be accepted before running this command.
Only the chlang command may be run before accepting the license.
To view the license, run the license command with the -view option.
If the -lang flag is not specified the license will be displayed in
the current locale (set by the chlang command). If the license is not
available in the language selected, English will be the default.
To accept the license, run the license command with the -accept option.
Locale currently set to: "en_US".
Usage: license {[-view] [-accept]} [-lang Name]
license [-ls]
View and accept the I/O Server license agreement.
-accept Accept the license agreement.
-lang Specifies the language-territory (locale name) the license
is displayed in.
-ls Lists available locales.
-view Displays the license agreement.
license -accept の実行。rules の適用も示唆されます。
$ license -accept
Current system settings are different from the best practice recommendations for a VIOS.
To view the differences between system and the recommended settings, run the following:
$rules -o diff -s -d
To deploy the VIOS recommended default settings, run the following:
$rules -o deploy -d
$shutdown -restart
$
ioslevel を確認
$ ioslevel
3.1.0.20
無事 VIOS 3.1.0.20 が導入されています。
3. VIOS3.1.2.10 へのアップデート
VIOS 3.1.2.10リソースを保管しているサーバーにNFSマウントします。
(oem_setup_env 環境で実施)
$ oem_setup_env
$ mount <保管先サーバー>:<保管先ディレクトリ> /mnt
# df -m
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 256.00 207.49 19% 3278 7% /
/dev/hd2 4224.00 655.55 85% 57841 27% /usr
/dev/hd9var 768.00 563.36 27% 3628 3% /var
/dev/hd3 4800.00 4797.29 1% 39 1% /tmp
/dev/hd1 10240.00 10186.25 1% 1482 1% /home
/dev/hd11admin 128.00 127.64 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 896.00 422.13 53% 5952 6% /opt
/dev/livedump 256.00 255.64 1% 4 1% /var/adm/ras/livedump
/ahafs - - - 36 1% /aha
<保管先サーバー>:<保管先ディレクトリ> 46080.00 7072.20 85% 1246 1% /mnt
/usr 容量の容量が少ないようなので、増やしておきます。
# chfs -a size=+5G /usr
Filesystem size changed to 19136512
# df -m
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 256.00 207.49 19% 3278 7% /
/dev/hd2 9344.00 5774.77 39% 57841 5% /usr
/dev/hd9var 768.00 563.36 27% 3628 3% /var
/dev/hd3 4800.00 4797.29 1% 39 1% /tmp
/dev/hd1 10240.00 10186.23 1% 1482 1% /home
/dev/hd11admin 128.00 127.64 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 896.00 422.13 53% 5952 6% /opt
/dev/livedump 256.00 255.64 1% 4 1% /var/adm/ras/livedump
/ahafs - - - 36 1% /aha
<保管先サーバー>:<保管先ディレクトリ> 46080.00 7072.20 85% 1246 1% /mnt
# exit
$ updateios -dev /mnt -accept
install_all_updates: Initializing system parameters.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
install_all_updates: Checking for updated install utilities on media.
install_all_updates: Updating install utilities to latest level on media.
*******************************************************************************
installp PREVIEW: installation will not actually occur.
*******************************************************************************
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...
SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.
Mandatory Fileset Updates
-------------------------
(being installed automatically due to their importance)
bos.rte.install 7.2.5.1 # LPP Install Commands
<< End of Success Section >>
+-----------------------------------------------------------------------------+
BUILDDATE Verification ...
+-----------------------------------------------------------------------------+
Verifying build dates...done
FILESET STATISTICS
------------------
1 Selected to be installed, of which:
1 Passed pre-installation verification
----
1 Total to be installed
RESOURCES
---------
Estimated system resource requirements for filesets being installed:
(All sizes are in 512-byte blocks)
Filesystem Needed Space Free Space
/ 40 424944
/usr 29776 11826736
/tmp 560 9824576
----- -------- ------
TOTAL: 30376 22076256
NOTE: "Needed Space" values are calculated from data available prior
to installation. These are the estimated resources required for the
entire operation. Further resource checks will be made during
installation to verify that these initial estimates are sufficient.
******************************************************************************
End of installp PREVIEW. No apply operation has actually occurred.
******************************************************************************
install_all_updates: Processing media.
install_all_updates: Generating list of updatable installp filesets.
*** ATTENTION: the following list of filesets are installable base images
that are updates to currently installed filesets. Because these filesets are
base-level images, they will be committed automatically. After these filesets
are installed, they can be down-leveled by performing a force-overwrite with
the previous base-level. See the installp man page for more details. ***
ICU4C.rte 7.2.5.0
X11.loc.en_US.Dt.rte 7.2.4.0
X11.loc.en_US.base.lib 7.2.4.0
X11.loc.en_US.base.rte 7.2.4.0
bos.help.msg.en_US.com 7.2.5.0
bos.help.msg.en_US.smit 7.2.5.0
bos.msg.ca_ES.net.tcp.client 7.2.5.0
bos.msg.ca_ES.rte 7.2.5.0
bos.msg.de_DE.net.tcp.client 7.2.5.0
bos.msg.de_DE.rte 7.2.5.0
installp: bosboot process completed.
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+
Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
ksys.hsmon.rte 1.5.0.0 USR APPLY SUCCESS
〜 長いので省略 〜
installp: * * * A T T E N T I O N ! ! !
Software changes processed during this session require this system
and any of its diskless/dataless clients to be rebooted in order
for the changes to be made effective.
* * * A T T E N T I O N * * *
System boot image has been updated. You must reboot the system
after install_all_updates completes to properly integrate the updates.
install_all_updates: Checking for recommended maintenance level 7200-05.
install_all_updates: Executing /usr/bin/oslevel -rf, Result = 7200-05
install_all_updates: Verification completed.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
install_all_updates: Result = SUCCESS
$ echo $?
0
インストール成功で終了しました。
$ ioslevel
3.1.2.10
$
無事 3.1.2.10 にアップデートしています。
4. デバイス整理、SEA作成
・既存環境の構成を戻すために、デバイスの認識順番を変更する必要があったため、oem_setup_env 環境で rendev コマンド、rmdev コマンド、cfgmgr コマンドを使用して、デバイスを揃えています。(多分サポート外操作)
・SEA (Shared Ethernet Adapter) の作成
$ mkvdev -sea ent0 -vadapter ent4,ent5,ent8 -default ent4 -defaultid 4001 -attr ha_mode=auto
ent6 Available
en6
et6
$ echo $?
0
・(既存構成に合わせるため)VLAN アダプター作成
$ mkvdev -vlan ent6 -tagid 11
ent7 Available
en7
et7
$ echo $?
0
・VLANアダプターに IPアドレス付与
$ mktcpip -hostname VIOS2 -inetaddr XX.XX.XX.XX -netmask 255.X.X.X -interface en7 -start
5. 構成情報リストア
保管先AIX サーバーより、VIOS2の/home/padmin に実施前に取得した構成情報ファイル "VIOS2.viosbr.tar.gz" を転送
# scp -p VIOS2.viosbr.tar.gz padmin@<VIOS2のIPアドレス>:/home/padmin/
padmin@<VIOS2のIPアドレス>'s password:
VIOS2.viosbr.tar.gz
- viosbr 実行(1回目)
$ viosbr -restore -file VIOS2.viosbr.tar.gz
bosboot: Boot image is 61468 512 byte blocks.
RULES: The restored device settings do not match the recommended factory default settings
Restoration of other components configurations are complete in PRE phase.
************ATTENTION!!!**********
Please REBOOT the VIOS system before restoring further devices
**********************************
Restore summary on VIOS2:
Backedup Devices that are unable to restore/change
==================================================
DEPLOYED or CHANGED devices:
============================
Dev name during BACKUP Dev name after RESTORE
---------------------- ----------------------
'ArtexRules' are restored successfully
hdisk0 hdisk0
hdisk1 hdisk1
〜 長いので省略 〜
hdisk17 hdisk17
hdisk18 hdisk18
$
リブートが必要とのこと。リブートを行った上で再度実施
- viosbr 実行(2回目)
$ viosbr -restore -file VIOS2.viosbr.tar.gz
RULES: The restored device settings do not match the recommended factory default settings
Restore summary on VIOS2:
Backedup Devices that are unable to restore/change
==================================================
VMLibrary
DEPLOYED or CHANGED devices:
============================
Dev name during BACKUP Dev name after RESTORE
---------------------- ----------------------
'ArtexRules' are restored successfully
vhost11:All PV backing devices from backup, are restored.
〜 長いので省略 〜
vhost18:All PV backing devices from backup, are restored.
vfchost16 vfchost43
vfchost38 vfchost9
〜 長いので省略 〜
vfchost37 vfchost8
$
多分、戻ったはず...
事後の情報を取得(事前取得コマンドと同じ)
$ hostname
$ ioslevel
$ lsdev | grep hdisk
$ lspv
$ lsmap -all
$ lsmap -all -npiv
$ lsdev -slots
$ lsdev -vpd
$ lsdev -virtual
$ lsdev | grep ent
$ lsdev -dev entX -attr #<= X は SEA アダプターの番号を指定
$ lsvg
$ lsvg -lv rootvg
$ lsvopt
$ ls -l /var/vio/VMLibrary
$ errlog
$ oem_setup_env
# lslpp -l *sddpcm*
# manage_disk_drivers -l
# lsattr -El hdiskX | grep reserve #<= X はhdisk 番号。すべてのディスクのreserve_policy を確認
# lsattr -El hdiskX #<= X はhdisk 番号。reserve_policy 以外も念のため確認
# exit
$
-> Local PC に取得していた事前情報と、取得した事後情報を比較確認しました...。(ちょっと大変)
6. 構成修復 (仮想メディア・リポジトリ)
仮想光学デバイスの確認
$ lsvopt
VTD Media Size(mb)
lpar1_vfd0 No Media n/a
lpar2_vfd0 No Media n/a
lpar3_cd0 No Media n/a
-> 構成情報リストアで戻っていました。
仮想メディア・リポジトリを作成します。
$ lsrep
The DVD repository has not been created yet.
$ mkrep -sp rootvg -size 20G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
$ echo $?
0
別サーバーに保管していたファイルを戻します。
$ mount <保管先サーバーのIPアドレス>:<保管先ディレクトリ> /mnt
$ oem_setup_env
# cp -p /mnt/* /var/vio/VMLibrary/
# exit
$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
25501 3133 rootvg 51136 4416
Name File Size Optical Access
RHEL-7.3BE.iso 3292 None rw
RHEL-8.3.0-20201009.2-ppc64le-dvd1.iso 7742 None rw
aix_7.2_expansion_pack_42017.iso 1640 None rw
~ 省略 ~
戻りました。
7. 構成変更(デバイス・ドライバー)
SDDPCM のサポートは終了しているので、AIXPCMに変更します。
AIXPCMのデフォルト値変更
# chdef -a queue_depth=32 -c disk -s fcp -t mpioosdisk
queue_depth changed
# chdef -a reserve_policy=no_reserve -c disk -s fcp -t mpioosdisk
reserve_policy changed
# chdef -a algorithm=shortest_queue -c disk -s fcp -t mpioosdisk
algorithm changed
デバイスドライバをAIXPCMに変更。
この環境で使用しているドライバーは、IBMSVCです。
$ oem_setup_env
# manage_disk_drivers -d IBMSVC -o AIX_AAPCM
********************** ATTENTION *************************
For the change to take effect the system must be rebooted
# exit
$
リブートが必要とのこと、リブートして確認します。
$ shutdown -force -restart
リブート後の確認
$ oem_setup_env
# manage_disk_drivers -l
Device Present Driver Driver Options
2810XIV AIX_AAPCM AIX_AAPCM,AIX_non_MPIO
DS4100 AIX_APPCM AIX_APPCM
DS4200 AIX_APPCM AIX_APPCM
DS4300 AIX_APPCM AIX_APPCM
DS4500 AIX_APPCM AIX_APPCM
DS4700 AIX_APPCM AIX_APPCM
DS4800 AIX_APPCM AIX_APPCM
DS3950 AIX_APPCM AIX_APPCM
DS5020 AIX_APPCM AIX_APPCM
DCS3700 AIX_APPCM AIX_APPCM
DCS3860 AIX_APPCM AIX_APPCM
DS5100/DS5300 AIX_APPCM AIX_APPCM
DS3500 AIX_APPCM AIX_APPCM
XIVCTRL MPIO_XIVCTRL MPIO_XIVCTRL,nonMPIO_XIVCTRL
2107DS8K NO_OVERRIDE NO_OVERRIDE,AIX_AAPCM,AIX_non_MPIO
IBMFlash NO_OVERRIDE NO_OVERRIDE,AIX_AAPCM,AIX_non_MPIO
IBMSVC AIX_AAPCM NO_OVERRIDE,AIX_AAPCM,AIX_non_MPIO
# exit
$
-> IBMSVC で AIX_AAPCM であることを確認できました。
あとは、アップグレードしたVIOS2のみの稼働で、VIOC が正常稼働するかを確認しました。
・省略している箇所はありますが、おおよその流れで記載しました。
(大変でした...。)
以上です。