1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[VIOS] alt_root_vg コマンドによるバックアップとアップデートの同時実行手順

Last updated at Posted at 2025-11-22

はじめに

IBM Power の VIOS(Virtual I/O Server) で、alt_root_vg コマンドを使用したバックアップ + OSバージョン・アップデートを同時に実施する方法を確認しました。

  • 参考 Technote

How to clone a PowerVM VIOS rootvg?

Scenario 4 - Cloning VIOS rootvg to an alternate disk and update VIOS simultaneously

With IBM Power virtualization, the VIOS plays an important role and all running VIOS client LPARs are fully dependent on the Virtual I/O Servers. In such an environment, updating VIOS to a next fix pack level can be challenging, without taking the system down for an extended period of time and incurring an outage. This can be mitigated by creating a copy of the current root volume group (rootvg) on an alternate disk and simultaneously applying fix pack updates first on the cloned rootvg on a new disk.

You can use the alt_root_vg command to clone a VIOS rootvg to an alternate disk and update the VIOS to the next Fix Pack, Service Pack, or Mini Pack level. This option is typically used when updating the VIOS in order to minimize an outage in the event something goes wrong with the VIOS update.

The disk clone can be done either simultaneously or in a 2-step process.

To clone and update the VIOS simultaneously:
$ alt_root_vg -target -bundle update_all -location /mnt
For more details, refer to the IBM PowerVM Best Practices Redbook, section 2.3.3 Applying fix packs, service packs, and interim fixes.

To clone and update the VIOS using 2-Step Process:

  1. First, clone VIOS rootvg to an alternate disk:
    $ alt_root_vg -target
  2. Then update the VIOS using updateios command. For more details, refer to VIOS update procedure described on the VIOS readme file for the ioslevel you plan to update to available in Fix Central.

This topic is covered in further detail in the following document:
The alt_root_vg bundle option does not install new base filesets


環境

$ ioslevel
3.1.4.10
$

VIOS 3.1.4.10 から 3.1.4.60 へアップデートを行います。

(参考) VIOS 3.1.4.60 release note
https://www.ibm.com/support/pages/node/7240045


fixcentral からモジュール・ダウンロード

fixcentral から2025/7/23にリリースされた Fix pack VIOS_FP_3.1.4.60 をダウンロードします。

fixcentral.png


VIOS 3.1.4.60 アップデート・モジュールのマウント

VIOS 3.1.4.60 の iso ファイルを 対象VIOSのローカル・ディスク配置し、/mnt に iso ファイルを loopマウントします。

$ ls -l /home/padmin/H34270384.iso
-rw-r--r--    1 root     staff    2944456704 Nov 22 11:20 /home/padmin/H34270384.iso
$

oem_setup_env 環境で実施します。

$ oem_setup_env
# loopmount -i /home/padmin/H34270384.iso -o "-V cdrfs -o ro" -m /mnt
#
  • mount を確認します。/mnt に /dev/loop0 がマウントされています。
# mount | grep mnt
         /dev/loop0       /mnt             cdrfs  Nov 22 13:37 ro
#
  • /mnt 下には update モジュールが存在しています。
# ls -l /mnt
total 5750492
-r--r--r--    1 root     system      5642240 Aug 20 2021  U874979.bff
-r--r--r--    1 root     system      1666048 Aug 20 2021  U874984.bff
-r--r--r--    1 root     system      1476608 Aug 20 2021  U875003.bff

~ 省略~ 

-r--r--r--    1 root     system     44700672 Jul 09 12:04 U902300.bff
-r--r--r--    1 root     system          512 Jul 22 17:53 VIOS_FP_3.1.4.60.bff
-r--r--r--    1 root     system        53412 Jul 22 17:53 VIOS_FP_3.1.4.60.dd.xml
-r--r--r--    1 root     system       194299 Jul 22 17:53 VIOS_FP_3.1.4.60.pd.sdd
-r--r--r--    1 root     system         3584 Jul 22 17:53 ck_sum.bff

