Logically, there were an environment that packs all component into one environment. These components I mean are software installed, patch level, kernel, etc. That environment is called a Boot Environment (BE).
Boot Environment can be check with 'list' argument, here is default boot enviroment :
root@war49:~# beadm list
BE Flags Mountpoint Space Policy Created
-- ----- ---------- ----- ------ -------
solaris NR / 11.18G static 2017-01-04 16:35
0x0 Creating Boot Environment
Creating boot environment is simply as bellow command format:
-login as root
-BE create command :
# beadm create
Example:
# beadm create newbe-20170106
Mounting Boot Environtment To Directory
# beadm mount
Example :
# beadm mount newbe-20170106 /mnt/newbe
Activate boot environment
# beadm activate
Example :
# beadm activate newbe-20170106
--> newbe-20170106 will active at next reboot
0x1 BE and ZFS dataset
By default newly boot environment will setup new dataset. For example new BE 'newbe-20170106' will created a new dataset using this name as new dataset in ZFS environment as bellow :
root@war49:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 22.3G 26.5G 4.52M /rpool
rpool/ROOT 10.9G 26.5G 31K legacy
rpool/ROOT/newbe-20170106 186K 26.5G 10.6G /
rpool/ROOT/newbe-20170106/var 1K 26.5G 220M /var
rpool/ROOT/solaris 10.9G 26.5G 10.6G /
rpool/ROOT/solaris/var 222M 26.5G 220M /var
If there is an additional BE, the additional BE will be a clone of the newly created BE, also if the additional has sparate dataset (for the example is /var), the sparate dataset will be clone too.
0x2 Creating a Snapshot for BE
Newly boot environment could be snapshot with bellow command:
# beadm create
Example:
root@war49:~# beadm create newbe-20170106@fri-20170106
Check Snapshot :
root@war49:~# zfs list -r -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
rpool/ROOT/newbe-20170106@fri-20170106 0 - 10.6G -
rpool/ROOT/newbe-20170106/var@fri-20170106 0 - 220M -
rpool/ROOT/solaris@install 58.4M - 2.67G -
rpool/ROOT/solaris@2017-01-06-16:41:11 856K - 10.6G -
rpool/ROOT/solaris/var@install 1.80M - 219M -
rpool/ROOT/solaris/var@2017-01-06-16:41:11 69.5K - 220M -
0x3 Creating a Boot Environment from Snapshot
A new boot environment could be created from existing snapshot, as bellow command:
# beadm create -e BE-name@snapshot BE-name
Example:
root@war49:~# beadm create -e newbe-20170106@fri-20170106 newbe2
root@war49:~# beadm list
BE Flags Mountpoint Space Policy Created
-- ----- ---------- ----- ------ -------
newbe-20170106 - - 318.5K static 2017-01-06 23:41
newbe2 - - 187.5K static 2017-01-07 00:17
solaris NR / 11.18G static 2017-01-04 16:35
0x4 Checking boot environment
Command:
# beadm list [option] [Be Name]
-> Option:
-a all available information
-d list information about all subordinate dataset
-s list information about snapshot
-H prevent listing header information
Example:
root@war49:~# beadm list -a newbe-20170106
BE/Dataset/Snapshot Flags Mountpoint Space Policy Created
------------------- ----- ---------- ----- ------ -------
newbe-20170106
rpool/ROOT/newbe-20170106 - - 252.5K static 2017-01-06 23:41
rpool/ROOT/newbe-20170106/var - - 1.0K static 2017-01-06 23:41
rpool/ROOT/newbe-20170106/var@fri-20170106 - - 0 static 2017-01-06 23:58
rpool/ROOT/newbe-20170106@fri-20170106 - - 65.0K static 2017-01-06 23:58
0x5 Update package on boot environment using pkg
We can update package on boot environment using pkg command as bellow :
# pkg -R
install
Example:
# pkg -R /mnt install ssh
Boot Environment (BE) Administration
Jan 6, 2017 5:41 PM
Filed Under: confbuild, oracle |0 comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment