I have a machine set up that houses 5 drives.
Drive 1 is a 500g, while drives 2,3,4,5 are all 1TB.
I want to use the 500g drive for the program, while 2-5 are for a Raid 5 setup.
Can any one point me in the direction of a post or article on how to set it up.
Thanks
carltonb
How to Raid 5 with 5 drives
Re: How to Raid 5 with 5 drives
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*
Then save the config to disk:
Create a volume group with a logical volume on the disk for you data:
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:
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:
Now we test the filesystem:
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:
Last part: unmount the filesystem and make sure that the disks are mounted at boot time:
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.
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]
Code: Select all
mdadm -D -s > /etc/mdadm.conf
Code: Select all
pvcreate /dev/md1
vgcreate vgdata /dev/md1
vgdisplay
Code: Select all
Free PE / Size 2305 / 9.00 GB
lvcreate -l 2305 -n lvdata vgdata
mkfs.ext4 /dev/vgdata/lvdata
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
Code: Select all
mount /dev/vgdata/lvdata /var/hda/files
mount
Now we move the files back to where they belong:
Code: Select all
mv /tmp/tempfiles/* /var/hda/files
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
Check if the line has been added correctly & mount the filesystem
Code: Select all
cat /etc/fstab
mount -a
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Re: How to Raid 5 with 5 drives
I do not want to hijack this topic, but i have also a few question about raid, spin down raid arrays, rebuilding raid arrays. You now a lot about Linux moredruid. I will open a new topic for these questions when i have time. 

My HDA cpu: E1400 2Ghz; motherboard: Gigabyte GA-G33M-S2H; memory: Team 2Gb DDR2; 200GB OS HDD, 2x western digital GP 1TB storage HDDs; case: Antec P182
Re: How to Raid 5 with 5 drives
sure, shoot... 
it might indeed be interesting to have some kind of reference for setting up RAID.

it might indeed be interesting to have some kind of reference for setting up RAID.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Who is online
Users browsing this forum: No registered users and 12 guests