HOWTO setup software raid 0 on freebsd using gconcat
From Chaos
Contents |
Summary
I created this article to quickly remind me how I setup my 4-disk concatenated device using gconcat.
Details
Setup Drives
First, run /stand/sysinstall, and delete any current paritions on the drives (my drives are ad4, ad6, ad8, and ad10). This step isn't strictly needed, but good to do anyways. When you select the drive in fdisk, make sure to push 'a' (use entire disk). Write changes and quit.
Setup gconcat
This is the easy part. Simply run the following command:
| root@localhost:~# gconcat label -v backup /dev/ad4 /dev/ad6 /dev/ad8 /dev/ad10 |
Once the above is completed, all gconcat data should be stored on the last sector of each disk. Format the new volume by doing this:
| root@localhost:~# newfs /dev/concat/backup |
Once that is done, simply mount the drive, and you should be set:
| root@localhost:~# mount /dev/concat/backup /usr/home/backup |
Check the available disk space by running 'df -h':
root@localhost:~# df -h Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 505M 291M 174M 63% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad0s1d 505M 80K 465M 0% /tmp /dev/ad0s1e 34G 21G 10G 68% /usr /dev/ad0s1f 505M 214M 251M 46% /var linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc procfs 4.0K 4.0K 0B 100% /proc /dev/concat/backup 584G 4.0K 538G 0% /usr/home/backup
Next Boot
To start gconcat on next boot, add the following line to /boot/loader.conf:
geom_concat_load="YES"
Of course, you will need to have an entry in /etc/fstab to mount the gconcat volume as well. I leave this as an exercise for the reader.