oem_setup_env 環境のため権限が気になりましたが、read 権限でupdateは実行できています。


対象ディスク確認

hdisk0 が rootvg として稼働しています。
未使用の hdisk21 を alt_root_vg のターゲット・ディスクとします。PVIDは割り当たっておらず、データの書き込みもない状態です。

# lspv | grep -E "hdisk0|hdisk21"
hdisk0          00c5ca21923baab6                    rootvg          active
hdisk21         none                                None
#
  • 対象のディスクを確認
$ lsmpio -ql hdisk0
Device:  hdisk0
          Vendor Id:  IBM
         Product Id:  2145
           Revision:  0000
           Capacity:  50.00GiB
       Machine Type:  2072
       Model Number:  2N4
         Host Group:  VIOS2
        Volume Name:  VIOS2_rootvg
      Volume Serial:  60050763808106D7D800000000000001  (Page 83 NAA)
$ lsmpio -ql hdisk21
Device:  hdisk21
          Vendor Id:  IBM
         Product Id:  2145
           Revision:  0000
           Capacity:  50.00GiB
       Machine Type:  2072
       Model Number:  2N4
         Host Group:  VIOS2
        Volume Name:  VIOS2_rootvg_altdisktest
      Volume Serial:  60050763808106D7D8000000000005A0  (Page 83 NAA)
$
  • rootvg は 約4.6GB 空きがあります。
$ lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c5ca2100004b0000000197ef0477cd
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      799 (51136 megabytes)
MAX LVs:            256                      FREE PPs:       73 (4672 megabytes)
LVs:                13                       USED PPs:       726 (46464 megabytes)
OPEN LVs:           12                       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:     1016                     MAX PVs:        32
LTG size (Dynamic): 512 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no
DISK BLOCK SIZE:    512                      CRITICAL VG:    no
FS SYNC OPTION:     no                       CRITICAL PVs:   no
ENCRYPTION:         no
  • 構成確認一例: SEA(Shared Ethernet Adapter確認)
$ lsdev | grep ent
ent0             Available   PCIe2 2-Port 10GbE Base-T Adapter (e4148e1614109204)
ent1             Available   PCIe2 2-Port 10GbE Base-T Adapter (e4148e1614109204)
ent2             Available   Virtual I/O Ethernet Adapter (l-lan)
ent3             Available   Virtual I/O Ethernet Adapter (l-lan)
ent4             Available   Shared Ethernet Adapter
ent5             Available   Shared Ethernet Adapter
$

他にも一通り構成情報は事前に確認、情報取得しておくことをお勧めします。


alt_root_vg コマンドを使用したOSアップデートを伴う rootvg バックアップ の実行

alt_root_vg コマンドで bundle update_all オプションを指定して実行します。

・参考:VIOS alt_root_vg コマンド

bundle
rootvg クローンが作成された後でインストールされるパッケージまたはファイル・セットのリストを含む、オプション・ファイル bundle_name名 のパス名を指定します。 -bundle オプションを指定する場合は、-location フラグも指定する必要があります。 現在インストールされているすべてのソフトウェアをインストール・メディアで提供されている最新レベルに更新するには、bundle_name オプションの代わりに update_all オプションを指定します。 update_all オプションは現在インストールされているソフトウェアのみを更新し、新規ソフトウェアまたはバンドルはインストールしません。

alt_root_vg -target hdisk21 -bundle update_all -location /mnt コマンドで、hdisk21 への rootvg バックアップと 3.1.4.60 へのアップデートを同時に実行します。

$ time alt_root_vg -target hdisk21 -bundle update_all -location /mnt
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5.
Creating logical volume alt_hd6.
Creating logical volume alt_hd8.
Creating logical volume alt_hd4.
Creating logical volume alt_hd2.
Creating logical volume alt_hd9var.
Creating logical volume alt_hd3.
Creating logical volume alt_hd1.
Creating logical volume alt_hd10opt.
Creating logical volume alt_hd11admin.
Creating logical volume alt_lg_dumplv.
Creating logical volume alt_livedump.
Creating logical volume alt_VMLibrary.
Creating /alt_inst/ file system.
Creating /alt_inst/admin file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/var file system.
Creating /alt_inst/var/adm/ras/livedump file system.
Creating /alt_inst/var/vio/VMLibrary file system.
Generating a list of files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the alternate file system...
Installing optional filesets or updates into altinst_rootvg...
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.
+-----------------------------------------------------------------------------+
                    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.209                   # 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

