Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oracle Solaris 11 Advanced Administration Cookbook.docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
3.14 Mб
Скачать

Getting ready

To follow this recipe, it's necessary that we have a machine (physical or virtual) running Oracle Solaris 11; we log in to the system as the root user and open a terminal. Additionally, our system must have access to the Internet. Some extra free space might be required.

How to do it…

Without any delay, we execute the following commands:

root@solaris11:~# beadm create solaris-backup-1

root@solaris11:~# beadm list

BE Active Mountpoint Space Policy Created

------------- --------------------------------- ----------

solaris

NR

/

4.99G

static

2013-10-05

20:44

solaris-backup-1

-

-

163.0K

static

2013-10-10

19:57

solaris-backup-b

-

-

173.0K

static

2013-10-12

22:47

Oracle Solaris 11 automatically creates an entry in the GRUB list and makes it the default choice. However, it is relevant to note that another BE named solaris-backup-b is already present on the system from previous tests and it will be used in some steps ahead.

To enable the solaris-backup-1 BE, execute the following commands:

root@solaris11:~# beadm activate solaris-backup-1

root@solaris11:~# beadm list

BE Active Mountpoint Space Policy Created

----------------------- ------------------------------------

---------- ------------------------

solaris 20:44

N

/

4.99G

static

2013-10-05

solaris-backup-1 19:57

R

-

163.0K

static

2013-10-10

solaris-backup-b - - 173.0K static 2013-10-

12 22:47

Note the Active column from the last command. The flag for solaris-backup-1 has changed to R, which means that it will be the active boot environment in the next boot. Therefore, it's time to reboot the system and list all the BEs:

root@solaris11:~# init 6

root@solaris11:~# beadm list

www.allitebooks.com

IPS and Boot Environments

BE Active Mountpoint Space Policy Created

solaris - - 511.60M static 2013-10- 05 20:44

solaris-backup-1 NR / 4.74G static 2013-10-10 19:57

solaris-backup-b - - 173.0K static 2013- 10-12 22:47

If we need to destroy a boot environment (not the current one, for sure), we can do so by executing the following command:

root@solaris11:~# beadm destroy solaris-backup-b

Are you sure you want to destroy solaris-backup-b? This action cannot be undone(y/[n]): y

root@solaris11:~# beadm list

BE Active Mountpoint Space Policy Created

solaris - - 247.55M static 2013- 10-05 20:44

solaris-backup-1 NR / 4.90G static 013-10-

10 19:57

What can we say about GRUB? There is no problem with it because Oracle Solaris 11

automatically removed the BE entry from the existing GRUB configuration.

An overview of the recipe

Creating a new BE is an excellent way to have an additional environment to initially test a new Oracle Solaris 11 patch or operating system upgrade from Oracle. If something goes wrong, we are able to switch back to the old environment without losing any data. Following the creation of the BE, we need to remember to activate the new BE before rebooting the system.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]