Académique Documents
Professionnel Documents
Culture Documents
Downloads
Articles
Store
Support
Training
Partners
About
Application Development Framework Application Express Business Intelligence Cloud Computing Communications Database Performance & Availability Data Warehousing .NET Dynamic Scripting Languages Embedded Enterprise 2.0 Enterprise Architecture Enterprise Management Grid Computing Identity & Security Java Linux Service-Oriented Architecture SQL & PL/SQL Server and Storage Administration Server and Storage Development Systems Hardware and Architecture Virtualization Part I
Introduction Introducing Time Slider On a Desktop, How Do I Enable Time Slider Services? How Do I Enable Time Slider Services Using the Command Line? On a Desktop, How Do I Use Time Slider? On a Desktop, How Do I Restore a File Using Time Slider? How Do I Automatically Snapshot a Boot Environment? How Do I List Available Snapshots? How Long Are Automatic Snapshots Retained? How Do I Delete Unwanted Automatic Snapshots? How Do I Revert to a BE Preserved in an Automatic Snapshot? How Do I Track Package Installs and Updates? How Might I Use Update Histories to Troubleshoot? Final Thoughts
Introduction
This is the second article in a series highlighting best practices in Oracle Solaris 11 Express. The first article, Updating Software, introduced the Image Packaging System (IPS) software packaging model and discussed the best practice for performing updates: creating a new Boot Environment (BE) before applying an update. In some cases, such as with updates and full upgrades, IPS creates a new BE automatically. BEs are a built-in safety net when you make software changes, much like Live Upgrade environments in Oracle Solaris 10. In Oracle Solaris 11 Express, the root file system is implemented using Oracle Solaris ZFS, so BEs are basically Oracle Solaris ZFS snapshots that are readable/writableand activated for booting. Because of this underlying technology, you can periodically generate snapshots of BEs just like you can take a snapshot of any Oracle Solaris ZFS volume. This article describes how Oracle Solaris 11 Express uses automated snapshots to deliver Time Slider services, a new feature in the GNOME desktop. Using Time Slider, you can take periodic snapshots of the active BE, capturing the software state at regular intervals. This approach might prove useful if you forget to explicitly create a BE when you update software. Since the history of software updates can be especially helpful in troubleshooting, this article also highlights commands for researching package changes. Note that all examples presume an authorized user (see User Accounts, Roles, and Rights Profiles in Getting Started With Oracle Solaris 11 Express).
The easiest way to enable Time Slider services on a desktop is to use the GUI (enter time-slider-setup on the command line or use the System -Administration-Time Slider menu). The GUI (shown in Figure 1) allows you to select which file systems to snapshot, specify whether to back up snapshots to an external drive, and set the capacity policy for snapshot removal.
Since auto-snapshot and time-slider/plugin services depend on the time-slider service, be sure to enable the time-slider service last (or restart it). Again, these services require GNOME desktop packages, and they go into maintenance mode if they are enabled when GNOME packages are not installed.
static 2011-03-10 11:10 static static static static static 2011-03-09 2011-03-08 2011-03-10 2011-03-10 2011-03-10 16:39 16:17 11:40 11:55 11:10
For automatic snapshots, snapshot names use the Oracle Solaris ZFS data set name followed by @zfs-auto-snap <type> (where type is frequent, hourly, and so on), along with a date and time stamp.
OPERATION purge-history uninstall uninstall set-property update-publisher set-property refresh-publishers install rebuild-image-catalogs uninstall refresh-publishers rebuild-image-catalogs install
CLIENT pkg pkg pkg pkg pkg pkg pkg pkg pkg pkg updatemanager updatemanager pkg
OUTCOME Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded Succeeded
Perhaps even more useful is the output provided with the -l option, which reports what changes were made, whether the changes succeeded, which user made the changes, when the changes were made, which command was used, and details about the starting and ending states. For example, the following excerpt shows that user jdoe ran the pkg install gcc -3 command, which successfully installed four packages for the GNU compiler: Operation: install Outcome: Succeeded Client: pkg Version: 052adf36c3f4 User: jdoe (101) Start Time: 2011-03-16T09:22:07 End Time: 2011-03-16T09:23:41 Command: /usr/bin/pkg install gcc-3 Start State: Solver: [ Variables: 887 Clauses: 6874 Iterations: 1 State: Succeeded] Timings: [phase 1: 0.577, phase 2: 0.116, phase 3: 0.256, phase 4: 0.000, phase 5: 0.000, phase 6: 0.000, phase 7: 0.019, phase 8: 1.258, phase 9: 0.000, phase 10: 0.781, phase 11: 0.028, phase 12: 0.141] Maintained incorporations: pkg://solaris/consolidation/gfx/gfx-incorporation@0.5.11,5.11-0.151.0.1:20101105T053408Z . .
. pkg://solaris/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.151.0.1:20101104T230646Z Package version changes: End State: None -> pkg://solaris/developer/gnu-binutils@2.19,5.11-0.151.0.1: 20101105T053803Z None -> pkg://solaris/developer/library/lint@0.5.11,5.11-0.151.0.1: 20101104T231349Z None -> pkg://solaris/developer/gcc-3@3.4.3,5.11-0.151.0.1:20101105T053751Z None -> pkg://solaris/system/header@0.5.11,5.11-0.151.0.1:20101105T002136Z XML records for pkg operations are stored in /var/pkg/history, which the pkg history command uses to compose its output. The command pkg purge-history wipes out these records, so use it with caution, because this history can be valuable when troubleshooting.
If further investigation confirms this install is the root cause, one possible corrective action is to revert to a previous BE until you can resolve the issue. Using the installs time stamp, you can look for a BE snapshot that predates the installation, and revert back to the earlier snapshot: # beadm create -e SLIM@zfs-auto-snap_frequent-2011-03-15-06h59 BEpre317 # beadm activate BEpre317 # reboot
Final Thoughts
In summary, Oracle Solaris 11 Express supplies new ways to help administrators cope with human errors, including their own. On desktops, enable Time Slider services and automatic snapshots of user directories (or the full /export/home file system). On servers, always create a new BE before performing an update, and optionally set up periodic snapshots for the current BE. Oracle Solaris 11 Express provides built-in safety nets, so best practice, of course, is to use them.
Revision 1.0, 05/06/2011