\- assigning a static IP to the admin nic
\- install to c1t0d0
\- enter a password for root
It's trivial to attach a 2nd disk turning the SmartOS zones pool into a mirror so I installed SmartOS to just 1 disk for now.
After a short while everything was setup and it was time to reboot into the SmartOS live image.
No problems booting and soon I was presented with the console login of the live image.
Once I was logged into the global zone, a zpool list showed that all of the zpools had been imported, including the now single disk OI rpool
I decided to destroy the rpool of the OI install and attach that disk to the zones pool ASAP.
{noformat}
[root@00-1b-21-98-51-c1 ~]# zpool destroy rpool
{noformat}
Let's apply a Solaris fdisk partition to the 2nd disk first:
{noformat}
[root@00-1b-21-98-51-c1 ~]# fdisk -B c1t1d0p0
{noformat}
Now print the vtoc of the lone zones pool disk:
{noformat}
[root@00-1b-21-98-51-c1 ~]# prtvtoc /dev/rdsk/c1t0d0p0
* /dev/rdsk/c1t0d0p0 partition map
*
* Dimensions:
* 512 bytes/sector
* 488397168 sectors
* 488397101 accessible sectors
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 34 222 255
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 4 00 256 488380495 488380750
8 11 00 488380751 16384 488397134
{noformat}
Okay, now apply that vtoc to the 2nd zones pool disk:
{noformat}
[root@00-1b-21-98-51-c1 ~]# prtvtoc /dev/rdsk/c1t0d0p0 | fmthard -s - /dev/rdsk/c1t1d0p0
{noformat}
Verify if the vtoc of disk 2 matches disk 1 *very important* :
{noformat}
[root@00-1b-21-98-51-c1 ~]# prtvtoc /dev/rdsk/c1t1d0p0
* /dev/rdsk/c1t1d0p0 partition map
*
* Dimensions:
* 512 bytes/sector
* 488397168 sectors
* 488397101 accessible sectors
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 34 222 255
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 4 00 256 488380495 488380750
8 11 00 488380751 16384 488397134
{noformat}
Perfect, the vtoc matched so on to turn the zones pool into a mirror.
This IMHO is imperative for a type 1 hypervisor such as SmartOS since it's running entirely off of a ramdisk\!
{noformat}
[root@00-1b-21-98-51-c1 ~]# zpool attach zones c1t0d0 c1t1d0
{noformat}
After the resilver of disk 2 was complete here's the status of the zones pool:
{noformat}
[root@00-1b-21-98-51-c1 ~]# zpool status zones
pool: zones
state: ONLINE
scan: resilvered 1.36G in 0h0m with 0 errors on Sat Mar 2 16:16:15 2013
config:
NAME STATE READ WRITE CKSUM
zones ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c1t1d0 ONLINE 0 0 0
{noformat}
The elapsed time it took to resilver seems like a bug which I'll report on irc (#smartos on freenode)
I went for a reboot to verify if the system would come up properly.
Reboot completed without any hitch, here's the complete listing of all zpools on the system:
{noformat}
[root@00-1b-21-98-51-c1 ~]# zpool list
NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT
backup 1.36T 112G 1.25T - 8% 1.00x ONLINE -
pool1 5.44T 2.62T 2.81T - 48% 1.00x ONLINE -
zones 232G 1.40G 231G - 0% 1.00x ONLINE -
{noformat}
I noticed that, despite having zpool upgraded my zpools on the latest development release of OI (oi_151a7) to use *zpool-features(5)* , running zpool upgrade on SmartOS still showed that pools pool1 and backup could be upgraded\!
Recently some excellent work has gone into illumos implementing lz4 compression and filesystem_limits into *ZFS(1M)* which were implemented by Joyent to their SmartOS builds.
This just warranted my decision from migrating from OI to SmartOS even more.
h3. The verdict
I feel the migration was a success\!
Since the migration I've setup a couple of zones for mail and irc and will be installing several more.
All zones are using the 12.4.1 multiarch ([http://pkgsrc.smartos.org/packages/SmartOS/2012Q4-multiarch/All]) repository provided by Joyent's [@jperkin|http://twitter.com/jperkin] ([http://www.perkin.org.uk/posts/multiarch-package-support-in-smartos.html])