Chris Weisiger
2013-Mar-05 03:53 UTC
[CentOS] Software RAID complete drives or individual partitions
I have been reading about software raid. I configured my first software raid system about a month ago. I have 4 500 Gig drives configured in RAID 5 configuration with a total of 1.5TB. Currently I configured the complete individual drivers as software raid, then created a /dev/md0 with the drives I then created a /file_storage partition on /dev/md0. I created my /boot / and swap partitions on a non raid drive in my system. Is the the proper way to configure software raid?
SilverTip257
2013-Mar-05 13:58 UTC
[CentOS] Software RAID complete drives or individual partitions
On Mon, Mar 4, 2013 at 10:53 PM, Chris Weisiger <cweisiger at bellsouth.net>wrote:> I have been reading about software raid. I configured my first software > raid system about a month ago. > > I have 4 500 Gig drives configured in RAID 5 configuration with a total of > 1.5TB. > > Currently I configured the complete individual drivers as software raid, > then created a /dev/md0 with the drives > >I've read (and would agree) that using the entire drive can hide the fact that a softraid is there. If you set up a partition on the disk and mark the file system as type "fd" then no matter what you know that disk is part of a softraid array. What you configured works. Is it wrong? No.> I then created a /file_storage partition on /dev/md0. > > I created my /boot / and swap partitions on a non raid drive in my system. > > Is the the proper way to configure software raid?I generally use LVM on my systems, so my layouts has /boot carved out as its own partition and then another partition for the LVM PV. And if you use standard partitions instead of LVM, then create individual softraid arrays for each partition. * Remember, /boot can only be on a raid1 software array. Veering slightly from your original question... I recently set up softraid arrays by hand before invoking the Anaconda installer (on a 6.3 install). Recent mdadm packages that ship with CentOS support metadata 1.1 and 1.2 (... actually defaulting to 1.2 I believe), but GRUB 0.97 only supports metadata 1.0 and not the metadata version that mdadm defaulted to. On my CentOS 5 installs in the past I've specifically set --metadata=0.90 to avert any catastrophes like this. Fun problem to troubleshoot ... I knew it once that system wouldn't boot though. Kind of odd that the installer didn't pick up on the metadata version and flag it or modify it. In the end I ended up rescuing the system by backing up and recreating the /boot softraid with metadata 1.0 :)> _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- ---~~.~~--- Mike // SilverTip257 //
Mark LaPierre
2013-Mar-06 00:27 UTC
[CentOS] Software RAID complete drives or individual partitions
On 03/04/2013 10:53 PM, Chris Weisiger wrote:> I have been reading about software raid. I configured my first software raid system about a month ago. > > I have 4 500 Gig drives configured in RAID 5 configuration with a total of 1.5TB. > > Currently I configured the complete individual drivers as software raid, then created a /dev/md0 with the drives > > I then created a /file_storage partition on /dev/md0. > > I created my /boot / and swap partitions on a non raid drive in my system. > > Is the the proper way to configure software raid? > _______________________________________________Hey Chris, What you have done is a totally acceptable way of building a raid array. Software raid on Linux is amazingly flexible. It is able to build arrays on individual matching drives as you have done, drives of different physical sizes, a combination physical drives and partitions on other drives, or a combination of partitions on different drives. It can even build a raid array on several partitions on one physical drive, not that you would ever want to do that. In other words, if you can dream it up, software raid can probably build it. The question is why are you using raid at all? If you are trying to increase access speed or data security then raid makes sense. The appropriate configuration depends on your available resources and the nature of your intent. -- _ ?v? /(_)\ ^ ^ Mark LaPierre Registered Linux user No #267004 https://linuxcounter.net/ ****
John R Pierce
2013-Mar-06 00:45 UTC
[CentOS] Software RAID complete drives or individual partitions
On 3/5/2013 4:27 PM, Mark LaPierre wrote:> The question is why are you using raid at all?indeed. the primary justification for the "R" in RAID, Redundant, is high availability. having the OS on a non-raid volume completely violates this. RAID is most definitely NOT a substitute for backups. -- john r pierce 37N 122W somewhere on the middle of the left coast
Chris Weisiger
2013-Mar-06 01:18 UTC
[CentOS] Software RAID complete drives or individual partitions
I essentially configured the software raid to create a home server and not have to worry about individual drives. I've built a collection of several several gigs of music and pictures. Enough to look into a raid system. Plus it is alot cheaper than a hardware raid setup. Plus I want to do testing with it to possible use it for some of the clients that the business I work for do work for for basic file server services -----Original Message----- From: Mark LaPierre Sent: 3/5/2013 6:27 PM To: centos at centos.org Subject: Re: [CentOS] Software RAID complete drives or individual partitions On 03/04/2013 10:53 PM, Chris Weisiger wrote:> I have been reading about software raid. I configured my first software raid system about a month ago. > > I have 4 500 Gig drives configured in RAID 5 configuration with a total of 1.5TB. > > Currently I configured the complete individual drivers as software raid, then created a /dev/md0 with the drives > > I then created a /file_storage partition on /dev/md0. > > I created my /boot / and swap partitions on a non raid drive in my system. > > Is the the proper way to configure software raid? > _______________________________________________Hey Chris, What you have done is a totally acceptable way of building a raid array. Software raid on Linux is amazingly flexible. It is able to build arrays on individual matching drives as you have done, drives of different physical sizes, a combination physical drives and partitions on other drives, or a combination of partitions on different drives. It can even build a raid array on several partitions on one physical drive, not that you would ever want to do that. In other words, if you can dream it up, software raid can probably build it. The question is why are you using raid at all? If you are trying to increase access speed or data security then raid makes sense. The appropriate configuration depends on your available resources and the nature of your intent. -- _ ?v? /(_)\ ^ ^ Mark LaPierre Registered Linux user No #267004 https://linuxcounter.net/ **** _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Chris Weisiger
2013-Mar-06 01:56 UTC
[CentOS] Software RAID complete drives or individual partitions
Im not so much concerned about the os not being on a raid system. I am really concerned about my data, music, pictures,docs, etc. I run a minimum os centos 5.9 install anyway so it would take long to reload the os if i had to. -----Original Message----- From: John R Pierce Sent: 3/5/2013 6:45 PM To: centos at centos.org Subject: Re: [CentOS] Software RAID complete drives or individual partitions On 3/5/2013 4:27 PM, Mark LaPierre wrote:> The question is why are you using raid at all?indeed. the primary justification for the "R" in RAID, Redundant, is high availability. having the OS on a non-raid volume completely violates this. RAID is most definitely NOT a substitute for backups. -- john r pierce 37N 122W somewhere on the middle of the left coast _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Chris Weisiger
2013-Mar-06 01:58 UTC
[CentOS] Software RAID complete drives or individual partitions
Im in the process of configuring my data to be backed up to external devices. -----Original Message----- From: John R Pierce Sent: 3/5/2013 6:45 PM To: centos at centos.org Subject: Re: [CentOS] Software RAID complete drives or individual partitions On 3/5/2013 4:27 PM, Mark LaPierre wrote:> The question is why are you using raid at all?indeed. the primary justification for the "R" in RAID, Redundant, is high availability. having the OS on a non-raid volume completely violates this. RAID is most definitely NOT a substitute for backups. -- john r pierce 37N 122W somewhere on the middle of the left coast _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Mark Snyder
2013-Mar-06 16:00 UTC
[CentOS] Software RAID complete drives or individual partitions
Chris, I've used software raid quite a bit, and have developed a few rules of thumb, hope these help! - Use one raid array, generally md0, for /boot, and one for LVM, md1. This allows the individual drives to be mounted and read on another server for recovery if you're using RAID1. This is generally how the drives in a RAID1 array would look. This is from a CentOS 5 server, so /boot is only 100MB, on CentOS 6 it would be 500MB. # fdisk -l /dev/sda Disk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 fd Linux raid autodetect /dev/sda2 14 30401 244091610 fd Linux raid autodetect # cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 104320 blocks [2/2] [UU] md1 : active raid1 sdb2[1] sda2[0] 244091520 blocks [2/2] [UU] - Avoid software RAID5 or 6, only use it for RAID1 or 10. Software RAID5 performance can be abysmal, because of the parity calculations and the fact that each write to the array requires that all drives be read and written. Older hardware raid controllers can be pretty cheap on eBay, I'm using an old 3Ware on my home CentOS server. Avoid hostraid adapters, these are just software raid in the controller rather than the OS. Even with hardware raid performance won't be near as good as RAID10, I generally only use RAID5 or 6 for partitions that hold backups. If you are using drives over 1TB, consider partitioning the drives into smaller chunks, say around 500MB, and creating multiple arrays. That way if you get a read error on one sector that causes one of the raid partitions to be marked as bad, only that partition needs to be rebuild rather than the whole drive. Mark Snyder Highland Solutions 200 South Michigan Ave., Suite 1000 Chicago, IL 60604 http://www.highlandsolutions.com ----- Original Message ----- From: "Chris Weisiger" <cweisiger at bellsouth.net> To: centos at centos.org Sent: Monday, March 4, 2013 9:53:48 PM Subject: [CentOS] Software RAID complete drives or individual partitions I have been reading about software raid. I configured my first software raid system about a month ago. I have 4 500 Gig drives configured in RAID 5 configuration with a total of 1.5TB. Currently I configured the complete individual drivers as software raid, then created a /dev/md0 with the drives I then created a /file_storage partition on /dev/md0. I created my /boot / and swap partitions on a non raid drive in my system. Is the the proper way to configure software raid? _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Gordon Messmer
2013-Mar-06 19:00 UTC
[CentOS] Software RAID complete drives or individual partitions
On 03/04/2013 07:53 PM, Chris Weisiger wrote:> > Currently I configured the complete individual drivers as software > raid, then created a /dev/md0 with the drivesIf you configure an entire drive as a raid device, you'd have a device name like /dev/mdp0, which you'd then partition. I think what you've done is created only one partition per disk, and made those partitions into a RAID set. That's not wrong, but it's not the same thing. Non-partitionable RAID sets such as the one you've created are the most common configuration for software RAID. Hardware RAID volumes are almost always the partionable type.> Is the the proper way to configure software raid?"Proper" is relative to its fitness for a specific purpose. As you haven't indicated a specific purpose, "proper" doesn't have any real meaning. The array you've created will work, and it will protect your data from loss due to the failure of a single disk. You need to make sure your "root" mail is delivered to someone who will read it in a timely manner, or else that protection is not useful. The array's performance will be relatively lower than a single-drive configuration or a RAID10 configuration, but that may be acceptable for bulk storage. The array will not protect you from filesystem corruption or from accidental deletion. Subject to those and other limitations, your array seems more or less proper.