Note:In Solaris 11 , liveupgrade has been re-designed with some new commands.
Here is the current configuration of my global zone.
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
OLDBE yes yes yes no -
NEWBE yes no no yes -
bash-3.00# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
1 u1 running /export/zones/u1 native shared
bash-3.00# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
rpool/ROOT/root@NEWBE 1.70M - 3.50G -
rpool/export/zones/u1@NEWBE 1.21M - 484M -
bash-3.00# zonename
global
bash-3.00#
1.How to active the current boot environment ?
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
OLDBE yes yes no no -
NEWBE yes no yes no -
bash-3.00# luactivate OLDBE
System has findroot enabled GRUB
Generating boot-sign, partition and slice information for PBE
Activating the current boot environment for next reboot.
The current boot environment has been activated for the next reboot.
bash-3.00#
2.If you want to delete the alternative boot environment,then use ludelete .
bash-3.00# ludelete NEWBE
System has findroot enabled GRUB
Checking if last BE on any disk...
ERROR: unable to mount zones:
/.alt.NEWBE/export/zones/u1-NEWBE must not be group readable.
/.alt.NEWBE/export/zones/u1-NEWBE must not be group executable.
/.alt.NEWBE/export/zones/u1-NEWBE must not be world readable.
/.alt.NEWBE/export/zones/u1-NEWBE must not be world executable.
could not verify zonepath /.alt.NEWBE/export/zones/u1-NEWBE because of the above errors.
zoneadm: zone u1 failed to verify
ERROR: unable to mount zone in </.alt.NEWBE>
ERROR: unmounting partially mounted boot environment file systems
ERROR: No such file or directory: error unmounting
ERROR: cannot mount boot environment by name
ERROR: Failed to mount BE .
ERROR: Failed to mount BE .
cat: cannot open /tmp/.lulib.luclb.dsk.13727.NEWBE
ERROR: This boot environment is the last BE on the above disk.
ERROR: Deleting this BE may make it impossible to boot from this disk.
ERROR: However you may still boot solaris if you have BE(s) on other disks.
ERROR: You *may* have to change boot-device order in the BIOS to accomplish this.
ERROR: If you still want to delete this BE , please use the force option (-f).
Unable to delete boot environment.
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
OLDBE yes yes yes no -
NEWBE yes no no yes -
bash-3.00#
3.If the step 2 didn’t succeed then try to delete using “-f” option.
bash-3.00# ludelete -f NEWBE
System has findroot enabled GRUB
No entry for BE in GRUB menu
Determining the devices to be marked free.
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
Boot environment deleted.
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
OLDBE yes yes yes no -
bash-3.00#
4.If step 3 also failed ,then you have to remove the configuration files manually. Step:5
5.Here is the force cleanup by removing the configuration files manually.
bash-3.00# rm /etc/lu/ICF.*
bash-3.00# rm /etc/lu/INODE.*
/etc/lu/INODE.*: No such file or directory
bash-3.00# rm /etc/lu/vtoc.*
bash-3.00# rm /etc/lu/.??*
bash-3.00# /etc/lu/tmp/*
bash-3.00# rm /etc/lu/tmp/*
bash-3.00# rm /.alt.*
/.alt.*: No such file or directory
bash-3.00# cat /etc/lutab
# DO NOT EDIT THIS FILE BY HAND. This file is not a public interface.
# The format and contents of this file are subject to change.
# Any user modification to this file may result in the incorrect
# operation of Live Upgrade.
1:OLDBE:C:0
1:/:rpool/ROOT/root:1
1:boot-device:/dev/dsk/c1t0d0s0:2
bash-3.00# rm /etc/lutab
bash-3.00#
6.Perform the clean up for zones if its configured.
bash-3.00# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
1 u1 running /export/zones/u1 native shared
bash-3.00#
bash-3.00# rm /export/zones/u1/lu/*
/export/zones/u1/lu/*: No such file or directory
bash-3.00#
7.Destroy the BE’s snapshot if exists.
bash-3.00# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
rpool/ROOT/root@NEWBE 1.90M - 3.50G -
rpool/export/zones/u1@NEWBE 282K - 484M -
bash-3.00# zfs destroy rpool/export/zones/u1@NEWBE
cannot destroy 'rpool/export/zones/u1@NEWBE': snapshot has dependent clones
use '-R' to destroy the following datasets:
rpool/export/zones/u1-NEWBE
bash-3.00# zfs destroy -R rpool/export/zones/u1@NEWBE
bash-3.00# zfs destroy -R rpool/ROOT/root@NEWBE
bash-3.00#
8.Check the BE status now.
bash-3.00# lustatus
ERROR: No boot environments are configured on this system
ERROR: cannot determine list of all boot environment names
bash-3.00#
9.You may just wonder that how to create the current boot environment . There is no direct command to create the current BE.But you can do it using below method.
-c – create current BE
-n – Create a new BE aka alternative BE
bash-3.00# lucreate -c OLDBE -n NEWBE
Checking GRUB menu...
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named -OLDBE-.
Creating initial configuration for primary boot environment -OLDBE-.
The device -/dev/dsk/c1t0d0s0- is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name -OLDBE- PBE Boot Device -/dev/dsk/c1t0d0s0-.
Comparing source boot environment -OLDBE- file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment -NEWBE-.
Source boot environment is -OLDBE-.
Creating boot environment -NEWBE-.
Cloning file systems from boot environment -OLDBE- to create boot environment -NEWBE-.
Creating snapshot for -rpool/ROOT/root- on -rpool/ROOT/root@NEWBE-.
Creating clone for -rpool/ROOT/root@NEWBE- on -rpool/ROOT/NEWBE-.
Setting canmount=noauto for -/- in zone -global- on -rpool/ROOT/NEWBE-.
Creating snapshot for -rpool/export/zones/u1- on -rpool/export/zones/u1@NEWBE-.
Creating clone for -rpool/export/zones/u1@NEWBE- on -rpool/export/zones/u1-NEWBE-.
WARNING: split filesystem -/- file system type -zfs- cannot inherit
mount point options --- from parent filesystem -/- file
type --- because the two file systems have different types.
Saving existing file -/boot/grub/menu.lst- in top level dataset for BE -NEWBE- as -mount-point-//boot/grub/menu.lst.prev.
File -/boot/grub/menu.lst- propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE -NEWBE- in GRUB menu
Population of boot environment -NEWBE- successful.
Creation of boot environment -NEWBE- successful.
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
OLDBE yes yes yes no -
NEWBE yes no no yes -
bash-3.00# ludelete NEWBE
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
OLDBE yes yes yes no -
bash-3.00#
If you want to completely remove all traces of any previous configurations, you’ll need to perform the following procedure instead,
10.# pkgrm SUNWluu SUNWlur SUNWlucfg
11.Perform step number 5,6,7 for further cleanup.
12.Install the lu packages from Solaris DVD.You can find the packages on the below path.
You can use pkgadd command to add it.
bash-3.00# ls -lrt |egrep "SUNWluu|SUNWlur|SUNWlucfg"
dr-xr-xr-x 4 root root 2048 Sep 17 2009 SUNWluu
dr-xr-xr-x 4 root root 2048 Sep 17 2009 SUNWlur
dr-xr-xr-x 4 root root 2048 Sep 17 2009 SUNWlucfg
bash-3.00# pwd
/cdrom/sol_10_1009_x86/Solaris_10/Product
bash-3.00#
13. Download the latest lu patches from oracle support and install it .The latest patch should have fix for most the bugs in Liveupgrade.
This article is based oracle support article DOC ID 1417657.1
Thank you for visiting UnixArena. Hope now are able to perform the liveupgrade cleanup with confidence.
Leave a Reply