Skip to content

Bootable Mirrored Disks on OpenSolaris

August 29, 2008

I’ve got a sweet Ultra 24 workstation (thanks Will!) in the office, running the latest OpenSolaris bits (the easiest OS install I’ve ever done, no kidding.) Its got 2 x 1TB drives that I want completely mirrored and bootable, so should one completely fail, I just boot off the other. Unfortunately the installer doesn’t yet offer this setup, so you need to do it yourself. These are crude notes I’ve thrown together after several questions to Joe and Matthew. These steps assume you’ve got a machine with 2 disks running OpenSolaris (and the acceptance you may fubar your OS if you screw up.)

First off, if this is a fresh install, do a

pkg image-update

This will grab the latest and greatest bits, which will likely require a reboot. Now determine which disk is currently used by the ZFS pool, and the device name for the currently unused disk, via “zpool status” and “format”. You’ll want to attach the unused disk to the existing ZFS pool. The syntax looks like so

zpool attach rpool existing_disk second_disk

On my system, this translated to:

zpool attach rpool c3d1s0 c4d0s0

“zpool status” should then show the new mirror, and the progress of the resilvering. For some reason I didn’t dig into, the mirror reported a non fatal error on my box. a

zpool clear rpool ; zpool upgrade rpool

took care of it. *shrug* So now your disks are mirrored, but the 2nd disk is still not bootable (should your primary drive fail). You can fix this via the installgrub command. For my system, the syntax looked like:

installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c4d0s0

Where the disk specified is your newly mirrored second disk. Now you should be good to go, so reboot the box, go into the BIOS settings and toggle the second disk as your boot device, and verify it works as planned.

Advertisements

From → Gadgets

4 Comments
  1. I wholeheartedly second that "the easiest OS install I’ve ever done, no kidding" comment. Ubuntu’s got nothing on OpenSolaris, when it comes to install-time. – Dave

  2. If anything, I’d say it is too easy. I really want the option to add extra HDDs into the root pool at install time. Hopefully that is on the to do list. Otherwise, it is just drop dead simple and quite slick. Very well done.

  3. interesting

  4. Thanks kanki, very nice…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: