LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-24-2011, 12:01 PM   #1
spwnt
Member
 
Registered: Jun 2006
Distribution: Linux Mint/Debian/Arch
Posts: 78

Rep: Reputation: 12
RAID Questions


I'm looking to setup up a RAID 5 for my home samba server. It's likely going to have to be software since I don't think that my computer supports hardware based raid... but I have a few questions..

1.) With software based RAID does your motherboard need to support it or can any computer do software based RAID?

2.) If I do software/hardware based RAID and I reformat my computer or put the drives in a new computer or switch between Linux and Windows etc can it still be accessed... or once it's built can you not do any of that? My main question here is can I set up the RAID and run it in Linux but then boot into Windows and still access the RAID? Like once the programs are in stalled is it automatically recognised?

3.) How will software RAID effect my resources? My CPU, RAM etc... my computer has an i7 and 4 gb of RAM, but it's also my main desktop.

4.) Can I set up RAID with a generic PCI based 4 port SATA card or does it have to be specifically built into the motherboard?

5.) Do all of the drives need to be identical? (I know that they need to be the same size or you're just wasting space) But what about firmware of the drives, brand etc.

6.) Can you expand the size of the raid at a later date? Add more drives to increase the space without having to recreate the RAID.

7.) Can you break down the RAID without losing all of your data? Say I want to not have it as a RAID anymore can I, without having to move all of the files to another place, break down the RAID to their initial drives, not in RAID, and keep all of the data?

I do have another computer that I could try to install it on, and could access and maintain it remotely, but I'd really rather not... it's a pretty old computer.. Dell 512 megs of ram and a 2.1 ghz processor... plus I feel like the benefit of using raid would be wasted if it was put in an old computer... it wouldn't gain all of the benefit from all the drives working together I wouldn't think.
 
Old 09-24-2011, 12:32 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,746

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Quote:
Originally Posted by spwnt View Post
I'm looking to setup up a RAID 5 for my home samba server. It's likely going to have to be software since I don't think that my computer supports hardware based raid... but I have a few questions..

1.) With software based RAID does your motherboard need to support it or can any computer do software based RAID?
Any computer supports software RAID. In fact, you should not mix software RAID and hardware RAID.

Quote:
2.) If I do software/hardware based RAID and I reformat my computer or put the drives in a new computer or switch between Linux and Windows etc can it still be accessed... or once it's built can you not do any of that? My main question here is can I set up the RAID and run it in Linux but then boot into Windows and still access the RAID? Like once the programs are in stalled is it automatically recognised?
This will work with hardware RAID, but not software RAID since Windows and Linux will do the software RAID striping and metadata differently.
Quote:
3.) How will software RAID effect my resources? My CPU, RAM etc... my computer has an i7 and 4 gb of RAM, but it's also my main desktop.
RAID 5 reads are faster than a single drive with little overhead. Writes have a small performance penalty due to parity calculation.
Quote:
4.) Can I set up RAID with a generic PCI based 4 port SATA card or does it have to be specifically built into the motherboard?
SATA card is fine. If you are booting from this, make sure your computer can boot from the SATA card. You may also want to use a small RAID 1 boot partition with a copy on each drive which makes booting easier in a degraded state.
Quote:

5.) Do all of the drives need to be identical? (I know that they need to be the same size or you're just wasting space) But what about firmware of the drives, brand etc.
Nope.
Quote:

6.) Can you expand the size of the raid at a later date? Add more drives to increase the space without having to recreate the RAID.
If it is possible I wouldn't do it.
Quote:

7.) Can you break down the RAID without losing all of your data? Say I want to not have it as a RAID anymore can I, without having to move all of the files to another place, break down the RAID to their initial drives, not in RAID, and keep all of the data?
Nope. The data is interleaved across the drives.
Quote:

I do have another computer that I could try to install it on, and could access and maintain it remotely, but I'd really rather not... it's a pretty old computer.. Dell 512 megs of ram and a 2.1 ghz processor... plus I feel like the benefit of using raid would be wasted if it was put in an old computer... it wouldn't gain all of the benefit from all the drives working together I wouldn't think.
But a good idea to test out the process.
 
1 members found this post helpful.
Old 09-24-2011, 01:07 PM   #3
spwnt
Member
 
Registered: Jun 2006
Distribution: Linux Mint/Debian/Arch
Posts: 78

Original Poster
Rep: Reputation: 12
thanks very much for all of the answers, and okay I won't mix Windows and Linux, but say I set up a Debian server and have the software RAID running on it and for some reason I break something and have to reinstall the server can I make it so that the newly installed Debian server can recognize the already created RAID array? The RAID array isn't going to be / or anything fundamental like that.. it's just going to be for storing stuff for my samba server.


and another question I have is that as I understand it with parity and redundancy the drivers and being written to and read from even when you aren't directly accessing them in order to make sure that everything is working properly and to create paritry etc, so what are the chances that a power outage would just destroy everything completely if I am not currently reading or writing to it? and for that matter even if i was reading and writing to it when a power outage hit could it corrupt everything? Like how common is complete corruption or a RAID array? And under what circumstances could that happen?

thanks for all your help!
Quote:
But a good idea to test out the process.
very true :P
 
