Difference between revisions of "RAID 1"
m (Reverted edits by Acecydoxose (Talk) to last revision by Orbit77) |
|||
Line 51: | Line 51: | ||
<li>File system type: Software RAID</li> | <li>File system type: Software RAID</li> | ||
<li>Allowable drives: tick the first (in my case 'sda')</li> | <li>Allowable drives: tick the first (in my case 'sda')</li> | ||
− | <li>Size: 100 MB</li> | + | <li>Size: 100 MB (300MB for Fedora 12)</li> |
<li>Additional size options: Fixed size</li> | <li>Additional size options: Fixed size</li> | ||
<li>Force to be primary partition: tick</li> | <li>Force to be primary partition: tick</li> | ||
Line 77: | Line 77: | ||
<li>To set up each of the extra partitions on the drive repeat steps 15 to 19 (once for each new partition). These are the changes to make each time:</li><ol> | <li>To set up each of the extra partitions on the drive repeat steps 15 to 19 (once for each new partition). These are the changes to make each time:</li><ol> | ||
<li>Change sizes in 15.3 The sizes I have used are:</li><ol> | <li>Change sizes in 15.3 The sizes I have used are:</li><ol> | ||
− | <li>/boot 100MB</li> | + | <li>/boot 100MB (300MB for Fedora 12)</li> |
<li>/usr 20000MB</li> | <li>/usr 20000MB</li> | ||
<li>/ 8000MB</li> | <li>/ 8000MB</li> | ||
Line 95: | Line 95: | ||
<li>Add the Amahi repository with the following information:</li><ol> | <li>Add the Amahi repository with the following information:</li><ol> | ||
<li>Repository name: amahi</li> | <li>Repository name: amahi</li> | ||
− | <li>Repository URL: http://f10.amahi.org</li></ol> | + | <li>Repository URL: http://f10.amahi.org (http://f12.amahi.org for Fedora 12)</li></ol> |
<li>I've also added the additional repository shown to me:</li><ol> | <li>I've also added the additional repository shown to me:</li><ol> | ||
<li>Installation Repo</li></ol> | <li>Installation Repo</li></ol> | ||
Line 101: | Line 101: | ||
<li>Wait while all that downloads and installs.</li> | <li>Wait while all that downloads and installs.</li> | ||
<li>Take the Fedora DVD out of the drive.</li> | <li>Take the Fedora DVD out of the drive.</li> | ||
+ | <li>For Fedora 12 we need to make our /boot partitions bootable in fdisk</li> | ||
+ | <ol><li>Press Ctrl+Alt+Shift+F2 on your keyboard to get a shell prompt</li> | ||
+ | <li>Type fdisk /dev/sda followed by the Enter key</li> | ||
+ | <li>Type p followed by the Enter key</li> | ||
+ | <li>Type a followed by the Enter key</li> | ||
+ | <li>Type the number of your first linux raid autodetect partition followed by the Enter key</li> | ||
+ | <li>Type w followed by the Enter key</li> | ||
+ | <li>Repeat for /dev/sdb</li></ol> | ||
<li>Click 'Reboot'.</li> | <li>Click 'Reboot'.</li> | ||
<li>Follow the on screen instructions.</li> | <li>Follow the on screen instructions.</li> |
Revision as of 03:25, 2 December 2010
Installing Amahi with RAID 1 in 2HDD setup. See this other page for RAID5.
Also see another users setup of #RAID 1 with 3 HDDs.
So, to set the scene. I'm pretty much totally new to Linux and I'm just an enthusiastic amateur when it comes to computers in general.
I'm setting up Amahi to use as a server for home and and home office for a new business I'm setting up. So it'll mainly store music and film files for home use and documents for work which will be accessed through a VPN. I may also use it to host a CRM system later.
I wanted to record this partly for myself, so when I realise I've gone wrong and have to do it all again I can see where, but also as my way of contributing. I've relied so much on others putting info up on fora, wikis etc. I hope this will be of use to someone else.
What I'm using:
- Router with internet connection providing DHCP, connected to
- Server (in my case an HP Proliant ML110 G5; Intel Xeon Dual Core 3065 @ 2.33 GHz; 3RG RAM)
- 2 x 250GB Hard disk drives (in the server)
- Keyboard and mouse attached to server
- Fedora 10 DVD
- Laptop to read instructions from (and type out these notes)
- Registration details from the Amahi site.
Sites I'm using for info:
- http://www.ping.co.il/node/1/ - how to set up RAID with Disk Druid
- http://docs.fedoraproject.org/install-guide/f10/en_US/ch-disk-partitioning.html#sn-partitioning-raid - guide for installing Fedora 10
- http://forums.fedoraforum.org/archive/index.php/t-323.html - advice on partition sizes
- http://www.amahi.org/support/instructions - Instructions for installing Amahi
- http://www.linuxsa.org.au/tips/disk-partitioning.html - explains which partitions are used for what.
- http://orangespike.ca/?q=node/34 - more help with Fedora RAID
N.B. This installation is to install a completely fresh system with no dual-boot. All data on the drives will be wiped.
Installing Fedora 10
- Insert the Fedora disk into the server's DVD drive.
- Turn the server on.
- Select 'install or upgrade an existing system'.
- When asked, test the media (DVD) - just to make sure you won't get any surprises with it hanging on a dodgy disk.
- When the Screen comes up, click 'Next'.
- Chose your language.
- Chose your keyboard.
- Set a name for your computer and domain, or leave this as the default; click 'Next'.
- Select your time zone; click 'Next'.
- Set a root password (make a note of it); click 'Next'. Creating RAID partitions
- Select 'create custom layout'; click 'Next'.
- If your drives are already partitioned, delete all the various partitions, by selecting them and clicking 'delete'.
- Click 'RAID'.
- Select 'Create a software RAID partition.'; click 'OK'.
- Set the following options:
- File system type: Software RAID
- Allowable drives: tick the first (in my case 'sda')
- Size: 100 MB (300MB for Fedora 12)
- Additional size options: Fixed size
- Force to be primary partition: tick
- Click 'OK'.
- Repeat step 15, but in 15.2 tick the second drive (sdb)
- Click 'RAID'.
- Select 'Create a RAID device'; click 'OK'.
- Set the following options:
- Mount point: /boot
- File system type: ext3
- RAID device: md0
- RAID level: Level 1
- Raid members: tick both drives
- Click 'OK'.
- Select the 'Free space' on your first hard drive.
- Click 'New'.
- Set the following options:
- Mount point: [just leave this]
- File System Type: swap
- Allowable drives: tick the first
- Size: 2 x RAM (in my case 2 x 3GB = 6,000MB)
- Additional size options: Fixed size
- Click 'OK'
- Repeat step 22, but ticking the second drive in 22.3
- To set up each of the extra partitions on the drive repeat steps 15 to 19 (once for each new partition). These are the changes to make each time:
- Change sizes in 15.3 The sizes I have used are:
- /boot 100MB (300MB for Fedora 12)
- /usr 20000MB
- / 8000MB
- /var 5000MB
- /tmp 5000MB
- /home 10000MB
- /var/hda/files (what was left - this is where Amahi stores all your shared folders)
- Do not force to be primary partition in 15.5
- Use whatever RAID device is the default in 19.3
- Click 'Next'
- Click 'write changes to disk'. THIS WILL WIPE ALL YOUR DATA ON YOUR DISKS. Completing Fedora install
- When asked, tick 'Install boot loader on /dev/md0'; Click 'Next'.
- Deselect Office and Productivity, unless you want it (e.g. to simultaneously use your HDA as a desktop)
- Click on the "Add additional software repositories" button. If asked, enable your network interface.
- Add the Amahi repository with the following information:
- Repository name: amahi
- Repository URL: http://f10.amahi.org (http://f12.amahi.org for Fedora 12)
- I've also added the additional repository shown to me:
- Installation Repo
- Proceed by clicking "Next" to the completion of the Install.
- Wait while all that downloads and installs.
- Take the Fedora DVD out of the drive.
- For Fedora 12 we need to make our /boot partitions bootable in fdisk
- Press Ctrl+Alt+Shift+F2 on your keyboard to get a shell prompt
- Type fdisk /dev/sda followed by the Enter key
- Type p followed by the Enter key
- Type a followed by the Enter key
- Type the number of your first linux raid autodetect partition followed by the Enter key
- Type w followed by the Enter key
- Repeat for /dev/sdb
- Click 'Reboot'.
- Follow the on screen instructions.
- Create a new (non-root) user, giving a password (write it down); Click 'Forward'.
- Set the date and time; Click 'Forward'.
- Select 'send profile'; Click 'Finish'.
- Log in using the username and password you created in step 37. Install Amahi
- Open a terminal (Applications > Sytem Tools >Terminal).
- Type the following commands (press [Enter] after each):
- su -
- [your root password]
- hda-install [the code Amahi gave you]
- If SELinux throws up any errors (shows what looks like a sheriff's star in the top bar, double-click it) read each one and follow the instructions.
- Reboot (may not be necessary - but I was having trouble so decided to reboot after each stage to figure out what the problem was).
- Log in.
- Open a terminal window.
- Type the following commands (press [Enter] after each):
- su -
- [your root password]
- grub
- device (hd0) /dev/sda
- root (hd0,0)
- setup (hd0)
- device (hd1) /dev/sdb
- root (hd1,0)
- setup (hd1)
- Close the terminal window. Check RAID is working
- You can test whether RAID is working by shutting down the server, disconnecting on of the drives and seeing whether it boots when you turn it back on. If it does, shut it down again, disconnect the other drive and reconnect the first one and try to boot from that drive. If it boots from both, everything is ok.
- Log back in to your system and check for and install any other updates (go to System > Administration > Update System then follow the instructions to install the updates you want).
- Once everything has updated, reboot the server.
- Once you've logged back in to Fedora, open another terminal.
- Become root, by typing:
- su -
- [enter your root password]
- You can now check your RAID drives by typing:
- mdadm --detail /dev/md0 [then add another /dev/md... for each extra RAID you set up - so for me I went from md0 to md5]
- You can then set up monitoring so that it will email you if anything goes wrong by typing:
- mdadm --monitor --scan --mail=you@domain.com delay=3600 --daemonise /dev/md0 /dev/md1 /dev/md2 /dev/md3 /dev/md4 /dev/md5
- THIS STEP (56) HAS BEEN CAUSING MY COMPUTER TO HANG DURING BOOT, SO I HAVEN'T IMPLEMENTED IT IN THE END. You may choose to use it (hopefully someone with more understanding than me will see what I've got wrong and change this page to corect it). To ensure that this is running whenever you start the server apparently this should be put into /etc/rc.local. You can do this by entering:
- nano /etc/rc.local
- In the window that opens add the following line at the end: mdadm --monitor --scan --mail=you@domain.com delay=3600 --daemonise /dev/md0 /dev/md1 /dev/md2 /dev/md3 /dev/md4 /dev/md5
- Save and Exit nano
- Reboot
- Now you can go to http://hda to set up your Amahi server.
Make both HDDs bootable (so if one fails you have an exact copy - that's the point of RAID isn't it?)
Set up monitoring of RAID
I hope this helps, but please feel free to correct anything I've got wrong. I've really been feeling my way here, so I can't guarantee that any of the above will work or work seamlessly, but I hope it will.
RAID 1 with 3 HDDs
I'm another user who's also using RAID 1and wanted to give back a bit to the community, so I thought I'd describe my setup.
I have 3 HDDs: sda is a 40GB sdb and sdc are 1.5 TB each
I reinstalled everything to create the RAID 1 array and to update my system to Fedora 12 (so make a backup of everything first!). With all three drives installed, during the partitioning stage of the Fedora install I did the following (see steps 11-19 above for more details):
sda - formatted with a / partition and swap
sdb - click on RAID, create a software RAID partition, made it the maximum size of the disk
sdc - same as for sdb
I then created a single RAID 1 volume using sdb and sdc and mounted it as /var/hda/files
With this done, you proceed with the rest of the Fedora/Amahi instalation as per the Amahi documentation.
With this setup, all my personal files and media will be stored on my RAID 1 array, while the Fedora and Amahi filesystems and programs will be on sda primary drive. This allows you to update Fedora and/or Amahi with much less risk to your personal files.
Please add any other comments/corrections/suggestions as you see fit, and thanks to the first user who started this section and inspired to me ccontribute as well.