Sunday, 21 October 2018

Managing boot environments in Solaris 11 By Devan

Managing boot environments in Solaris 11

Boot Environment (BE)

A BE is a bootable instance of an Oracle Solaris 11 operating system plus any other application software packages installed into that image. System administrators can maintain multiple BEs on their systems, and each BE can have different software versions installed.
With multiple BEs, the process of updating software becomes a low-risk operation because system administrators can create backup BEs before making any software updates to their system. If needed, they have the option of booting a backup BE.
You do not have to create a backup BE as a separate step if you are updating IPS packages. When you use the pkg install or pkg update command, use the –require-backup-be–backup-be-name–be-name, or –require-new-beoption to make the changes in a new boot environment, not in the current boot environment.
After the initial installation of Oracle Solaris 11 onto a system, a BE is created. Use the beadm utility or the pkg command to administer additional BEs on your system.
Note: The time to reboot Oracle Solaris 11 is significantly faster when compared to the reboot time taken by Oracle Solaris 10. The faster reboot helps in minimizing system downtime. Administrators can decide whether to configure fast reboot by default or not by setting a Boolean value for the config/fastreboot_default SMF property in the svc:/system/boot-config:default SMF service, allowing certain system and firmware checks to be bypassed both for SPARC and x86 systems.
BE management utilities include:
– The beadm command
– The Package Manager GUI

beadm Utility

The beadm utility is the primary BE management tool. The beadm utility aggregates all datasets in a BE and performs actions on the entire BE at once. You no longer need to perform ZFS commands to modify each dataset individually. It manages the dataset structures within BEs. For example, when the beadm utility clones a BE that has shared datasets, the utility automatically recognizes and manages those shared datasets for the new BE.
The beadm utility enables you to perform administrative tasks on your BEs. These tasks can be performed without upgrading your system. It automatically manages and updates the GRUB menu for x86 systems, or the boot menu for SPARC systems. For example, when you use the beadm utility to create a new BE, that environment is automatically added to the GRUB menu or boot menu.
The beadm utility enables you to perform the following tasks:
  • Create a new BE based on the active BE.
  • Create a new BE based on an inactive BE.
  • Create a new BE based on an existing snapshot.
  • Create a new BE and add a custom title to the x86 GRUB menu or the SPARC boot menu.
  • Activate an existing, inactive BE.
  • Mount a BE.
  • Unmount a BE.
  • Destroy a BE.
  • Destroy a snapshot of a BE.
  • Rename an existing, inactive BE.
  • Display information about your BE snapshots and datasets.

beadm Command Examples: list

Example below shows listing boot environments and associated snapshots. N means that the BE is currently active, and R means that it will be the BE that will be active on reboot as well.
# beadm list
BE          Active     Mountpoint     Space      Policy     Created
--          ------     ----------     -----      ------     -------
solaris     NR         /              3.47G      static     2014-07-07 01:05 
solaris-1   -          -              94.03M     static     2014-07-09 03:52
# beadm list -a solaris 
BE/Dataset/Snapshot                         Active    Mountpoint     Space     Policy     Created
-------------------                         ------    ----------     -----     ------     -------
solaris
      rpool/ROOT/solaris                    NR         /             2.88G     static     2014-07-07 01:05
      rpool/ROOT/solaris/var                -          /var          323.72M   static     2014-07-07 01:05
      rpool/ROOT/solaris/var@2014..         -          -             748.5K    static     2014-07-09 03:52
...
...

beadm Command Examples: create

The examples below shows how to create a new BE and a clone.
– The first command creates a new BE.
– The second command creates a snapshot of the new BE.
– The third command creates a BE clone from a snapshot.
# beadm create solaris-2
# beadm create solaris-2@backup
# beadm create -e solaris-2@backup solaris-3

beadm Command Examples: activate, rename, and destroy

Shown beloe are examples of activating, renaming, and destroying BEs.
# beadm activate solaris-3
# beadm rename solaris-2 solaris-old
# beadm destroy solaris

beadm Command Examples: mount and unmount

Shown below are examples of mounting and unmounting inactive BEs.
# beadm mount solaris-1 /solaris-1
# beadm unmount solaris-1

No comments:

Post a Comment