What happened to Boot Environments during Package installation– pkg property (Part – 2)

How to list the package properties.

root@solaris11:~# pkg property
PROPERTY VALUE
be-policy default
ca-path /etc/openssl/certs
check-certificate-revocation False
flush-content-cache-on-success True
mirror-discovery False
preferred-authority
publisher-search-order [‘solaris’]
send-uuid True
signature-policy verify
signature-required-names []
trust-anchor-directory etc/certs/CA
use-system-repo False

Three Kind of properties can be set for “be-policy”

1) always-new : This will create new BE always whenever we are doing any operation related to package.

root@solaris11:~# pkg set-property be-policy always-new

2) create-backup or default : For package operation that require reboot this policy created a new BE set as active on the next
boot. It can be requested explicitly as well which I have done in previous article(https://ervikrant06.wordpress.com/2014/06/18/what-happened-to-boot-environments-during-package-installation-part-1/) because that package operation was not going to create the BE.

3) when-required : For package operations that require a reboot, this policy creates a new BE set as active on the next boot. A backup BE is not created unless explicitly requested.

  • Now  I am changing the property to always-new.

root@solaris11:~# pkg set-property be-policy always-new

root@solaris11:~# pkg property
PROPERTY VALUE
be-policy always-new
ca-path /etc/openssl/certs
check-certificate-revocation False
flush-content-cache-on-success True
mirror-discovery False
preferred-authority
publisher-search-order [‘solaris’]
send-uuid True
signature-policy verify
signature-required-names []
trust-anchor-directory etc/certs/CA
use-system-repo False

After verifying that property has been changed. Lets have a look at boot environments present on server.

root@solaris11:~# beadm list
BE Active Mountpoint Space Policy Created
— —— ———- —– —— ——-
solaris – – 32.12M static 2014-05-05 17:17
solaris-newbe1 NR / 10.17G static 2014-06-16 18:05

  • Now if I am going to install the package it will create the new BE.

root@solaris11:~# pkg install diffstat
Packages to install: 1
Create boot environment: Yes
Create backup boot environment: No

Planning linked: 0/2 done; 1 working: zone:testzone2
Planning linked: 1/2 done; 1 working: zone:testzone1
Planning linked: 2/2 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 6/6 0.0/0.0 0B/s

Downloading linked: 0/2 done; 1 working: zone:testzone2
Downloading linked: 1/2 done; 1 working: zone:testzone1
Downloading linked: 2/2 done
PHASE ITEMS
Installing new actions 24/24
Updating package state database Done
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/2 done; 1 working: zone:testzone2
Executing linked: 1/2 done; 1 working: zone:testzone1
Executing linked: 2/2 done

A clone of solaris-newbe1 exists and has been updated and activated.
On the next boot the Boot Environment solaris-newbe1-1 will be
mounted on ‘/’. Reboot when ready to switch to this updated BE.

  • I can verify the same thing using beadm command that new BE has been created on server.

root@solaris11:~# beadm list
BE Active Mountpoint Space Policy Created
— —— ———- —– —— ——-
solaris – – 32.12M static 2014-05-05 17:17
solaris-newbe1 N / 36.12M static 2014-06-16 18:05
solaris-newbe1-1 R – 10.25G static 2014-06-16 19:19

  • If I am going to install one more package it will create a new BE. I verified the same by installing another package. Didn’t show the installation of that package just to keep the post brief.

root@solaris11:~# beadm list
BE Active Mountpoint Space Policy Created
— —— ———- —– —— ——-
solaris – – 32.12M static 2014-05-05 17:17
solaris-newbe1 N / 33.24M static 2014-06-16 18:05
solaris-newbe1-1 – – 51.72M static 2014-06-16 19:19
solaris-newbe1-2 R – 10.52G static 2014-06-16 19:23

And the latest one will become the active BE after reboot. This is very strict policy which is also quite annoying for me. But it can be useful depending upon the criticality of environment.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s