Linux and software RAID5

VinylxScratches

Golden Member
Feb 2, 2009
1,666
0
0
I have 3 2TB hard drives. I don't have a spare currently. Can I setup a RAID5 for now w/o a spare and add one later??
 

skyking

Lifer
Nov 21, 2001
22,386
5,360
146
yes. I am not a fan of software raid 5, do you need the write speeds and extra room?
If 2TB is enough I'd build a raid1 and install grub on each drive, make sure it boots from either, and spare that third drive.
 
Last edited:

Vadatajs

Diamond Member
Aug 28, 2001
3,475
0
0
yes. I am not a fan of software raid 5, do you need the write speeds and extra room?
If 2TB is enough I'd build a raid1 and install grub on each drive, make sure it boots from either, and spare that third drive.

That is a HUGE waste of space.

Just do the raid 5. If you don't have another boot drive, create a 100MB partition on each drive and set up a 3 way raid1 for /boot. If you get more drives, you can always restripe live (which you can't do if you set up raid1).
 

Scarpozzi

Lifer
Jun 13, 2000
26,389
1,778
126
It all depends on what you are wanting to do with it and what kind of drives they are. If they're like the Western Digital Green drives, I don't know if I would put them in an array at all unless you modify the drives not to spin down as frequently. Be aware that many of the home-use rated drives aren't ideal for RAID...read up on it before putting valuable data on them in that configuration.

As for what you should do pertaining to linux and an array...I think it all depends on the data and the life expectancy of your linux computer/server. If you are building a RAID array out of those disks, you might want to consider setting up linux on another non-raided partition and mount the RAID 5/RAID 1 (whatever you do) as a separate mount. I only state this because I'm making the assumption you don't have a RAID controller and are using software RAID.

Software RAID on a boot partition can be iffy in the event of disk corruption. If you've ever had multiple drives go offline and want to salvage the array, it's a pain when you have system-level data on the same array...like an operating system. Just my .02.

-Scar
 

PreferLinux

Senior member
Dec 29, 2010
420
0
0
Google uses pretty much only standard "home-use" drives. (I know from a study done by them on HDD failures. I'll post it if you like.)
 

child of wonder

Diamond Member
Aug 31, 2006
8,307
176
106
I'm running a trio of 1.5TB Samsung drives in software RAID 5 as a Samba share in my Debian file server. Haven't had a single problem for over a year.
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
I have 3 2TB hard drives. I don't have a spare currently. Can I setup a RAID5 for now w/o a spare and add one later??

Yes. Linux supports adding drives to a RAID array.

So you can go from 3 disk RAID 5 to:
4 disk RAID5
3 disk RAID5 + spare
or
4 disk RAID6
 

shamgar03

Senior member
Jul 13, 2004
289
0
0
If you need help, start with "partition the drives":
https://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM

I've been using a raid5 for a couple years on my home server. Its definitely been good except for a few panic-moments where I screwed up an mdadm command.

Note that you can quite easily ruin device descriptions using mdadm by accidentally setting /dev/sdX to the output. If this happens, just reboot and the device descriptors will work again. If you do screw something up, its unlikely your data is lost, rebuilding the array is usually possible. I use xfs because I only have very large files and I've set the block size to like 2 MB. There is an xfs setting that will optimize for stripe size.

Make sure to set the stripe_cache_size to something pretty large, I've had some weird lock ups when I am using the raid for multiple IO intensive operations at the same time.
echo '1684' > /sys/block/md0/md/stripe_cache_size

You can also setup mailing in /etc/mdadm.conf to email you when stuff goes bad. Test with
mdadm --manage /dev/md0 -t

I think I have 4 drives in the raid array now, its nice to have redundancy with only 1 drive being "wasted"
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Make sure to set the stripe_cache_size to something pretty large, I've had some weird lock ups when I am using the raid for multiple IO intensive operations at the same time.
echo '1684' > /sys/block/md0/md/stripe_cache_size

Don't set it too large (also, you need to know the formula for calculating how much RAM you need for the stripe cache - you don't simply tell it kB or MB). If you do set it too large, your system will crash with a kernel panic.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |