LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 05-07-2007, 09:24 AM   #1
slackman
Member
 
Registered: Mar 2003
Distribution: Slack 9.0
Posts: 123

Rep: Reputation: 15
Thumbs up software raid 5 + LVM and other raid questions


ok,

i wanna redo my file server and use software raid 5 + LVM, but before i do that i want to ask few question. i have about 10 160gb PATA drives that i want to use. the setup is simplified by using those 10 PATA purely as storage since OS (slack 11) will be residing on 30gb pata drive with cd rom on one of the IDE channels on the mobo.

so now the motherboard has only 3 PCI slots and 1 free onboard IDE channel (the other one is taken by OS HD and CDROM - on one cable). to fit all 10 Storage HDs i'd need 10 IDE channels and to have 1 HD per channel i'd have to get 2 IDE PCI controllers with 4 IDE channels and then 1 2 channel IDE controller and then i will have one spare for future upgrade.

but then again will it be hard (read: will i have to rebuild raid) if i wanted to upgrade the 3rd 2chan IDE controller to 4 chan?

does slack 11 come with built in support for raid and LVM or will i have to recompile the kernel in order for the OS to support those features?

now lets get back to the software. since ill be building software raid i don't care if the ide controllers will have built in raid capabilities.

setting up the raid is fairly easy ill probably set up raid 5 with 8 drives set up for storage and 2 as spares. is spare in software raid unusable until another drive breaks and then it's used to mirror the bad drive? or will i be fine with one?

also since i want to have the ability to add drives in the future and expand the storage, and it's hard to do with the software raid without moving data around, i'd also want to put LVM on top of the RAID. now should raid be created first and then LVM or the other way around?

also will there be a problem if i decide to add disk to raid that has different size the the disks in the array. since it's software i shouldn't have any major problem right?

i believe the HDs are in ok conditions but should i test them before building the array 1 by 1 or would it be the same if i did the test after the array is created and when it finds the error it will point me to the faulty drive and allow me the replace it?

i will add some more questions and concerns to this thread. thank you for any input, which is highly appreciated.
 
Old 05-07-2007, 09:27 AM   #2
slackman
Member
 
Registered: Mar 2003
Distribution: Slack 9.0
Posts: 123

Original Poster
Rep: Reputation: 15
to add more to the statement with adding later on a disk of a different size. what if i have setup with 9 drives of 160 and one setup as a spare. then i add another lets say 500gb drive and it goes bad. wouldn't that make a mess? the spare doesn't have enough room to mirror the bad drive.
 
Old 05-07-2007, 09:50 AM   #3
slackman
Member
 
Registered: Mar 2003
Distribution: Slack 9.0
Posts: 123

Original Poster
Rep: Reputation: 15
if you think i should change the raid mode lmk. hows software raid 5 for storage? how does it react on power loss (not that i will be pulling out cables, but just in case) ? difficulties with recovery? any input will help.
 
Old 05-08-2007, 05:15 AM   #4
ajg
Member
 
Registered: Nov 2005
Location: The People's Republic of South Yorkshire
Distribution: FC3, CentOS4&5, Hardy Heron, Mythbuntu
Posts: 62

Rep: Reputation: 15
When I was testing Linux soft RAID (after my Promise SuperTrack Hard RAID controller decided to drop 2 300GB drives and totally trash the system), I didn't come across any issues with power loss - it sorted things out fairly well.

The big problem for me was if a drive died, the system would grind to a halt, forcing a manual power cycle. On reboot, it would refuse to mount the volumes on the RAID5 set as the filesystems were dirty from the power cycle, AND there was a drive missing from the RAID set. So ... to get things back again, you have to replace the failed drive, add it back into the array with mdadm, then run fsck across the volumes. You've got to think about your partition structure carefully if you want to avoid having to use a LiveCD to do this process. If you don't have a spare drive, you're stuffed until you get one.

I wasn't comfortable with these limitations, and having to create half-a-dozen RAID sets to avoid having to use a LiveCD in the event of a drive failure. I just use RAID1 - storage isn't expensive. It works, and if you lose a drive, you don't end up in RAID5 limbo.

Last edited by ajg; 05-08-2007 at 05:18 AM.
 
