As Good A Place As Any
Tim Thomas's Blog
Example Scripts To Create One Big RAID-Z or Mirrored ZFS Pool on an SunFire X4500
These are just examples, no rocket science here, but they might save someone some typing.
In both cases I use all 46 disks available in the system for the ZFS pool; there are 48 disks in a Sun Fire X4500 but I am skipping the boot disks (c5t0d0 & c5t4d0).
Example 1: Script to create one big ZFS pool of eight RAID-Z stripes built across the controllers on a SunFire X4500, no hot spares.
#! /bin/sh
zpool create -f bigpool \
raidz c0t0d0 c1t0d0 c4t0d0 c6t0d0 c7t0d0 \
raidz c0t1d0 c1t1d0 c4t1d0 c5t1d0 c6t1d0 c7t1d0 \
raidz c0t2d0 c1t2d0 c4t2d0 c5t2d0 c6t2d0 c7t2d0 \
raidz c0t3d0 c1t3d0 c4t3d0 c5t3d0 c6t3d0 c7t3d0 \
raidz c0t4d0 c1t4d0 c4t4d0 c6t4d0 c7t4d0 \
raidz c0t5d0 c1t5d0 c4t5d0 c5t5d0 c6t5d0 c7t5d0 \
raidz c0t6d0 c1t6d0 c4t6d0 c5t6d0 c6t6d0 c7t6d0 \
raidz c0t7d0 c1t7d0 c4t7d0 c5t7d0 c6t7d0 c7t7d0
Example 2: Script to create one big ZFS pool on a SunFire X4500, made up of mirrors split across controllers. Assigns two disks as hot spares:
#! /bin/sh
zpool create -f bigpool \
mirror c0t0d0 c1t0d0 \
mirror c4t0d0 c6t0d0 \
mirror c0t1d0 c1t1d0 \
mirror c4t1d0 c5t1d0 \
mirror c6t1d0 c7t1d0 \
mirror c0t2d0 c1t2d0 \
mirror c4t2d0 c5t2d0 \
mirror c6t2d0 c7t2d0 \
mirror c0t3d0 c1t3d0 \
mirror c4t3d0 c5t3d0 \
mirror c6t3d0 c7t3d0 \
mirror c0t4d0 c1t4d0 \
mirror c4t4d0 c6t4d0 \
mirror c0t5d0 c1t5d0 \
mirror c4t5d0 c5t5d0 \
mirror c6t5d0 c7t5d0 \
mirror c0t6d0 c1t6d0 \
mirror c4t6d0 c5t6d0 \
mirror c6t6d0 c7t6d0 \
mirror c0t7d0 c1t7d0 \
mirror c4t7d0 c5t7d0 \
mirror c6t7d0 c7t7d0 \
spare c7t0d0 c7t4d0
ZFS will dynamically stripe data across all the components in the pool.
In both cases the pools will be mounted automatically as /bigpool.
This Sun Fire X4500 disk planner can also be useful.
Posted at 12:31PM Aug 30, 2007 in Storage | Comments[4]
i normally leave the c5t?d0's out and make a smaller pool with this or reserve them for spares later - otherwise you end up with uneven raidz stripe units .. it shouldn't really be a problem with dynamic striping, but it just looks a little cleaner
Posted by jon e on August 31, 2007 at 07:32 PM BST #
Thanks Jon, I have wondered myself about the effect of the stripes being a different length...Tim
Posted by Tim Thomas on August 31, 2007 at 09:46 PM BST #
Hi,
Thanks for an interesting post!
In example 1, how much will be usable disk space?
Regards,
Daniel
Posted by Daniel Kertby on October 10, 2007 at 05:32 PM BST #
I don't have the exact configuration set up right now, but I would estimate the usable space as follows: 500GB SATA disks have a usable capacity, as seen by Solaris of, 466 GB. Doing the maths, taking into account RAID-Z parity overhead by removing the capacity of one disk from each stripe, we get : (2*4+6*5)*466/1024=17.3 TB usable.
We have no hot spares in this configuration...I will post an example with hot spares later today.
Posted by Tim Thomas on October 11, 2007 at 10:21 AM BST #