Old 09-24-2011, 01:28 PM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,746

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Quote:
Originally Posted by spwnt View Post
thanks very much for all of the answers, and okay I won't mix Windows and Linux, but say I set up a Debian server and have the software RAID running on it and for some reason I break something and have to reinstall the server can I make it so that the newly installed Debian server can recognize the already created RAID array? The RAID array isn't going to be / or anything fundamental like that.. it's just going to be for storing stuff for my samba server.
Install or upgrade of even a different Linux distro is fine. They will recognize the RAID config information on the disks since they all use the same md driver for software RAID.
Quote:

and another question I have is that as I understand it with parity and redundancy the drivers and being written to and read from even when you aren't directly accessing them in order to make sure that everything is working properly and to create paritry etc, so what are the chances that a power outage would just destroy everything completely if I am not currently reading or writing to it? and for that matter even if i was reading and writing to it when a power outage hit could it corrupt everything? Like how common is complete corruption or a RAID array? And under what circumstances could that happen?
The only writes going on in the background will be flushing block cache out to disk or rebuilding the RAID if you replace a drive. In either case, once it completes a power outage won't hurt you.

Powering off even a non-RAID drive will corrupt data. Journalling filesystems like ext3 are pretty good at limiting the damage to just the files currently being written. The filesystems as a whole will still be intact.
 
1 members found this post helpful.
Old 09-24-2011, 01:44 PM   #5
spwnt
Member
 
Registered: Jun 2006
Distribution: Linux Mint/Debian/Arch
Posts: 78

Original Poster
Rep: Reputation: 12
and if a drive fails is it pretty seemless/easy to swap in a new one?
 
Old 09-24-2011, 04:09 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,746

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Quote:
Originally Posted by spwnt View Post
and if a drive fails is it pretty seemless/easy to swap in a new one?
Not really seamless. cat /proc/mdstat for status. Check messages for errors. Sometimes errors on one drive can seem to affect other drives. Swapping the wrong drive can be irrecoverable.

The basic steps are:
1) Figure out which one is the failed drive. Blink the select light on drives to make sure.
2) Use mdadm to remove it from the RAID.
3) Power down and replace the drive. Or hot plug if you're set up for that.
4) Copy the partition table to the new drive.
5) Use mdadm to add it to the RAID.
6) Let rebuild run with minimal other activity.
 
1 members found this post helpful.
Old 09-24-2011, 05:47 PM   #7
spwnt
Member
 
Registered: Jun 2006
Distribution: Linux Mint/Debian/Arch
Posts: 78

Original Poster
Rep: Reputation: 12
can you have multiple raids running simultaneously on the same drives?

let's say I have 4 disks and they are all 1 terabyte

could i do like raid 5 950 gb on all of them and then raid 0 or 1 the remaining space? or even raid 5 that remaining space for /?

so I'd have /media/samba raid 5 950 gb and then raid 5 / at the remaining 50.

hypothetical situation ofcourse... but if that's possible that expands what i could do by quite a bit.
 
Old 09-24-2011, 09:52 PM   #8
spwnt
Member
 
Registered: Jun 2006
Distribution: Linux Mint/Debian/Arch
Posts: 78

Original Poster
Rep: Reputation: 12
also if i choose to use a hardware raid controller then would I be able to use the raid on windows and linux? if so can you give me a few examples of some raid controllers that are supported by both os's? i'm looking for one with atleast 6 sata ports and it has to be in a decent price range... sub 300 dollars way lower would be preferable. I'm not going to be running a hardcore server. I just need something that works.
 
Old 09-25-2011, 10:17 AM   #9
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,746

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Quote:
Originally Posted by spwnt View Post
can you have multiple raids running simultaneously on the same drives?

let's say I have 4 disks and they are all 1 terabyte

could i do like raid 5 950 gb on all of them and then raid 0 or 1 the remaining space? or even raid 5 that remaining space for /?

so I'd have /media/samba raid 5 950 gb and then raid 5 / at the remaining 50.

hypothetical situation ofcourse... but if that's possible that expands what i could do by quite a bit.
yes - md is on partitions. it's quite flexible
 
Old 09-25-2011, 10:32 AM   #10
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,746

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Quote:
Originally Posted by spwnt View Post
also if i choose to use a hardware raid controller then would I be able to use the raid on windows and linux? if so can you give me a few examples of some raid controllers that are supported by both os's? i'm looking for one with atleast 6 sata ports and it has to be in a decent price range... sub 300 dollars way lower would be preferable. I'm not going to be running a hardcore server. I just need something that works.
I'm not real familiar with the PCI/PCIe RAID cards, so post a new question if nobody else chimes in here. Everything is supported on Windows, so look for Linux support. The things that affect cost are how much on-board memory, how fast is the on-board processor and how many SAS/SATA ports it has. Some have battery backup so they can do fast write completion. Also some "hardware" RAID cards provide multiple ports but do some or all of the work in the driver, so they are really software RAID. I'm not sure how to tell whether the Linux and Windows RAID configs would be compatible unless the vendors surprise me and provide useful info for a change.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] RAID Questions tronayne Slackware 5 06-24-2011 06:35 AM
RAID - Questions Pilot3514 Linux - Newbie 7 11-19-2010 12:34 PM
RAID 5 Questions sxa Linux - Hardware 3 02-19-2009 02:35 AM
raid questions rblampain Linux - Hardware 3 09-15-2007 12:18 AM
software raid 5 + LVM and other raid questions slackman Slackware 5 05-09-2007 02:58 PM


All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration