Raid 0 (striping) in Mepis???
Posts: 49
Thank you for reading this.
I have searched high and low and i cannot find anything that shows me how to get Mepis to recognize my striped Maxtor drives. And what i did find about striping, no one had replied to them. Does anyone know how to do this? I would love to install mepis on that instead.
My drives are striped with the integrated silicon controller on my Asus 8N-SLI Premium Motherboard. It works just fine with Windows (just need to add a driver) but linux sees them as two seperate hard drives.
Any help would be greatly appreciated.
Thanks!
Hmm
Posts: 49
Thank you for your reply. I've printed the page out. Am i wrong in assuming that this guide is only for mirroring (Raid 1), not stripping (Raid 0)? I've looked at some of the commands for setting up the drive and it seems to be for mirroring. Is there also a guide for stripping hard drives? And if not would it be possible to use this same guide except get different commands to edit the initrd file as per the instructions?
Thanks!
indeed...
Posts: 2299
the page is only about RAID 1. My educated guess is it should not be too different for RAID 0, since the way the driver gets invoked and the way the OS handles it should more or less be the same.
That being said, I find disk striping a very dangerous option. You might win some performance when reading from disk (though I doubt that, since the fake raid hardware is not real 'ACME' stuff), but it will also increase your risk of HD failure and serious data loss.
If I were you, to gain performance I'd use one disk to setup my root and swap partition, and the other one for home. That way you gain performance and can more easily find a solution to backup data (using rsync to copy your home dir to the first drive every hour or so).
But hey, that's only my opinion.
Newbie or not Newbie, there's always a question
Indeed
Posts: 49
That sounds like a good idea to me. I've just heard that stripping makes it faster but if it's dangerous then what's the point? Being that i am very new at this could you tell me how to do that? As of right now i have linux on neither one of the drives, it's on a third (Non SATA).
So would i just follow the instructions i printed off. Then i would install root and swap to SBA1 and my home to SBA2. Then i could use my third and slower hard drive for storage. Tell me, am i correct so far?
Then how would i rsync to copy my home dir every hour? This is something i don't know how to do. Is this also in that list of instruction? I'll look to be sure.
Mmm, being new to this I
Posts: 2299
Mmm, being new to this I would recommend you take it one step at a time.
Since Mepis does not support installing root and home on different drives, I would recommend taking it one step at a time.
Just go ahead with the Linux install on the IDE drive, and let root and home be on the same drive, but preferably on different partitions. E.g. root on /dev/hda2 and home on /dev/hda3 or whatever.
To create the backup solution, do the following:
1. Have a partition available on one of the SATA drives to store a copy your home. Let's say this is /dev/sda1
2. When rebooting Mepis, as root, open /etc/fstab and find the line that starts with /dev/sda1. It will be in the dynamic section. Move it to the static section and change 'noauto' to 'auto', so as to mount it.
3. As root, create a text file, name it 'synchome' and save it in /usr/bin. Paste in the following content:
#! /bin/sh
mount /dev/sda1 /mnt/sda1
rsync -a --delete --exclude=smb4k/ /home /mnt/sda1
Go to /usr/bin and make executable: chmod +x synchome
The mount is just to make sure...
The rsync command will copy (first complete, afterwards only the changes) your home, delete files on the 2nd partition that have been deleted in the original and excludes info on mounted samba shares.
4. As root, open etc/crontab and add the following line;
11 * * * * root nice -5 /usr/bin/synchome
Every 11th minute ot the hour, the script will be laucnhed, running with a niceness of 5 (so as not to interfere with desktop activities too much).
That's it, you now should have an automated backup of your home folders.
If this all works satisfactorily, we can discuss moving home to another drive.
Newbie or not Newbie, there's always a question

