Just got around to jumpstart my PowerEdge R710 with my MacBook Pro. Took about 10 to 15 minutes to complete the full install. Now that the system is up and there is a spare disk available we can create a mirror with:
What version of Solaris are we currently running?
bash-3.00# cat /etc/release Solaris 10 10/09 s10x_u8wos_08a X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 16 September 2009 bash-3.00# uname -a SunOS unknown 5.10 Generic_141445-09 i86pc i386 i86pc
What are the hard-disks currenlty installed on the system and which disks are used and which disk are free?
bash-3.00# echo | format -e Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t5000C50031BA8A43d0 <DEFAULT cyl 16567 alt 2 hd 255 sec 63> /scsi_vhci/disk@g5000c50031ba8a43 1. c0t5000C50031BB2F6Fd0 <DEFAULT cyl 16567 alt 2 hd 255 sec 63> /scsi_vhci/disk@g5000c50031bb2f6f Specify disk (enter its number): Specify disk (enter its number): bash-3.00# zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c0t5000C50031BA8A43d0s0 ONLINE 0 0 0 errors: No known data errors
The first-disk (c0t5000C50031BA8A43d0) is used for the “root pool” (rpool). The second-disk (c0t5000C50031BB2F6Fd0) is free and will be used for the mirror. But first, we copy the disk geometry of the first-disk to the second-disk using prtvtoc and fmthard. Slice s2 denotes the entire disk:
bash-3.00# prtvtoc /dev/rdsk/c0t5000C50031BA8A43d0s2 | fmthard -s - /dev/rdsk/c0t5000C50031BB2F6Fd0s2 fmthard: New volume table of contents now in place.
If you can an error similar to: “fmthard: Partition 2 specifies the full disk and is not equal” then you will have to run fdisk on the second-disk as noted by malsserver:
# fdisk /dev/rdsk/c0t5000C50031BB2F6Fd0s2
At this point we can attached the second-disk to the pool for our mirror. Just allow the mirror to complete before proceeding to the next step. You can check the completion status with “zpool status -v”:
bash-3.00# zpool attach rpool c0t5000C50031BA8A43d0s0 c0t5000C50031BB2F6Fd0s0
When the mirroring/resilvering is complete make sure to invoke installgrub(1M) as this is not done automatically. This will make the second disk c0t5000C50031BB2F6Fd0s0 bootable should the first disk fail.
And, as advised from the man page, we need to run and note the options (-fm) will cause the master boot record to be overwritten. If you do not want this, then I suggest you remove the (-fm) options. Doing so may prevent the second (mirrored) disk from being bootable if there are no other boot managers on that disk.
bash-3.00# /sbin/installgrub -fm /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t5000C50031BB2F6Fd0s0 Solaris boot partition inactive. stage1 written to partition 2 sector 0 (abs 20563200) stage2 written to partition 2, 272 sectors starting at 50 (abs 20563250)
Now, what does ‘zpool status -xv’ say?
bash-3.00# zpool status -xv pool: rpool state: ONLINE status: One or more devices is currently being resilvered. The pool will continue to function, possibly in a degraded state. action: Wait for the resilver to complete. scrub: resilver in progress for 0h2m, 30.03% done, 0h5m to go config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c0t5000C50031BA8A43d0s0 ONLINE 0 0 0 c0t5000C50031BB2F6Fd0s0 ONLINE 0 0 0 9.26G resilvered errors: No known data errors
The second time around, what does ‘zpool status -v’ say?
bash-3.00# zpool status -v pool: rpool state: ONLINE scrub: resilver completed after 0h20m with 0 errors on Thu Dec 30 17:02:45 2010 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c0t5000C50031BA8A43d0s0 ONLINE 0 0 0 c0t5000C50031BB2F6Fd0s0 ONLINE 0 0 0 30.9G resilvered errors: No known data errors
All looks good.