PFSenseDevWiki : CreatingASoftRaid1

PfSenseDevHome :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Creating a raid 1 array with pfSense


WARNING! THIS PAGE IS NOT COMPLETE YET. WIP.


NOTE: requires snapshot RELENG_07_07_06 or better. Updated for RELEASE.

This may break your car, eat your cat, submerge your basement in water, etc. Don't blame us for damage, it's unsupported!

These instructions assume that you are using ad0 (first IDE drive and ad1 which is the second IDE drive). SCSI drives will be da0 and da1. YMMV.


# Create our mount point and mount volume
mkdir /tmp/tmp; mount /dev/ad0s1a /tmp/tmp
# Change ad to gm/mirror
sed “s%ad%mirror/gm%” /tmp/tmp/etc/fstab > /tmp/tmp/etc/fstab.new
# Move new file into place
mv /tmp/tmp/etc/fstab.new /tmp/tmp/etc/fstab
# Enable gmirror on boot
echo geom_mirror_load="YES" >> /tmp/tmp/boot/loader.conf
# We are done with volume, dismount
umount /tmp/tmp

NOTE: You can also use these types instead of round-robin, if you so wish:
- load : Read from the component with the lowest load.
- prefer : Read from the component with the biggest priority.
- round-robin : Use round-robin algorithm when choosing component to read.
- split : Split read requests, which are bigger than or equal to slice size on N pieces, where N is the number of active components.


# Enable footshooting
sysctl kern.geom.debugflags=16
# Tell gmirror to create raid0 array /dev/ad0 should be the disk you have the pfsense install on already.
gmirror label -v -b round-robin gm0 /dev/ad0
# Tell geome to automatically rebuild array
gmirror configure -a gm0
# Add the second disk to the mirror 
gmirror insert gm0 /dev/ad1
# Wait until the mirror builds
gmirror status
# Exit when it's 100%
exit



Oh, and check out this article which goes into a little more detail.

Categories
CategoryHowTo

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3
Page was generated in 0.1189 seconds