При переходе с ufs на zfs на есть только одна засада — нужно чтобы загрузочный диск имел SMI лэйбл и новый zpool располагался на слайсе (для порядка — лучше всего на слайсе 0).
Итак, если нужно перелэйбливаем диск и удаляем ненужные разделы.

Создаем слайс 0 размером с весь диск:


# format -e c7t20000004CFA16847d0
selecting c7t20000004CFA16847d0
[disk formatted]
FORMAT MENU:
...
label - write label to the disk
...
format> l
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? y
Auto configuration via format.dat[no]?
Auto configuration via generic SCSI-2[no]?
format> p
partition> p
Current partition table (unnamed):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 14086 68.35GB (14087/0/0) 143349312
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> l
[0] SMI Label
[1] EFI Label
Specify Label type[0]:
Ready to label disk, continue? y
partition> ^D

Создаем новый zfs пул:

# zpool create rpool c7t20000004CFA16847d0s0
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
rpool 68G 94K 68.0G 0% ONLINE -

Создаем новую среду загрузки:

# lucreate -c s10_1 -p rpool -n s10_2
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named "s10_1".
Creating initial configuration for primary boot environment "s10_1".
WARNING: The device "/dev/md/dsk/d0" for the root file system mount point "/" is not a physical device.
WARNING: The system boot prom identifies the physical device "/dev/dsk/c7t20000004CFA1686Ad0s0" as the system boot device.
...
Creation of boot environment "s10_2" successful.

Теперь нужно активировать новую среду загрузки и перегрузиться (обязательно через shutdown или init):

# luactivate -n s10_2
# shutdown -g0 -y -i6

Воот вообщем то и все.

После того, как вы перешли на zfs — создание новой среды загрузки больше не потребует
создание отдельного раздела или диска и будет занимать около 1 минуты.
Например:

# lucreate -n s10_3
Analyzing system configuration.
Comparing source boot environment "s10_2" 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 "s10_3".
Source boot environment is "s10_2".
Creating boot environment "s10_3".
Cloning file systems from boot environment "s10_2" to create boot environment "s10_3.
Creating snapshot for "rpool/ROOT/s10_2" on "rpool/ROOT/s10_2@s10_3".
Creating clone for "rpool/ROOT/s10_2@s10_3" on "rpool/ROOT/s10_3".
Setting canmount=noauto for in zone on "rpool/ROOT/s10_3".
Population of boot environment "s10_3" successful.
Creation of boot environment "s10_3" successful.


Ссылки в тему:

Один комментарий на запись “Solaris Live Upgrade. Часть 2. Переходим на ZFS”

  1. Monex пишет:

    ..Filed under Tags Sonia 14 06 ……Scenario the current Solaris Sparc system is booting off a single UFS disk eg when cloned from an image . We want to zfs mirror onto target 1 c0t1d0 and allow booting from both drives..Clear the current partition table on target 1 and create partition 0 covering the whole disk.