LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-16-2007, 06:03 AM   #1
Voltar
Member
 
Registered: Jan 2006
Location: Bakersfield, California
Distribution: CentOS 5.3, FreeBSD 7.2, Fedora 11
Posts: 83

Rep: Reputation: 15
Smile RAID 5 setup with Slackware


I was wondering if anyone has had good/bad experiences with RAID 5 (software/md) on Slackware, as I have four Seagate Barracuda 7200.10's that I was going to put in an RAID 5 array. The setup is mainly for the extra space, speed, and some redundancy. Also, don't plan on adding another drive to the setup for a long time, so no need to worry about any problems with that and RAID 5. Server is an Opteron 170 with 4 GB of RAM, mainly used for network file/print services, and as a development box (Apache/Lighttpd, PHP, MySQL).

It would be serveral different partitions and md devices as I've been told you can't/shouldn't partition an array. Different partitions for /, /home, /tmp, /usr, /usr/src, and /var, and also a small RAID 1 partition for /boot (Can't boot a RAID 5 setup afaik).

Anyone have any thoughts/comments on this? I've done some research and it seems that doing RAID in Slackware isn't all nice and easy as it would be in CentOS or another distro that has RAID capibilities in it's installer.


Thanks for any info/help.


-David
 
Old 03-17-2007, 04:46 PM   #2
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
I am running a RAID 5 array on a Slackware 10.2 box. I used the Software RAID HOWTO at the Linux Documentation Project www.tldp.org to set it up. I didn't find it that hard at all. Main problem I had was that one of the refurbished drives I was trying to use wouldn't work, and I had to replace it.

The system doesn't boot from the array, though. I have a separate drive that has / and the rest of the standard filesystem on it. I made a separate directory /srvr that I use as a mount point for the array.
 
Old 03-17-2007, 09:02 PM   #3
Berhanie
Senior Member
 
Registered: Dec 2003
Distribution: Fedora
Posts: 1,492

Rep: Reputation: 144Reputation: 144
I'm booting from a RAID1 device on Slackware-10.1.

Quote:
seems that doing RAID in Slackware isn't all nice and easy as it would be in CentOS or another distro that has RAID capibilities in it's installer.
True. CentOS has a nice GUI which makes installing into a RAID device convenient. The same is also possible with the Slackware install; it's just a little more "manual" (you need to make the RAID devices before you start the install, change lilo.conf and fstab a bit, etc). You might want to Google for the details of a RAID install on Slackware, otherwise, if you're switching to RAID after the install, the usual HOWTOs apply.

Last edited by Berhanie; 03-18-2007 at 02:45 AM.
 
Old 03-18-2007, 04:04 PM   #4
Voltar
Member
 
Registered: Jan 2006
Location: Bakersfield, California
Distribution: CentOS 5.3, FreeBSD 7.2, Fedora 11
Posts: 83

Original Poster
Rep: Reputation: 15
Well I got as far as creating the partitions and raid devices on an already working system, along with a mdadm.con and /etc/raidtab file which I though would help during the install. I did do some Google-ing about Slackware + RAID install, a lot of the hits seemed to be older, but still provided a wealth of information.

Right now I'm just deciding between moving the old system or reinstalling from scratch, the reinstall is winning right now as it would kill time today =)
 
Old 07-29-2008, 04:22 AM   #5
ArthurSittler
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 122

Rep: Reputation: 29
I boot RAID 1, swap on RAID 5, root on RAID 5.

The RAID how-to sort of describes the setup. I use trailing-edge technology because, basically, I am cheap.

Don't be too cheap, though. Use a UPS (uninterruptible power supply) on your RAID machine. A power failure at the wrong time during writing to the RAID can corrupt the system and make all the data absolutely unrecoverable. If you run a file server 24/7 on a UPS, I recommend getting a UPS with Linux-friendly monitoring so that the server can shut down gracefully in a power outage if you are not there. The actual cross-section for susceptibility may not be too large on lightly-loaded file servers, but if the local flash and flicker utility takes a lot of lightning hits, you are bound to get hit during an array write sooner or later. A UPS requires a certain level of maintenance. The batteries have a limited service life. I use the batteries specifically designed for UPS service and get up to ten years service life from a set of batteries. Generic type gel-cells only seen to give two or three years service. The slight extra price for UPS batteries is more than worth the price. Recycle used batteries, of course. Please do not throw them in the trash. They contain lead.

