由于您是登录到设备来使用 CLI,所以,如上所述的上载实际上是下载。要通过 CLI 将介质下载到设备中,请在 maintenance system updates 中执行 download 命令:
dory:maintenance system updates> download dory:maintenance system updates download (uncommitted)> get url = (unset) user = (unset) password = (unset)
您必须将 "url" 属性设置为有效的下载 URL。此 URL 可以位于本地网络,也可以位于 Internet 上。URL 可以为 HTTP(以 "http://" 开头)或 FTP(以 "ftp://" 开头)。如果需要用户验证,可以将其包含在 URL 中(例如,"ftp://myusername:mypasswd@myserver/export/foo"),也可以将用户名和密码放在 URL 之外,并设置用户和密码属性。
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>
如果要回滚到较早的版本,请选择对应于该版本的更新并执行 rollback 命令。系统将要求您确认是否要执行回滚,然后系统将重新引导,并执行回滚。与失败安全回滚不同,系统重新引导时,不会要求您提供进一步的确认。有关失败安全回滚的信息,请参见失败安全回滚。
要删除更新介质,请使用 destroy 命令指定要删除的更新:
dory:maintenance system updates> destroy ak-nas@2009.10.14,1-0-nd This will destroy the update "ak-nas@2009.10.14,1-0-nd". Are you sure? (Y/N) y dory:maintenance system updates>
要查看是否存在任何可用的延迟更新,请运行 show 命令。如果有延迟更新可用,则您可以使用 apply 命令:
clownfish:maintenance system updates> show Updates: UPDATE DATE STATUS ak-nas@2011.04.24.3.0,1-2.19.11.2 2012-6-24 17:14:19 current ak-nas@2011.04.24.4.2,1-1.28 2012-11-5 03:11:34 waiting ak-nas@2013.06.05.0.0,1-1.2 2013-6-19 12:58:18 unavailable
如果当前使用的软件不够新而无法升级到某个等待介质,则该等待介质列为不可用。在本例中,2011.1.4.2 和 2013.1 的介质都已下载,但是无法升级到 2013.1,因为首先需要至少升级到 2011.1.4.2。
Deferred updates: The following incompatible updates are available. Applying these updates will enable new software features as described below, but will prevent older versions of the software from accessing the underlying resources. You should apply deferred updates once you have verified that the current software update is functioning and a rollback is not required. Applying deferred updates in a cluster will also update any resources on the cluster peer. 1. Support for the "passthrough-x" aclinherit property for shares. clownfish:maintenance system updates> apply Applying deferred updates will prevent rolling back to previous versions of software. Are you sure? (Y/N) clownfish:maintenance system updates> apply