[LUNA] FreeBSD ZFS 'RAID0' setup ....

Kris Kirby kris at catonic.us
Sat Jul 5 22:59:25 CDT 2014


On Thu, 3 Jul 2014, William A. Mahaffey III wrote:
> The machine will be rsynced nightly (at least) & tar-bziped twice 
> weekly, & w/ all new 2.5" drives, good cooling, etc. I don't expect 
> trouble, & will be well prepped if it rears its ugly head. Thus I 
> would like to RAID-0 (stripe) the 4 ZFS partitions. I located several 
> very detailed tutorials, notably 
> https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE, which walk 
> you through everything in gory detail, except for that 1 question. is 
> it possible to just stripe ZFS partitions ? I thought I remembered 
> reading that somewhere, but failed to bookmark it & haven't been able 
> to re-acquire it .... Any help appreciated ....

Note that / is always mounted on an "a" partition, so mirrors of / 
should use the "a" slice of the disklabel, whereas normally defined 
slices will take d or e. The BSD disklabel is a sub-partition table that 
SunOS4 and Solaris understand; it allows for eight partitions under it, 
a-h. Whereas Linux chose to depend on the PC extended DOS partition 
table until LVM came along.

ad0s1a (usually root /)
ad0s1b (usually swap)
ad0s1c (whole disk, IIRC)
ad0s1d (1st partition, i.e.: /usr)
ad0s1e (2nd partition, i.e.: /home)
ad0s1f (3rd partition, i.e.: /var)
ad0s1g (4th partition, i.e.: /opt)
ad0s1h (5th partition, i.e.: /var/log)

Stripe-n:
zpool create stripepool ad0s1a ad1s1a ad2s1a ad3s1a adns1a

RAID1:
zpool create mirroredpool mirror ad0s1a ad1s1a

Complex designs, create one part then add the other.

http://www.zfsbuild.com/2010/05/26/zfs-raid-levels/

So to make it a stripe instead of a mirror, leave off the mirror 
keyword/command when creating the ZFS pool.

--
Kris Kirby, KE4AHR
Disinformation Architect


More information about the LUNA mailing list