Boot the System Using Another Snapshot

Specify a different system snapshot with which to boot a system. Typically, this procedure is used for system rollbacks.

A user must be root to run snaputil.

Use the snaputil command to roll back the system to a previous snapshot if a system becomes unstable or broken. Rolling back or forward can require switching the active config set if settings differ between the snapshots.

Snapshot and config set synchronization is particularly critical when rolling back or forward between CLE releases because of significant config set differences. To revert a system to an earlier Rhine Redwood release, see Revert a System to an Earlier CLE 6.0 Release.

  1. List the snapshots available on the system.
    smw: # snaputil list
    Status    Name                                                  Created            
    --------  ----------------------------------------------------  -------------------
              @                                                     2016-08-10 01:35:35
              SMW-8.1DV00_CLE-6.1DV00.20160928                      2016-09-28 10:41:59
              SMW-8.1DV00_CLE-6.1DV00.20160928.save1.postinstall    2016-09-28 12:15:30
              SMW-8.1DV00_CLE-6.1DV00.20160928.save2.postboot       2016-09-28 13:29:30
              SMW-8.1DV00_CLE-6.1DV00.20161003.save0.preupdate      2016-10-03 08:10:00
    cur,def   SMW-8.1DV00_CLE-6.1DV00.20161003                      2016-10-03 08:13:50
              SMW-8.1DV00_CLE-6.1DV00.20161003.save1.postinstall    2016-10-03 10:09:52
              SMW-8.1DV00_CLE-6.1DV00.20161003.save2.postboot       2016-10-03 11:24:28
  2. Compare the previous snapshot to the current snapshot.
    smw# snaputil diff <current_snapshot>.preupdate <current_snapshot>
  3. If a file has been changed, check for differences in the contents of the text file.
    When a file is specified (filename), this command will list line-by-line differences for that file. See the snaputil man page for more information.
    smw# snaputil diff <current_snapshot>.preupdate <current_snapshot> filename 
  4. Roll back to the snapshot dated 20160928.
    smw # snaputil default SMW-8.1DV00_CLE-6.1DV00.20160928
    subvolume SMW-8.1DV00_CLE-6.1DV00.20160928 is now default.
  5. When a snapshot switch requires config set synchronization, use the cmap command to specify the config set to use when booting CLE nodes with a new default snapshot. The config_set_name should be the config set associated with the snapshot to be reverted to.
    smw# cmap update --config-set config_set_name
  6. Clone the global config set:
    smw# cfgset create --clone global global.$FROM_SNAPSHOT
  7. Save the current global config set and switch to the global config set associated with the target snapshot:
    smw# cfgset create --clone global.$TARGET_SNAPSHOT global
  8. Reboot the SMW. When the system is booted, it will use the new default snapshot.
    smw# reboot
  9. If boot or SDB node failover is used, ensure that the xtfailover_halt command is included and enabled in the shutdown automation file (auto.hostname.stop. Ensure that the second line is uncommented. The xtfailover_halt command must be enabled so that the xtbootsys shutdown process sends a STOP NMI to the failover nodes.
    # Enable the following line if boot or sdb failover is enabled:
    lappend actions { crms_exec \
    "/opt/cray/hss/default/bin/xtfailover_halt --partition $data(partition,given) --shutdown" }
  10. Run xtbootsys with auto.hostname.start.
    smw# su - crayadm
    crayadm@smw > xtbootsys -a auto.hostname.start