root @ T2000 # format Searching for disks ... done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> main / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 0.0 1. c0t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 1.0 2. c0t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> Filename / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 2.0 3. c0t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 3.0
root @ T2000 # uname -a SunOS T2000 5.10 Generic_142909-17 sun4v sparc SUNW, Sun-Fire-T200
format> disk AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> main / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 0.0 1. c0t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 1.0 2. c0t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> Filename / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 2.0 3. c0t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> / pci @ 780 / pci @ 0 / pci @ 9 / scsi @ 0 / sd @ 3.0 Specify disk (enter its number) [0]: 2 selecting c0t2d0: filename [disk formatted] format> p partition> 0 Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag [unassigned]: root Enter partition permission flags [wm]: Enter new starting cyl [0]: Enter partition size [28665792b, 2817c, 2816e, 13996.97mb, 13.67gb]: 7850c partition> p
partition> label Ready to label disk, continue? y partition> name Enter table name (remember quotes): ZFS partition> q format> save Saving new disk and partition definitions Enter file name ["./ format.dat"]:
root @ T2000 # zpool create -f mainpool mirror c0t2d0s0 c0t3d0s0 root @ T2000 # zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT mainpool 38G 1.69G 36.3G 4% ONLINE -
root @ T2000 # lucreate -c ufsBE -n zfsBE -p mainpool Analyzing system configuration. Comparing source boot environment <ufsBE> file systems with the file system (s) you specified for the new boot environment. Determining which file systems should not be in the new boot environment. Updating boot environment description database on all BEs. Updating system configuration files. The device </ dev / dsk / c0t2d0s0> is not a device; cannot get BE ID. Creating configuration for boot environment <zfsBE>. Source boot environment is <ufsBE>. Creating boot environment <zfsBE>. Creating file systems on boot environment <zfsBE>. Creating <zfs> file system for </> in zone <global> on <mainpool / ROOT / zfsBE>. Populating file systems on boot environment <zfsBE>. Checking selection integrity. Integrity check OK. Populating contents of mount point </>. Copying. Creating shared file system mount points. Creating databases for boot environment <zfsBE>. Creating compare database for file system </ var>. Creating compare database for file system </>. Updating compare databases on boot environment <zfsBE>. Making boot environment <zfsBE> bootable. Creating boot_archive for /.alt.tmp.b-tDb.mnt updating /.alt.tmp.b-tDb.mnt/platform/sun4v/boot_archive Population of boot environment <zfsBE> successful. Creation of boot environment <zfsBE> successful.
root @ T2000 # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- - ----- ---------- ufsBE yes yes yes no - zfsBE yes no no yes -
root @ T2000 # luactivate zfsBE A Live Upgrade Sync <zfsBE>. ************************************************** ******************** The target boot environment has been activated. It will be used when you reboot. NOTE: You must NOT use the reboot, halt, or uadmin commands. You MUST USE either the init or the shutdown command when you reboot. If you the system will not boot up using the target BE. ************************************************** ******************** In case of a failure needs to be followed fallback to the currently working boot environment: 1. Enter the PROM monitor (ok prompt). 2. Change the boot device back to original boot environment by typing: setenv boot-device disk: a 3. Boot to original boot environment by typing: boot ************************************************** ******************** Modifying boot archive service Activation of boot environment <zfsBE> successful.
root @ T2000 # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- - ----- ---------- ufsBE yes no no yes - zfsBE yes yes yes no -
Source: https://habr.com/ru/post/126508/
All Articles