Monday, March 17, 2014

How to create and check LU (Live Upgrade) Boot Environment on solaris10

This is a simple article which is going to explain about to create and check the LU boot environment. This is great future which is available from solaris10 on-wards. The LU boot environment is mainly will help us to reduce down time of the server for upgrade OS as well as OS patching activity purpose.

Here I am explaining, step to create LU Boot Environment on solaris10. 

These are the basic package which is require for any of the LU activity. 
To check the pre-request package details :
bash-3.2# pkginfo | egrep -i "SUNWlucfg|SUNWlur|SUNWluu"
application SUNWlucfg                        Live Upgrade Configuration
application SUNWlur                          Live Upgrade (root)
application SUNWluu                          Live Upgrade (usr)
bash-3.2#
These are the LU commands:
bash-3.2# lu
lu  lucancel  lucreate  ludelete  lufslist  lumount  lurename  luumount  luxadm
luactivate  lucompare  lucurr  ludesc  lumake  lupc  lustatus  luupgrade
bash-3.2#
Check LU status:
bash-3.2# lustatus
ERROR: No boot environments are configured on this system
ERROR: cannot determine list of all boot environment names
bash-3.2#
As per the lustatus output there is no boot environments are configured.
Create new boot environment:
bash-3.2# lucreate -n SOL10-MARCH-2014
Checking GRUB menu...
Analyzing system configuration.
No name for current boot environment.
INFORMATION: The current boot environment is not named - assigning name (s10x_u10wos_17b).
Current boot environment is named (s10x_u10wos_17b).
Creating initial configuration for primary boot environment (s10x_u10wos_17b).
INFORMATION: No BEs are configured on this system.
The device (/s10x_u10wos_17b)(/s10x_u10wos_17b)(/s10x_u10wos_17b)(/span)(/pre)
is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name (s10x_u10wos_17b) PBE Boot Device (/s10x_u10wos_17b).
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment (sol10-march-2014).
Source boot environment is (s10x_u10wos_17b).
Creating file systems on boot environment (sol10-march-2014).
Populating file systems on boot environment (sol10-march-2014).
Analyzing zones.
Duplicating ZFS datasets from PBE to ABE.
Creating snapshot for (rpool s10x_u10wos_17b="") on (rpool s10x_u10wos_17b="").
Creating clone for (rpool s10x_u10wos_17b="") on (rpool).
Mounting ABE (sol10-march-2014).
Generating file list.
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE (sol10-march-2014).
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE (s10x_u10wos_17b).
Making boot environment (sol10-march-2014) bootable.
Updating bootenv.rc on ABE (sol10-march-2014).
Saving existing file (/sol10-march-2014)(/sol10-march-2014)(/s10x_u10wos_17b)(/sol10-march-2014)(/sol10-march-2014)(/rpool)(/rpool)(/rpool)(/rpool)(/sol10-march-2014)(/sol10-march-2014)(/s10x_u10wos_17b)(/sol10-march-2014) in top level dataset for BE (sol10-march-2014) as (mount-point)//boot/grub/menu.lst.prev.
File (/mount-point)(/sol10-march-2014) propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE (sol10-march-2014) in GRUB menu
Population of boot environment (sol10-march-2014) successful.
Creation of boot environment (sol10-march-2014) successful.
bash-3.2#
Above lucreate output says, it is created new boot environment successfully.
Check the status again: (Now we have two boot environment):
bash-3.2# lustatus
Boot Environment         Is       Active Active    Can    Copy
Name                     Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ -----
s10x_u10wos_17b            yes      yes    yes       no     -
SOL10-MARCH-2014           yes      no     no        yes    -
bash-3.2#
Mount the newly created boot environment and check which are the FS are backed up:
bash-3.2# lumount SOL10-MARCH-2014
/.alt.SOL10-MARCH-2014
bash-3.2# lufslist SOL10-MARCH-2014
               boot environment name: SOL10-MARCH-2014
Filesystem  fstype  device size Mounted on    Mount Options
----------------------- -------- ------------ -------------------
/dev/zvol/dsk/rpool/swap swap        805306368  -    -
rpool/ROOT/SOL10-MARCH-2014 zfs      3588051456 /        -
rpool/export            zfs             64512 /export    -
rpool/export/home       zfs             31744 /export/home -
rpool                   zfs       20694051840 /rpool       -
zonepool                zfs       12980295680 /zonepool    -
zonepool/tpt01-SOL10-MARCH-2014 zfs    83772928 /zonepool/tpt01-SOL10-MARCH-2014 -
zonepool/tpt02-SOL10-MARCH-2014 zfs    2784329728 /zonepool/tpt02-SOL10-MARCH-2014 -
bash-3.2#
Unmount newly created boot environment:
bash-3.2# luumount SOL10-MARCH-2014
bash-3.2#
To delete boot environment:
bash-3.2# ludelete SOL10-MARCH-2014
Checking if last BE on any disk...
BE  is not the last BE on any disk.
No entry for BE  in GRUB menu
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
bash-3.2#

0 comments:

Post a Comment