Old 05-08-2007, 06:18 PM   #5
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 667

Rep: Reputation: 39
actually a couple of weeks ago i was in your position.
in the end i implemented a raid 5, but no LVM. basically i have a single drive for the OS (just 40GB) and another 4 raided5 drives.
anyway, to the point:

Quote:
but then again will it be hard (read: will i have to rebuild raid) if i wanted to upgrade the 3rd 2chan IDE controller to 4 chan?
i don't think you should have a problem provided you recompile support for the new controller in the kernel... and you replace the new card at the exact PCI slot that you removed the old one from. i think the pci slots (and thats the disks) are scanned sequentially and so replacing one card will not affect the node that gets assigned to each drive during boot up... i would appreciate a more kernel oriented person verifying that though...

but take things in order. have a go at the software RAID guide.
http://tldp.org/HOWTO/Software-RAID-HOWTO.html#toc10

note the 'persistent superblock' option that exists. force all drives to have this enabled, cause it will allow 'connecting' the disks of the array at boot time. and format the drives as linux-raid (partition code is 0xFD). its possible that the array will be reassembled even if the drive letters have changed (if that happens remember to update the /etc/raidtab file).

as for adding more drives (since i guess u'll be changing the IDE controller to add 2 more disks... read this:

http://tldp.org/HOWTO/Software-RAID-...10.html#ss10.1

apparently there is a way to expand the number of disks in raid 5 but its not well established (at the time the article was written).
i know read in the mdadm manual that there is an option --grow to expand an array, but it does NOT support raid 5 as of yet. im confident that we'll soon have that option available to us soon.

as for now, my best advice to you would be to experiment..
start your raid with say 4 drives... make sure you understand whats going on and once the system is settled in a raid5 with 4 drives, start adding drives.

Quote:
does slack 11 come with built in support for raid and LVM or will i have to recompile the kernel in order for the OS to support those features?
so i installed slack11 with the test26.s kernel and i had to recompile a kernel with raid support. (i downloaded the latest stable at the time 2.6.20.7)

Quote:
setting up the raid is fairly easy ill probably set up raid 5 with 8 drives set up for storage and 2 as spares. is spare in software raid unusable until another drive breaks and then it's used to mirror the bad drive? or will i be fine with one?
no need to use more than 1 drive as spare. especially if you choose to make 1 raid out of all the drives (you can even make more than one raid5 arrays and still share 1 spare drive among the 2 to save space).

Quote:
also will there be a problem if i decide to add disk to raid that has different size the the disks in the array. since it's software i shouldn't have any major problem right?
the raid will use only space from this drive equal to the smallest size of drive across the drives in the array. read here
http://tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.8

hope this was of some help
 
Old 05-09-2007, 03:58 PM   #6
slackman
Member
 
Registered: Mar 2003
Distribution: Slack 9.0
Posts: 123

Original Poster
Rep: Reputation: 15
thanks nass and ajg. some very valuable info. i did take a look at the software howto at tldp.org and it was very helpful.

i will experiment with raid5 to see if i'll have the same issues as ajg. does raid1 required you to power cycle/or any other human interaction in order to restore?

nass thank you for your input as well. i understand that i spare drive is enough, so in case of failure i'll know to replace the bad drive. what if im lazy and lets say next day another drive goes to heaven (of course they don't go out at the same time = BYE DATA), will the second spare then save my life? as far as the resizing, i see that the link you provided shows app that is still in developmental stage, but hey it works. that's why i was considering LVM since i think it allows for easier raid expansion + you have ability to do snapshots for system restore (is that the same as regular tar backup?).

all in all i will have to play with it myself and test all possible situations and then decide.

i will post some further questions later.

again your input is appreciated.
 
  


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
software raid 5 + LVM slackman Slackware 1 05-07-2007 10:27 AM
LVM / Software RAID across a mix of IDE / SATA drives jhermans Linux - Software 1 04-08-2007 05:26 AM
moving disks with software raid and LVM mastrboy Linux - General 8 09-30-2006 10:33 AM
Questions about software RAID 3.14159 Linux - General 0 04-18-2005 03:37 PM
Software Raid 5 questions musicman_ace Linux - General 1 07-25-2004 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:13 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
Open Source Consulting | Domain Registration