+-----------------------------------------------------------------------------+
                         Installing Software...
+-----------------------------------------------------------------------------+

installp:  APPLYING software for:
        bos.rte.install 7.2.5.209


. . . . . << Copyright notice for bos >> . . . . . . .
 Licensed Materials - Property of IBM

 5765CD200
   Copyright International Business Machines Corp. 1985, 2025.
   Copyright AT&T 1984, 1985, 1986, 1987, 1988, 1989.
   Copyright Regents of the University of California 1980, 1982, 1983, 1985, 1986, 1987, 1988, 1989.
   Copyright BULL 1993, 2025.
   Copyright Digi International Inc. 1988-1993.
   Copyright Interactive Systems Corporation 1985, 1991.
   Copyright ISQUARE, Inc. 1990.
   Copyright Innovative Security Systems, Inc. 2001-2006.
   Copyright Mentat Inc. 1990, 1991.
   Copyright Open Software Foundation, Inc. 1989, 1994.
   Copyright Sun Microsystems, Inc. 1984, 1985, 1986, 1987, 1988, 1991.

 All rights reserved.
 US Government Users Restricted Rights - Use, duplication or disclosure
 restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for bos >>. . . .

Finished processing all filesets.  (Total time:  9 secs).

+-----------------------------------------------------------------------------+
                                Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
bos.rte.install             7.2.5.209       USR         APPLY       SUCCESS
bos.rte.install             7.2.5.209       ROOT        APPLY       SUCCESS

*** ATTENTION: install utilities updated, reinvoking install_all_updates ***

install_all_updates: Initializing system parameters.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
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. ***

   bos.xerces.lib 3.2.2.1
   invscout.rte 2.2.0.28
   ksys.hsmon.rte 1.8.0.0




~ 省略 (アップデート・モジュール・インストールが続きます) ~ 




Filesets processed:  104 of 291  (Total time:  5 mins 46 secs).

installp:  APPLYING software for:
        devices.pciex.df1028e214104204.rte 7.2.5.201


. . . . . << Copyright notice for devices.pciex.df1028e214104204 >> . . . . . . .
 Licensed Materials - Property of IBM

 5765CD200
   Copyright International Business Machines Corp. 2013, 2023.

 All rights reserved.
 US Government Users Restricted Rights - Use, duplication or disclosure
 restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for devices.pciex.df1028e214104204 >>. . . .




~ 省略 (アップデート・モジュール・インストールが続きます) ~ 


Finished processing all filesets.  (Total time:  13 mins 7 secs).

Please wait...

        /opt/rsct/install/bin/ctposti
0513-071 The ctrmc Subsystem has been added.
done
+-----------------------------------------------------------------------------+
                                Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
xlsmp.rte                   5.1.0.2         USR         APPLY       SUCCESS
xlsmp.msg.zh_CN.rte         5.1.0.2         USR         APPLY       SUCCESS

~ 省略 ~ 

Java8_64.jre                8.0.0.845       ROOT        APPLY       SUCCESS

installp:  * * * A T T E N T I O N ! ! !
        Software changes processed during this session require
        any diskless/dataless clients to which this SPOT is
        currently allocated to be rebooted.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
install_all_updates: Result = SUCCESS
Modifying ODM on cloned disk.
Building boot image on cloned disk.
forced unmount of /alt_inst/var/vio/VMLibrary
forced unmount of /alt_inst/var/vio/VMLibrary
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/home
forced unmount of /alt_inst/admin
forced unmount of /alt_inst/admin
forced unmount of /alt_inst
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...
Bootlist is set to the boot disk: hdisk21 blv=hd5

