RAID 6 with FreeBSDThe most likely components to fail in our Home Gateway server will first be fans, followed by the hard drive and then the power supply. Fans can be replaced as can power supplies. When hard drives fail, any data on them is lost. Although hard drives have become much more reliable, data protection and recovery techniques are still used in IT (information technology) S.O.P (standard operating procedures). The simplest data protection scheme which we can configure is the use of two identical hard drives with disc mirroring or what is technically referred to as RAID 1 (raid one). RAID stands for Redundant Array of Independent Disks. If you are going to build a Home Gateway using SSD drives, then employing RAID may not be required. But for mechanically spinning discs, RAID is highly recommended to keep a server working in the event of a single hard disk failure. During the installation of FreeBSD, RAID 6 (ZFS RAID-Z2) configuration is done during the Partitioning step. This guide will continue that step and setup eight drives for RAID 6. STEP 1 - Partitioning Method +------------------------Partitioning---------------------------+ | How would you like to partition your disk? | | +-----------------------------------------------------------+ | | | Press [Enter] on Auto (ZFS) to use the Auto (ZFS) partitioning tool. ZFS (Zettabyte File System) is required for software mirroring or RAID disks) STEP 2 - ZFS Configuration +----------------ZFS Configuration-------------------+ | Configure Options: | | +------------------------------------------------+ | | | >>> Install Proceed with Installation | | | |[Arrow] down to select Pool Type/Disks and press [Enter] STEP 3 - ZFS Configuration (cont.) +----------------ZFS Configuration-------------------+ | Select Virtual Device type: | | +------------------------------------------------+ | | | stripe Stripe - No Redundancy | | | | mirror Mirror - n-Way Mirroring | | | | raid10 RAID 1+0 - n x 2-Way Mirrors | | | | raidz1 RAID-Z1 - Single Redundant RAID | | | | [Arrow] down to select raidz2 RAID-Z2 - Double Redundant RAID and press [Enter] A list of all drives will be displayed. Use the [Arrow] down key and the [Space] key to select the drives for the RAID array. In this example, 8 hard drives have been selected for the RAID. Warning, da0 is our USB installation drive, don't select it! +----------------ZFS Configuration-------------------+ | | | +------------------------------------------------+ | | | [*] ada0 WD WD40EFZX | | | | [*] ada1 WD WD40EFZX | | | | [*] ada2 WD WD40EFZX | | | | [*] ada3 WD WD40EFZX | | | | [*] ada4 WD WD40EFZX | | | | [*] ada5 WD WD40EFZX | | | | [*] ada6 WD WD40EFZX | | | | [*] ada7 WD WD40EFZX | | | | [ ] da0 Philips USB Flash Drive | | | +------------------------------------------------+ | | | +----------------------------------------------------+ |[Tab] to OK when ready and press [Enter] +----------------ZFS Configuration-------------------+ | Configure Options: | | +------------------------------------------------+ | | | >>>Install Proceed with Installation | | | | T Pool Type/Disks: raidz2: 8 disks | | | | - Rescan Devices * | | | | - Disk Info * | | | | N Pool Name zroot | | | | 4 Force 4K Sectors? YES | | | | E Encrypt Disks? NO | | | | P Partition Scheme GPT (BIOS) | | | | S Swap Size 2g | | | | M Mirror Swap? NO | | | | W Encrypt Swap? NO | | | +------------------------------------------------+ | | | +----------------------------------------------------+ |If the Pool Type/Disks is correct, press [Enter] on Install Just press [Enter] to use the entire disk for FreeBSD. STEP 4 - Final Confirmation +------------Confirmation------------------------+ | Last Chance! Are you sure you want to destroy | | the current contents of the following disks: | | | | ada0 ada1 ada2 ada3 ada4 ada5 ada6 ada7 | | | +------------------------------------------------+ | Note: If this is NOT what you want to do, use [Tab] to select 'No'. The installation extraction will proceed. It is very quick. For more information, see the FreeBSD Handbook. Continue with STEP 11 in FreeBSD Installation |