Well, just install everything as per the instructions on the Amahi site. Leave the disks you want to use as the RAID 5 set untouched.
When the install is finished you can create the RAID array as follows (if you've installed your OS on /dev/sda):
*work as root on a terminal*
Code: Select all
mdadm --create /dev/md1 --level=5 /dev/sd[bcde]
Then save the config to disk:
Create a volume group with a logical volume on the disk for you data:
Code: Select all
pvcreate /dev/md1
vgcreate vgdata /dev/md1
vgdisplay
Here you will see the output of the volume group, note the "free PE" number and put that number behind the -l option in the lvcreate line:
Code: Select all
Free PE / Size 2305 / 9.00 GB
lvcreate -l 2305 -n lvdata vgdata
mkfs.ext4 /dev/vgdata/lvdata
I chose the ext4 filesystem, but if you want a different filesystem (ext3, reiserfs, xfs) you can do that if you want, you just need to substitute the mkfs command with the option you want.
Now we need to set it all up so you can actually use it. First we need to temporarily copy everything in /var/hda/files to a different folder:
Code: Select all
mkdir /tmp/tempfiles
mv /var/hda/files/* /tmp/tempfiles
Now we test the filesystem:
Code: Select all
mount /dev/vgdata/lvdata /var/hda/files
mount
You'll see that the logical volume is mounted on /var/hda/files. You can also type "df -h" and you'll see that /var/hda/files has tons of free space.
Now we move the files back to where they belong:
Code: Select all
mv /tmp/tempfiles/* /var/hda/files
Last part: unmount the filesystem and make sure that the disks are mounted at boot time:
Code: Select all
umount /var/hda/files
cp /etc/fstab /etc/fstab.backup
echo "/dev/vgdata/lvdata /var/hda/files ext4 defaults 1 2" >> /etc/fstab
Make sure the whitespace is preserved when copying the last line!
Check if the line has been added correctly & mount the filesystem
If you get no errors on the last command (mount) the filesystem is up and will be brought back up at subsequent bootups.