real    16m2.65s
user    2m5.55s
sys     1m19.12s
$

アップデート実行の時間の割合が大きく、16分かかりました。


実行後確認

alt_root_vg コマンドは完了しましたが、現時点では元のディスクで稼働しています。

$ lspv | grep hdisk
hdisk0           00c5ca21923baab6                     rootvg           active

~ 省略 ~ 

hdisk21          00c5ca21a9e18769                     altinst_rootvg
$ 

VIOS バージョンの変更はありません。

$ ioslevel
3.1.4.10

bootlist は alt_root_vg のターゲットディスクに切り替わっています。

$ bootlist -mode normal -ls
hdisk21 blv=hd5 pathid=0
hdisk21 blv=hd5 pathid=1
hdisk21 blv=hd5 pathid=2
hdisk21 blv=hd5 pathid=3
$

再起動を実行します。

$ shutdown -restart
Shutting down the VIO Server could affect Client Partitions. Continue [y|n]?

y

SHUTDOWN PROGRAM
Sat Nov 22 14:09:38 JST 2025
0513-044 The sshd Subsystem was requested to stop.

Wait for 'Rebooting...' before stopping.
Error reporting has stopped.

~ 省略 ~


再起動後確認

VIOS のバージョンは 3.1.4.60 にアップデートされています。

$ ioslevel
3.1.4.60

rootvg は hdisk21 でアクティブになっています。
hdisk0 は old_rootvg に切り替わりました。

$ lspv | grep hdisk0
hdisk0           00c5ca21923baab6                     old_rootvg
$ lspv | grep hdisk21
hdisk21          00c5ca21a9e18769                     rootvg           active

ブートリストは hdisk21 です。

$ bootlist -mode normal -ls
hdisk21 blv=hd5 pathid=0
hdisk21 blv=hd5 pathid=1
hdisk21 blv=hd5 pathid=2
hdisk21 blv=hd5 pathid=3
$

SEA(Shared Ethernet Adapter) 構成も特に変更はないようです。

$ lsdev | grep ent
ent0             Available   PCIe2 2-Port 10GbE Base-T Adapter (e4148e1614109204)
ent1             Available   PCIe2 2-Port 10GbE Base-T Adapter (e4148e1614109204)
ent2             Available   Virtual I/O Ethernet Adapter (l-lan)
ent3             Available   Virtual I/O Ethernet Adapter (l-lan)
ent4             Available   Shared Ethernet Adapter
ent5             Available   Shared Ethernet Adapter
$

ディスクの切り戻し

元に戻したい場合では bootlist を hdisk0 に設定して再起動することで、VIOS 3.1.4.10 の環境に戻ることが可能です。

$ bootlist -mode normal hdisk0
$ echo $?
0
$
$ bootlist -mode normal -ls
hdisk0 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=1
hdisk0 blv=hd5 pathid=2
hdisk0 blv=hd5 pathid=3
$
  • 再起動
$ shutdown -restart
Shutting down the VIO Server could affect Client Partitions. Continue [y|n]?

y

SHUTDOWN PROGRAM
Sat Nov 22 14:19:42 JST 2025
0513-044 The sshd Subsystem was requested to stop.

Wait for 'Rebooting...' before stopping.
Error reporting has stopped.
  • 再起動後ログイン

OSバージョンはアップデート前の 3.1.4.10 に戻りました。

$ ioslevel
3.1.4.10
$

hdisk0 が rootvg、hdisk21 が altinst_rootvg に戻っています。

$ lspv | grep hdisk0
hdisk0           00c5ca21923baab6                     rootvg           active
$ lspv | grep hdisk21
hdisk21          00c5ca21a9e18769                     altinst_rootvg
$

おわりに

alt_root_vg コマンドを使用すると、ディスクの切り替えだけで、停止時間も短くアップデートを実行することが可能になります。

バックアップのみの手順は以下をご参考ください。

以上です。

1
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?