[ug-jposug] SPARCマシンのlive upgradeに関して
Sato Kazuyuki
kazus @ sunfish.suginami.tokyo.jp
2008年 7月 13日 (日) 23:43:43 PDT
さとうともうします。
2008/07/14 14:30 TAKI Yasushi <taki @ justplayer.com>:
> ※Solaris10の話しなので、ここじゃないのかも知れません。
> もし内容的にNGなら今後、自重しますのでその旨、教えてください。
Solaris 10 の help となるとやはり自重する必要があるのかなと思います。
でも、内容的には、OpenSolaris 2008.05 にはありませんが、Solaris Express Community
Release には適用できるので、うまく隠蔽すれば(以下省略
> Netra T1のディスクが半壊状態(ディスクI/Oエラーが時々dmesgにでる)なので、
> この際だから、LiveUpgradeで別ディスクにOSをアップデートしながらコピーし、
> 逃げようと思っています。
まず、LiveUpgrade を実行するまえに、元となる BE のパッチ情報を確認する必要があります。
そして、Upgrade に利用する OS メディアを遣って LiveUpgrade 関係の package を更新する
必要がありますが、この作業は、おこなっているか確認してください。
#BE = Boot Environment
詳しくは、このマニュアルを。
第 7 章 Solaris Live Upgrade (計画)
http://docs.sun.com/app/docs/doc/819-0332/luplanning-1?l=ja&a=view
最終的には、SunSolve に掲載されている Infodoc 72099
Solaris[TM] Live Upgrade Software: Minimum Patch Requirements というドキュメントを参照
し、LiveUpgrade を行うために必要な条件を整えます。
ここまでの条件をクリアしているとして・・・
まず、元の BE が半壊しており dmesg で I/O error が確認できているのなら、LiveUpgrade で
新しい BE を作り出せるならラッキー程度で望む必要があるかと思います。
> やったこと。
>
> lofiadmを使って、u5を/mntにmountする。
> mount -F hsfs `lofiadm -a /home/kohju/sol-10-u5-ga-sparc-dvd.iso` /mnt
>
> 果てしなく時間がかかるので、下記の実行をして就寝。
> # lucreate -c 'Solaris10' -m '/:/dev/dsk/c0t0d0s0:ufs' -n 'Solaris10u5' && luupgrade -u -n
> Solaris10u5 -s /mnt
>
> Discovering physical storage devices
> Discovering logical storage devices
> Cross referencing storage devices with boot environment configurations
> Determining types of file systems supported
> Validating file system requests
> Preparing logical storage devices
> Preparing physical storage devices
> Configuring physical storage devices
> Configuring logical storage devices
> Analyzing system configuration.
> Comparing source boot environment <Solaris10> file systems with the file
> system(s) you specified for the new boot environment. Determining which
> file systems should be in the new boot environment.
> Updating boot environment description database on all BEs.
> Searching /dev for possible boot environment filesystem devices
>
> Updating system configuration files.
> The device </dev/dsk/c0t0d0s0> is not a root device for any boot environment; cannot get BE ID.
> Creating configuration for boot environment <Solaris10u5>.
> Source boot environment is <Solaris10>.
> Creating boot environment <Solaris10u5>.
> Creating file systems on boot environment <Solaris10u5>.
> Creating <ufs> file system for </> in zone <global> on </dev/dsk/c0t0d0s0>.
> Mounting file systems for boot environment <Solaris10u5>.
> Calculating required sizes of file systems for boot environment <Solaris10u5>.
> Populating file systems on boot environment <Solaris10u5>.
> Checking selection integrity.
> Integrity check OK.
> Populating contents of mount point </>.
> Copying.
> Creating shared file system mount points.
> Creating compare databases for boot environment <Solaris10u5>.
> Creating compare database for file system </>.
> Updating compare databases on boot environment <Solaris10u5>.
> Making boot environment <Solaris10u5> bootable.
> Population of boot environment <Solaris10u5> successful.
> Creation of boot environment <Solaris10u5> successful.
ここまでが、lucreate で BE の copy である Solaris10u5 ができあがってますね。
ここから、luupgrade が始まり・・・
> 218128 blocks
> miniroot filesystem is <lofs>
> Mounting miniroot at </mnt/Solaris_10/Tools/Boot>
> Validating the contents of the media </mnt>.
> The media is a standard Solaris media.
> The media contains an operating system upgrade image.
> The media contains <Solaris> version <10>.
> Constructing upgrade profile to use.
> Locating the operating system upgrade program.
> Checking for existence of previously scheduled Live Upgrade requests.
> Creating upgrade profile for BE <Solaris10u5>.
> Determining packages to install or upgrade for BE <Solaris10u5>.
> Performing the operating system upgrade of the BE <Solaris10u5>.
> CAUTION: Interrupting this process may leave the boot environment unstable
> or unbootable.
> Upgrading Solaris: 100% completed
> Installation of the packages from this media is complete.
> Updating package information on boot environment <Solaris10u5>.
> Package information successfully updated on boot environment <Solaris10u5>.
> Adding operating system patches to the BE <Solaris10u5>.
> The operating system patch installation is complete.
ここで、upgrade に必要なファイルの置き換えとかの作業が完了した報告なのですが・・・
これは、スクリプト完了の報告であって、正常に完了した報告ではないことに注意です。
#lu* 系のコマンドは、shell script です
INFORMATION: The file </var/sadm/system/logs/upgrade_log> on boot
> environment <Solaris10u5> contains a log of the upgrade operation.
> INFORMATION: The file </var/sadm/system/data/upgrade_cleanup> on boot
> environment <Solaris10u5> contains a log of cleanup operations required.
この WARNING で、1125 個の package の処理に失敗しています。
詳細は、Solaris10u5 側の /var/sadm/system/data/upgrade_failed_pkgadds に記載されている
ので、元の BE から起動して、mount 後、確認してみる必要があります。
#1125 個とあるので、すべてのpackage が失敗しているかと
> WARNING: <1125> packages failed to install properly on boot environment <Solaris10u5>.
> INFORMATION: The file </var/sadm/system/data/upgrade_failed_pkgadds> on
> boot environment <Solaris10u5> contains a list of packages that failed to
> upgrade or install properly.
Solaris 10 5/08 から、package を圧縮が 7zip に変更されたので、実は、旧 BE に 7z 系のコマンド
を含むパッチが適用されておらず、新しい package を取り扱えないため、すべての package を
扱えていなかったというオチも考えられます。
というわけで、luupgrade に進む前に、
1. lucreate で BE の複製
2. upgrade 前に新しい BE の起動確認
をしてから、
3. 旧 BE で再起動
4. luupgrade を実行
5. luactivate で新しい BE の起動を確認
の作業をすることをオススメします。
boot device が変更されていなかったのは、luupgrade がまともに完了していなかったため
luactivate が変更させなかったんだとと思います。
手動で boot-device を変更した場合ですが、新しい disk からboot させると下記のような
メッセージが出力される原因は・・・
>Executing last command: boot
>Boot device: /pci @ 1f,0/pci @ 1,1/scsi @ 2/disk @ 0,0:a File and args:
>Boot load failed.
>:217: The file just loaded does not appear to be executable.
>Boot device: /pci @ 1f,0/pci @ 1,1/scsi @ 2/disk @ 0,0:a File and args:
>Boot load failed.
>:217: The file just loaded does not appear to be executable.
もしかすればですが、各パッケージを upgrade する際、kernel などの file を消してから
新しい package を展開する処理があり、
ファイル消す->package archive を展開できない-> はい、次のパッケージ
となってしまっており起動に必要なファイルがないのではないかなと思ったり。。。
勝手な推測ですが。。。
--
Kazuyuki Sato
ug-jposug メーリングリストの案内