Storage Migration for Container Using SVM

There are 3 stages to migrate the data from old to new storage. I used EMC (old) and HP (new) storage in this example. The stages are as below:

Server Preparation
You must know what are the requirements of new storage. The following steps are required to migrate the current data to the new storage.

Step 1 - install the latest HBA firmware
The current HBA card must be compatible with the new storage. You may refer to HP's website to get the system requirements. Please install the latest HBA firmware based on the current Solaris and HBA firmware version.
# fcinfo hba-port

Step 2 - enable MPxIO driver
HP storage required MPxIO to enable the multipathing. This is to enable redundancy for HP storage. This is required for the storage managed by Solaris Volume Manager. Please edit file /kernel/drv/scsi_vhci.conf.
# vi /kernel/drv/scsi_vhci.conf
Add the entry as below:

device-type-scsi-options-list =
 "HP      OPEN-V",    "symmetric-option",
 "EMC     SYMMETRIX", "symmetric-option";


Step 3 - reboot the server
After the HBA firmware version upgraded and MPxIO driver enabled, sever has to be rebooted so that the new configuration will take affect.

Step 4 - Take over metaset
Check all disks are connected to the global server. Takeover or import the disk set so that the metaset should be owned by the global server.
# metaset -s disk_set -t

Step 4 - convert all meta-devices to sub-mirror
The current partition name must be renamed to new name and the mirror volume will use the current partition name. All soft-partitions will be cleared and recreated based on mirror volume name. This is to enable the new storage will be created and added as sub-mirror.  Then the new sub-mirror will be attached to the mirror volume name.

Data Migration
The data can be migrated from the current storage to the new storage without any outages. Below are the steps to migrate the data:

Step 1 - add new disk to disk set
If the system is using disk set or metaset, please add the new disk to the diskset or metaset first. Else, go to
# metaset -s disk_set -a new_disk

Step 2 - create partition with the new disk
Identify the new disk and create a partition for the new storage. Make sure the new partition size is equal or bigger than the old partition.
# metainit -s disk_set new_partition 1 1 c8t..d0s0

Step 3 - attach the new partition to the mirror volume as sub-mirror
After the new partition created, attach it to the mirror volume so that the data will be synchronized from the old storage to the new storage. The process will be started in background stop after completed.
# metattach -s disk_set mirror_volume_name new_submirror_name

Step 4 - detach the old partition from the mirror volume after the synchronization completed
Ensure all the data migrated to the new storage. Identify the sub-mirror attached to old storage (EMC) and detach it from the mirror volume.
# metadetach -s disk_set old_submirror_name

Step 5 - remove the old partition name from the disk set
Find the detached sub-mirror and identify its disk name. Delete/clear the susub-mirror name.
# metaclear -s disk_set old_submirror_name

Step 6 - remove the old disk from the disk set
Remove those old disk from the metaset/disk set
# metaset -s disk_set -d disk_name

Server Clean Reboot
- make sure all the old disk removed from the disk set
- bring down the server
- boot with reconfigure the server
- boot the container
- verify the container is bootable and all filesystems mounted