由于您使用 CLI 登录到设备,所以,如上所述的上载实际上是下载。通过 CLI 使用以下过程更新单控制器上的软件。
dory:maintenance system updates> download dory:maintenance system updates download (uncommitted)> get url = (unset) user = (unset) password = (unset)
dory:maintenance system updates download (uncommitted)> set url= ftp://foo/update.pkg.gz url = ftp://foo/update.pkg.gz dory:maintenance system updates download (uncommitted)> set user=bmc user = bmc dory:maintenance system updates download (uncommitted)> set password Enter password: password = ******** dory:maintenance system updates download (uncommitted)> commit Transferred 157M of 484M (32.3%) ...
dory:maintenance system updates download (uncommitted)> commit Transferred 484M of 484M (100%) ... done Unpacking ... done dory:maintenance system updates> list UPDATE DATE STATUS ak-nas@2009.10.14,1-0-nd 2009-10-14 08:45 AKUP_WAITING ...
在这种情况下,您可以设置任何特定于更新的属性,包括应用延迟更新。有关可用于特定更新的属性集的更多信息,请运行help properties命令。用户可控的属性将以 update_ 前缀开头:
clownfish:maintenance system updates ak-nas@2009.04.03,1-0> help properties Properties that are valid in this context: version => Update media version date => Update release date status => Update media status update_zfs_upgrade => Apply incompatible storage pool update clownfish:maintenance system updates ak-nas@2009.04.03,1-0> get version = 2009.04.03,1-0 date = 2009-4-3 08:45:01 status = AKUP_WAITING update_zfs_upgrade = deferred clownfish:maintenance system updates ak-nas@2009.04.03,1-0> set update_zfs_upgrade=onreboot update_zfs_upgrade = onreboot clownfish:maintenance system updates ak-nas@2009.04.03,1-0>
设置任意属性后,执行 upgrade 命令。系统将提示您进行确认(假设为肯定)并开始更新:
dory:maintenance system updates> select ak-nas@2009.10.14,1-0-nd dory:maintenance system updates ak-nas@2009.10.14,1-0-nd> upgrade The selected software update requires a system reboot in order to take effect. The system will automatically reboot at the end of the update process. The update will take several minutes. At any time during this process, you can cancel the update with [Control-C]. Are you sure? (Y/N) y Updating from ... ak/nas@2009.10.11,1-0 Backing up smf(5) ... done. Loading media metadata ... done. Selecting alternate product ... SUNW,iwashi Installing Sun Storage 7120 2009.10.14,1-0 pkg://sun.com/ak/SUNW,iwashi@2009.10.14,1-0:20091014T084500Z Creating system/boot/ak-nas-2009.10.14_1-0 ... done. Creating system/root/ak-nas-2009.10.14_1-0 ... done. ...
更新进行过程中,将显示最新的消息。通过按 ^C 可以随时取消升级,取消时系统将提示您进行确认:
Updating from ... ak/nas@2009.10.11,1-0 Backing up smf(5) ... done. Loading media metadata ... ^C This will cancel the current update. Are you sure? (Y/N) y error: interrupted by user dory:maintenance system updates ak-nas@2009.10.14,1-0-nd>