OpenSolaris rpool sharing disks

opensolaris-logoWe’ve been using Opensolaris (and Solaris) more and more; the advantages in technical prowess outweigh the few advantages Linux has left in ease of use. One thing we’ve been frustrated with a couple of times is the apparent inability to to create custom slice layouts on root disks during installation.

We’re building a 16 drive, 16TB ZFS archival server, and we didn’t want to waste two drives (or cram two additional drives in the chassis) for root volumes when we had plenty of space on our 16 data drives.  We wanted to run a 50GB root partition across one ZFS raidz1 group. I’m hoping there’s a simpler way to do this, and we just lacked the patience for searching for it. In the event that there isn’t, we decided to throw an outline of the procedure we used up here.

1. Partition a system disk with a 50GB Solaris partition.

2. Install Solaris.

3. Partition a second system disk with the Solaris partition as the entire disk.

4. Use prtvtoc | fmthard to copy the layout from disk 1 to disk 2.

5. Expand slice 2 on disk 2 to consume the entire disk.

6. ZFS attach disk 2 to disk 1.

7. Use installgrub to place grub on disk 2.

8. Boot off disk 2.

9. Detach disk 1 from rpool.

10. Partition disk 1 like disk 2

11. ZFS attach disk 1 to disk 2

12. Use installgrub on disk 1

13. Create a new slice on both disks for the raidz group

13. Repeat steps 10-13 for each disk you plan to use in the raidz group

14. Create a raidz group using the new slice on each of the disks

It’s a little bit involved, but in 20 minutes we created a four-way root mirror and had a 4 x 900GB raidz partition on the rest of that disk group.  This saved us the hassle of shoe-horning and cabling two system drives, reduced potential points of failure, and dropped our power  consumption slightly over what we expect will be a 5+ year installation.

If there’s a simpler way to do this, please comment. 🙂