I use sets of mechanically similar SCA (80-pin hot swappable) SCSI drives which I get for $11.00 to $30.00 apiece. I use adapters to connect to the 68-pin SCSI cables. I was lucky to find removable cartridges for one of the boxes, so it is in fact hot swappable.

I use fdisk to partition them usually into three partitions.
1: The first partition is 20MB or so for a boot partition. This is initially type 83 Linux. I set the bootable flag.
2: Then I allocate 128MB or so swap partition, type 82,
3: I allocate the remainder of the drive as a type 83 partition.

I build ext2 file systems on all the boot partitions.
mkfs -t ext2 /dev/sda1
mkfs -t ext2 /dev/sdb1
etc.

I mkswap on all the swap partitions.
mkswap /dev/sda2
mkswap /dev/sdb2
etc.

I build reiser journaling file systems on the main partitions. Using a journaling file system is one more level of file security that is simply too cheap to pass up.
mkreiserfs /dev/sda3
mkreiserfs /dev/sdb3
etc.

I initially install slackware on the last drive, with only rudimentary pieces disk sets a, ap, and maybe d. That is, I use /dev/sd<lastdrive>2 as root directory. With the fast machines and disk drives, I could go ahead and install everything, but I am simply going to clobber it, so why bother? I make a USB boot stick, which has come in handy many times.

After I get the system so it will boot, I assemble the RAID arrays. I use jed to write /etc/raidtab with all the drives in the arrays, but declare the last drive (the one with Linux installed) as failed. I use mdadm to build the arrays. I confirm the progress of the array assemble by looking at the /proc/mdstat pseudofile.
cat /proc/mdstat

I make mount points for the boot and main RAID arrays.
mkdir /mnt/md0
mount /dev/md0 /mnt/md0
I copy the /boot directory to /mnt/md0.
cp /boot/* /mnt/md0

After the RAID arrays work, I go back with fdisk and change the type of all the partitions in all the disks (except for my last drive, which I am using to bootstrap the whole process) to type fd (Linux raid autodetect).

I reboot with the install CDROM and install everything, using /dev/md1 as swap, using /dev/md2 as / (root) and mounting /dev/md0 on /boot. Well, actually, it sometimes goes better to install just the a package until I work the kinks out and get a bootable system. After I get lilo to install a bootable system, I use mdadm to add the partitions from the last drive (my "bootstrapping" drive) into the RAID arrays. I use fdisk to change the type of the partitions in the last drive to fd Linux raid autodetect. Again, I confirm progress with
cat /proc/mdstat

I have experimentally verified that I can remove any drive from a running system without losing data. I can also use mdadm to add the partitions of the replaced drive back into the arrays.

Be sure to check the array status from time to time with
cat /proc/mdstat
Disks drives, especially cheap used ones, fail. The question is not "Will a drive fail?" The question is "WHEN will a drive fail?" The RAID protects you from single-drive failures (or multiple drive failures, depending on your configuration). After you have lost your redundant drives and any spares, losing one more drive will make all of the data completely unrecoverable. Please don't ask me how I know this. Just pay attention, and perhaps you won't learn it the hard way.
 
Old 07-29-2008, 05:46 PM   #6
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 961

Rep: Reputation: 208Reputation: 208Reputation: 208
Check out "$slackware-mirror/slackware-12.1/README_RAID.TXT"

Also possibly some useful stuff here http://www.userlocal.com/articles/ra...ackware-12.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID 1 Setup metallica1973 Linux - Hardware 2 11-17-2006 07:02 AM
Slackware - Eth1 Setup and Port Setup help girlsmakegraves Linux - Networking 3 12-16-2005 11:11 AM
help me setup software raid 1 on slackware with mdadm xrado Slackware 2 03-02-2005 05:50 AM
Software Raid setup to install slackware 9.1 anvil82 Linux - Hardware 2 03-20-2004 08:59 PM
need help with a RAID setup Ekj530 Linux - Newbie 1 08-13-2003 02:15 PM


All times are GMT -5. The time now is 10:01 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration