Example of Detaching and Upgrading One Side of a RAID 1 Volume (Mirror) (Command-Line Interface)
This example shows you how to do the following tasks:
Create a RAID-1 volume (mirror) on a new boot environment
Break the mirror and upgrade one half of the mirror
Attach the other half of the mirror, the concatenation, to the new mirror
Figure 38-1 shows the current boot environment that contains three physical disks.
Figure 38-1 Detaching and Upgrading One Side of a RAID-1 Volume (Mirror)
 Create a new boot environment, second_disk, that contains a mirror.
The following command performs these tasks.
lucreate configures a UFS file system for the mount point root (/). A mirror, d10, is created. This mirror is the receptacle for the current boot environment's root (/) file system that is copied to the mirror d10. All data on the mirror d10 is overwritten.
Two slices, c0t1d0s0 and c0t2d0s0, are specified to be used as submirrors. These two submirrors are attached to mirror d10.
# lucreate -c first_disk -n second_disk \
-m /:/dev/md/dsk/d10:ufs,mirror \
-m /:/dev/dsk/c0t1d0s0:attach \
-m /:/dev/dsk/c0t2d0s0:attach
|
Activate the second_disk boot environment.
# /usr/sbin/luactivate second_disk
# init 6
|
Create another boot environment, third_disk.
The following command performs these tasks.
lucreate configures a UFS file system for the mount point root (/). A mirror, d20, is created.
Slice c0t1d0s0 is removed from its current mirror and is added to mirror d20. The contents of the submirror, the root (/) file system, are preserved and no copy occurs.
# lucreate -n third_disk \
-m /:/dev/md/dsk/d20:ufs,mirror \
-m /:/dev/dsk/c0t1d0s0:detach,attach,preserve
|
Upgrade the new boot environment, third_disk, by installing a Solaris Flash archive. The archive is located on the local system. The operating systems versions for the -s and -a options are both Solaris 9 releases. All files are overwritten on third_disk except shareable files.
# luupgrade -f -n third_disk \
-s /net/installmachine/export/Solaris_9/OS_image \
-a /net/server/archive/Solaris_9
|
Activate the third_disk boot environment to make this boot environment the currently running system.
# /usr/sbin/luactivate third_disk
# init 6
|
Delete the boot environment second_disk.
The following commands perform these tasks.
Clear mirror d10.
Check for the number for the concatenation of c0t2d0s0.
Attach the concatenation that is found by the metastat command to the mirror d20. The metattach command synchronizes the newly attached concatenation with the concatenation in mirror d20. All data on the concatenation is overwritten.
# metaclear d10
metastat -p | grep c0t2d0s0
dnum 1 1 c0t2d0s0
metattach d20 dnum
|
| num | Is the number found in the metastat command for the concatenation
|
The new boot environment, third_disk, has been upgraded and is the currently running system. third_disk contains the root (/) file system that is mirrored.
Figure 38-2 shows the entire process of detaching a mirror and upgrading the mirror by using the commands in the preceding example.
Figure 38-2 Detaching and Upgrading One Side of a RAID-1 Volume (Mirror) (continued)
 Example of Migrating From an Existing Volume to a Solaris Volume Manager RAID-1 Volume (Command-Line Interface)
Solaris Live Upgrade enables the creation of a new boot environment on RAID-1 volumes (mirrors). The current boot environment's file systems can be on any of the following:
A physical storage device
A Solaris Volume Manager controlled RAID-1 volume
A Veritas VXFS controlled volume
However, the new boot environment's target must be a Solaris Volume Manager RAID-1 volume. For example, the slice that is designated for a copy of the root (/) file system must be /dev/md/dsk/rootvol. rootvol is the volume that contains the root (/) file system.
In this example, the current boot environment contains the root (/) file system on a volume that is not a Solaris Volume Manager volume. The new boot environment is created with root (/) on the Solaris Volume Manager RAID-1 volume c0t2d0s0. The lucreate command migrates the current volume to the Solaris Volume Manager volume. The name of the new boot environment is svm_be. The lustatus command reports if the new boot environment is ready to be activated and be rebooted. The new boot environment is activated to become the current boot environment.
# lucreate -n svm_be -m /:/dev/md/dsk/d1:mirror,ufs \
-m /:/dev/dsk/c0t2d0s0:attach
# lustatus
# luactivate svm_be
# lustatus
# init 6 |
Example of Creating an Empty Boot Environment and Installing a Solaris Flash Archive (Command-Line Interface)
The following procedures take you through the three step process:
The lucreate command creates a boot environment that is based on the file systems in the active boot environment. When using the lucreate command with the -s - option, lucreate quickly
creates an empty boot environment. The slices are reserved for the file systems specified, but no file systems are copied. The boot environment is named, but not actually created until installed with a Solaris Flash archive. When the empty boot environment is installed with an archive, file systems are installed on the reserved slices. The boot environment is then activated.
|