Another Suggestion
Posts: 5513
Carlops, good suggestion.
Arak, good questions.
Here is another suggestion that I have used on my home systems as well as on some systems for a client of mine who has three systems using Mepis.
On each of my "main boxes" I have two hard drives. They happen to be 40 GB drives. On the "first drive", we'll call hda I have swap, "root" and "/home". I happen to be using hdb as my cdrom drive. So my "entire system" is running on hda. Next, my "backup drive" is hdc. I have it layed out identically to hda. Same partitions, sizes, names. Normally, that drive "just sits there". But I have created "mount points" from "root". Here is my partial /etc/fstab file:
cat /etc/fstab # Static entries below, do not use 'users' option in this area /dev/hda1 swap swap sw,pri=1 0 0 /dev/hda5 / reiserfs defaults,noatime 1 1 /dev/hda6 /home reiserfs defaults 1 2 /dev/hdc1 swap swap sw,pri=1 0 0 /dev/hdc5 /backup/root reiserfs ro 1 1 /dev/hdc6 /backup/home reiserfs ro 1 2
I have created a script using rsync to copy the entire system from the "live" drive to the "backup" drive. I have successfuly "restored" using the backup drive and even rebotted from the second drive. But the rebooting also required "reloading grub" so it's not perfect. Also, I have not tested this in all situations, so I am offering no warrantee for its success. But feel free to examine and use this script or modify it for your needs. Copy/paste the following items into their respective names.
The first, and main script is /root/bin/rsync (not the same as the "rsync" command):
#!/bin/bash # /root/bin/rsync # 2005-09-21 # Jon Du Quesne# Back up main system directories but exclude /home
# which will be done separately#LOG=/root/bin/rsync.log
LOG=/var/log/backup/rsync.log
#if [ -f $LOG ] ; then
# rm $LOG
#fi
#touch $LOGecho "rsync started "`date` >> $LOG
# Mount target directories read/write
umount /backup/root
umount /backup/home
mount -o rw,noatime /dev/hdc5 /backup/root
mount -o rw,noatime /dev/hdc6 /backup/homeSRC_DIRS="/bin /boot /dev /etc /lib /lost+found /mnt /opt /root /sbin /tmp /usr /var"
#SRC_DIRS="/bin /boot"
for src_dir in $SRC_DIRS ; do
if [ -d $src_dir ] ; then
TRG_DIR="/backup/root$src_dir"
echo -e "\nCopying $src_dir to $TRG_DIR" >> $LOG
rsync -av --delete $src_dir/ $TRG_DIR 2>&1 >> $LOG
fi
done# Back up the /home directory
src_dir="/home"
if [ -d $src_dir ] ; then
TRG_DIR="/backup$src_dir"
echo -e "\nCopying $src_dir to $TRG_DIR" >> $LOG
rsync -av --delete $src_dir/ $TRG_DIR 2>&1 >> $LOG
fi# Make empty home, proc and sys directories on /backup/root
echo -e "\n" >> $LOG
FAKE_DIRS="/backup/root/backup /backup/root/backup/archive /backup/root/backup/home /backup/root/backup/root /backup/root/home /backup/root/proc /backup/root/sys"
for fake_dir in $FAKE_DIRS ; do
if [ -d $fake_dir ] ; then
cmd="rm -r "$fake_dir
echo -e "$cmd" >> $LOG
$cmd 2>&1 >> $LOG
fi
cmd="mkdir "$fake_dir
echo -e "$cmd" >> $LOG
$cmd 2>&1 >> $LOG
done# Mount target directories read only
umount /backup/root
umount /backup/home
mount -o ro /dev/hdc5 /backup/root
mount -o ro /dev/hdc6 /backup/homeecho "rsync completed "`date` >> $LOG
# Mail results of rsync to root
#mail -s rsync.log root < $LOG
Next, is /root/bin/rsync.conf. This is a configuration file, that, quite honestly, I don't think I'm currently using 
#!/bin/bash
# /root/bin/rsync.conf
# 2005-06-15
# Jon Du Quesne# Configuration file for /root/bin/rsync command
#
# Set up the activity log. This will eventually be sent to root
#
LOG=/root/bin/rsync.log#
# Set whether to mail log
# MAILLOG is flag of whether to send the log via email. 0=Don't send, 1=Send
MAILLOG=1
# MAILTO is the email recipent
MAILTO="root"
#
# Set archive directory location
# TRGHOST is the remote host name
TRGHOST=""
# TRGACT is the remote account
TRGACT=""
# TRGDIR is the target directory where the backups will be kept
TRGDIR=""#
# Set directories to backup
# SRCDIRS is a list of /fully/qualified/path/names, placed between quotes
# and separated by spaces
#SRCDIRS="/bin /boot /dev /etc /home /lib /mnt /opt /root /sbin /tmp /usr /var"
The various rsync options are shown in the script.
Finally, I have a cron job that runs every four hours.
# crontab -l
0 0,4,8,12,16,20 * * * /root/bin/rsync 2>&1 >> /var/log/backup/rsync.log
Do you have "logrotate" installed on your box? I have that command to create/compress/delete my old rsync.log files. Very useful sysadmin tool 
Let me know what you think and if I can help further 
Jon
Ok
Posts: 49
All of this is so complex. Before i go further, would it be alright to allow mepis to format my entire disk or should i break it down into partitions? Linux is very unfamiliar to me and this alot to take in. I think i need some baby steps. I think half of my troubles are that i cannot even get to your instructions mainly because when i attempt to install Mepis on Sda, it usually stops installing at some point. Any suggestions on how to get past this point? I think once i get past it i will be ready for the next steps.
a slight problem
Posts: 49
One problem i have run into is that i haven't even been able to get far enough to use your direction. The reason being:
When i format using the Sata drives something happens.
If i keep the two drives seperate in Bios and try to install Mepis, it tells me to install a disk for an operating system (even after the install on the disk).
However, if i connect the two together with my motherboard (cause i connect them to the motherboard) and try to install on SBA1, it will boot after install and then pause at the word 'GRUB'.
I would like to follow your instructions but it seems i can't get it to function at all. Any ideas?
What about Linux builtin raid support!!!
Posts: 4
The idea of syncing the drives every so often (I don't care how often) is silly. The whole idea of mirroring (raid 1) is that the two drives are identical at all times so that if one fails the other is ready to take over without operator intervention. With good software the failure of a drive in a raid setup results in the online user and/or the system administrator being notifiy of the problem by email or instant msg.
And why, as somebody suggested, does stripping add any extra wear and tear to HDDs, how does it make the data loss anymore likely.
somebody seems to have missed the whole point of a raid setup!!!
In MEPIS I cannot find any reference to the built in software raid capabalities of Linux. What happened to it, where did it go, why is not it available at install. In all the other distros that I have looked at I have been able to setup various raid configurations at install, and I am not talking about "fake raid".
I happen to have 4 100GB IDE drives that I want to configure as raid 5, but as far as I can see MEPIS does support raid at all.
I am very disappointed, I had heard good things about MEPIS but it seems I was misled. so I am off to take a second look at Fedora or Debian.
ANO

klam, What are you, exactly,
Posts: 1634
klam,
What are you, exactly, relying upon for the array; a motherboard (software only), or a PCI controller (Hardware RAID implementation: Adaptec, etc.)?
Both can be done, but the first is contingent upon kernel or module support for the motherboard-supported RAID array.
You do have the minimum number of drives for an effective R-5.
Have you consulted http://www.ibiblio.org/pub/Linux/docs/HOWTO/Software-RAID-HOWTO
http://www.supinfo-projects.com/en/2006/debian%5Fraid%5Fang/3/
http://www.cs.cmu.edu/~garth/RAIDpaper/Patterson88.pdf
http://juerd.nl/site.plp/debianraid
You may also want to install the latest doc-linux-html package, and consult usr/share/doc/HOWTO/en-html/mini/DPT-Hardware-RAID-1.html through
usr/share/doc/HOWTO/en-html/mini/DPT-Hardware-RAID-9.html
and
usr/share/doc/HOWTO/en-html/Software-RAID-HOWTO-1.html
through
usr/share/doc/HOWTO/en-html/Software-RAID-HOWTO-11.html
and
usr/share/doc/HOWTO/en-html/Hardware-HOWTO/ideraid.html
and
usr/share/doc/HOWTO/en-html/Hardware-HOWTO/raid.html
Since MEPIS is Debian-based, there is no intrinsic reason that it cannot do RAID at all (As a matter of fact, depending on your particular RAID controller, Debian-based distros do RAID_0 - RAID_5 & Comb_RAID quite well.); there simply may not be an obvious solution being tossed at you.
As always, hardware-based RAID implementations are to be preferred over software-based RAID solutions.
"You have two labs?"
"Each has its place. At the university, I try to please the Federal Government. Here, I negotiate with God."

Wear And Tear on Drives?
Posts: 5513
And why, as somebody suggested, does stripping add any extra wear and tear to HDDs, how does it make the data loss anymore likely.
Klam, it is not that stripping or more drives adds extra "wear and tear", it is a simple matter of more hardware. There is not more wear and tear, there are more hard drives. The more hard drives you have spinning, the more likely you have that at least one of them will break when you least expect it. There is a good summary of RAID info at wikipedia:
http://en.wikipedia.org/wiki/RAID
When you get into more than 10 or so disks, even RAID-5 can be problematic (and noisy). I have successfully tested Mepis 6.0 in a virtual environment using RAID-6 with 12 hard drives. That is where you have two drives for parity info (one bit-level, the other byte-level), and can lose two drives before failure. This is a software raid solution, and I cannot currently afford the hard drives to build it, but it works just fine. I have tested failures and rebuilds with no apparent problem. So Debian, Ubuntu, and Mepis do support RAID.
Jon
What exactly are you ....
Posts: 4
I am trying to setup a MEPIS system from scratch as a server using RAID 5.
I would like to use raid 5 for the whole system (from the root down) I would probably put the /boot either on a separate (200Mb) partition or on a boot diskette/cd. I would also like to use LVM or EVM.
So far I have not found a way of formating the physical disks as raid members or setting up a Linux RAID during install.
The links you show assume a working MEPIS system to begin with.
Somebody will now talk about compiling my Linux kernel with such and such an option. This has to be a completely binary install as once I have finished it will be handed over to a group of people who have absolutely no (Nada, zip ...) IT skills or experience and have expressed a very, very, very strong desire to remain that way. Therefor if I find it difficult then it will not work for them.

The second link describes a
Posts: 1634
The second link describes a scenario wherein one is booting from a CD and doing as you have described. In my reading over it, there is no functional OS on the hard drives at all.
"You have two labs?"
"Each has its place. At the university, I try to please the Federal Government. Here, I negotiate with God."
reply 2 to What are you, exactly,
Posts: 4
Interesting none of the links you mention are available in the MEPIS install that I have.
Maybe thats my problem.

Sorry. I'm reading a Debian
Posts: 1634
Sorry. I'm reading a Debian installation and extrapping the content to a MEPIS install. The fault is mine, not yours.
"You have two labs?"
"Each has its place. At the university, I try to please the Federal Government. Here, I negotiate with God."

Clarification
Posts: 5513
Klam, I think a little clarification is in order from my side. And I also will repeat that my tests were done in a "virtual machine".
When I created the virtual machine with RAID-6 running Mepis 6.0. I did it by first installing Mepis. Even Debian requires that you do some initial setup. But all of the raidtools that I needed were obtained while in Mepis. Install a minimal Mepis system and put your root system on a single drive. I would recommend that it NOT be part of the RAID-5 array. I believe that if you want to use RAID (0 or 1) for the root partition(s) you will have to use a hardware solution for that. I believe drlizau may have posted some stuff on that a while back. But build the basic system first. THEN you can add the other hard drives and begin to build the RAID array. This does not require recompiling the kernel.
I did my tests a few months ago, and spent a couple hours performing the tests. Unfortunately, I do not have any notes on exactly which procedures that I used. I have also blown the entire virtual machine away (needed the space). It was an initial test to "see what would happen". So I'm sorry but I cannot offer additional information on exactly what steps I used. I intend on putting together a "HowTo" once I have the opportunity to actually build my system.
I do have one comment though on your "group of people". That is that RAID is a way of protecting from "hardware failure", but I do hope that you have planned, and talked them into, some form of external backup. Because even if you implement RAID-5, and a drive goes out, you need to have contingency plans for replacement right? Oh, and make sure that they don't get in the habit of shutting the system down every day. If this system is going to be RAIDed, then it is intended as a file server and possible other purposes, but it should be left running. The power surges, and spin-up/down, and sync'ing of drives can be hard on the hardware too 
Jon
Clarification ....
Posts: 4
The "group of people" are volunteers at a charity most of whom are elderly, all of whom feel that while computers are an unfortunate necessity of modern times, they should, in general, be consigned to the inner circles of hades.
The system is a server and thus seldom powered down.
The system is setup to use a tape backup.
The idea behind the raid is to keep the system running while till cavalry arrives. Linux raid can be setup to send an email if something goes wrong, so sysadmin (me at the moment) will get an email if there is a problem.

Thanks for Clarification
Posts: 5513
Thanks for the clarification Arak 
Yes, I'm in "the biz" and there are times that I think the computers should be at the lowest level of hades 
(cooling is a bit of a problem there)
Have you considered setting up TWO computers? One to be the backup of the other; at least for the OS part of it? I know it's not RAID, but it's simple and cheap (if you have the surplus hardware around).
What is the approximate total disk space that you think you're going to need? What's your current estimate as to the number of physical drives you want to use?
Jon
wiki
Posts: 2299
look here: http://mepislovers-wiki.org/index.php/Fakeraid_mirror
Newbie or not Newbie, there's always a question