Difference between revisions of "Talk:RAID"

From ArchWiki
Jump to: navigation, search
(About update the kernel image in the section: Add to kernel image: re)
(About update the kernel image in the section: Add to kernel image: Remove closed discussion.)
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
==Max drives stated in RAID level comparison==
 +
The chart under the heading '''RAID level comparison''' states a max number of drives for each RAID level.  Where do these numbers come from?
 +
They seem quite erroneous, particularly the 2-drive max stated for RAID 1.  I run a few servers with 3-way RAID 1, and as an experiment just did a 6-way RAID 1 with no complaint.  Also, I googled and easily found examples of md arrays larger than 16 drives.  Here's a 20 drive RAID 6: http://louwrentius.com/blog/2009/07/20-disk-18-tb-raid-6-storage-based-on-debian-linux/
 +
 +
I'm removing these figures as they're obviously not correct.  If there are limits to the max number of decices, please add them and include a source that documents them.
 +
 +
--[[User:Brucebertrand|Brucebertrand]] ([[User talk:Brucebertrand|talk]]) 00:28, 15 October 2012 (UTC)
 +
 
==Alternate setups and filesystems==
 
==Alternate setups and filesystems==
 
Just wanted to mention these directions worked great for me.  It would be nice to have more examples for alternate setups and good ideas for filesystems, etc..
 
Just wanted to mention these directions worked great for me.  It would be nice to have more examples for alternate setups and good ideas for filesystems, etc..
Line 67: Line 75:
 
::::Backups are a way of life, but you make good points.  It is very close to totally unneccessary but backups for me are a habit.  Should be moved in separate section.. ~ [[User:AskApache|AskApache]] 10:22, 1 May 2012 (UTC)
 
::::Backups are a way of life, but you make good points.  It is very close to totally unneccessary but backups for me are a habit.  Should be moved in separate section.. ~ [[User:AskApache|AskApache]] 10:22, 1 May 2012 (UTC)
  
==Prepare the device==
+
== Preparing and Planning for RAID Recovery ==
{{note|Moved from [[#Alternate setups and filesystems]]. ~ [[User:Filam|Filam]] 21:02, 5 March 2012 (EST)}}
+
Why do you think it is neccessary for the array to do a ''# dd if=/dev/zero of=/dev/disk-to-clean bs=4096 count=1'' before creating it?
+
:I don't think it is neccessary all the time, but in some cases it is neccessary to totally clean the MBR and any existing partition tables, including custom setups, hidden partitions, etc..  Perhaps it should be added as an additional tip as it is helpful.
+
: -[[User:AskApache|AskApache]] 22:04, 6 March 2012 (EST)
+
::Ah, sorry, my mistake! You are right. I was just wondering why you used exactly ''bs=4096''. [[User:6arms1leg|6arms1leg]] 05:20, 7 March 2012 (EST)
+
 
+
==Removed information about BAARF and related stuff==
+
{{note|Moved from [[#Alternate setups and filesystems]]. ~ [[User:Filam|Filam]] 21:02, 5 March 2012 (EST)}}
+
I also disagree with you removing the BAARF stuff and the advice to use RAID-10 (not only for redundancy) instead. RAID-5 does have some serious performance issues, using a database on such an array can be a real pain.
+
::There is a note in the RAID 5 definition that recommends using RAID 10. Can you link to the edit you're referring to? ~ [[User:Filam|Filam]] 21:02, 5 March 2012 (EST)
+
:::Yes, there is still a note, but it is very misleading as it only states redundancy as a reason. I like the old version better, which contained much more (important) information. It even had a warning banner. Both edits were made [https://wiki.archlinux.org/index.php?title=RAID&action=historysubmit&diff=186696&oldid=186694 here] (last two removed paragraphs in ''RAID 5'' of the ''Introduction section'': the warning banner + paragraph about BAARF).
+
:::[[User:6arms1leg|6arms1leg]] 05:19, 6 March 2012 (EST)
+
::::Thanks for the link to the edit. I was wondering what you meant by [http://www.miracleas.com/BAARF/ BAARF]. I have added a link to BAARF and Kagel's article under '''External Links'''. Regardless, the content that was removed should be placed back, although perhaps in an improved form. For example, the bullet points in [http://www.miracleas.com/BAARF/1.Millsap2000.01.03-RAID5.pdf Millsap's article] should probably be mentioned, unless there have been some improvements during the 12 years since the article was published. ~ [[User:Filam|Filam]] 23:37, 7 March 2012 (EST)
+
:::::Agreed. That's exctly what I meant. RAID-5 isn't as fast as most people think (wasn't even designed for it). As I said, a database (for example) on RAID-5 is no fun. [[User:6arms1leg|6arms1leg]] 05:00, 8 March 2012 (EST)
+
::::::I'm not saying I don't believe that someone had issues with a DB on RAID-5, but I will say that it is the RAID of choice for big companies like rackspace on their dedicated db machines (as in 32GB RAM monsters). It would be better to find accurate up to date information rather than post outdated problems from one persons experience. ~ [[User:AskApache|AskApache]] 10:28, 1 May 2012 (UTC)
+
 
+
==Wishlist==
+
I would like to see further instructions after assembling the array regarding creating a filesystem and then how to mount that filesystem on the raid array using rc.local or whatever. -[[User:AskApache|AskApache]] 22:19, 6 March 2012 (EST)
+
{{Box||
+
'''Manual example'''
+
Create Filesystem: {{bc|mkfs.xfs -f -L galileo /dev/md/galileo}}
+
Mount Filesystem: {{bc|mount -Lgalileo /mnt/galileo}}
+
'''Automatic example'''
+
Create Filesystem: {{bc|1=mkfs.xfs -f -L galileo /dev/md/galileo}}
+
Add to /etc/fstab: {{bc|1=LABEL=galileo /mnt/galileo xfs defaults,noatime,noauto 0 0}}
+
Add to /etc/rc.local: {{bc|<nowiki>mdadm -As
+
mount -L galileo</nowiki>}}
+
|#727272|#fbfbfb}}
+
:I moved the '''Update configuration file''' section into the '''Installation''' section and then added {{ic|# mdadm --assemble --scan}} as you suggested. I shortened the above example by removing the statements that are already covered in the main article.
+
:Does creating a file system require any steps that differ substantially from the [[Beginners' Guide]] or other applicable articles?
+
:Information about mounting the file system can be added to the [[RAID#Assemble array on boot]] section.
+
:~ [[User:Filam|Filam]] 10:59, 7 March 2012 (EST)
+
::And before I forget, please append new sections to the end of Discussion pages (see: [[Help talk:Style#Discussion_pages]]). ~ [[User:Filam|Filam]] 11:02, 7 March 2012 (EST)
+
 
+
== About update the kernel image in the section: Add to kernel image ==
+
 
+
I think that the command to update the image shold be:
+
# mkinitcpio -p linux
+
Or there is a specific reason to force the installation of the kernel?
+
[[User:Maveloth|Maveloth]] ([[User talk:Maveloth|talk]]) 23:27, 28 September 2012 (UTC)
+
  
:I also reported that in [https://wiki.archlinux.org/index.php?title=ArchWiki%3AReports&diff=225634&oldid=223088 ArchWiki:Reports]. It's very very likely that simply regenerating the image is enough, but I can't test the whole procedure now, so maybe someone should contact the author ([[User:AskApache]]) and ask why he needed to force-reinstall the kernel.
+
I've run into several RAID issues (almost all fs related) and recovering from a bad/broken/damaged RAID can be quite difficult and way confusing. I wrote a shell script that should be run after creating and assembling the array, and optionally after creating the filesystem -- the purpose is to have backups and all the info needed for a recovery situation.  Not sure where to put it so created a tmp user page [[User:AskApache/raid-backup-log]].  Please check it out and help put it/parts of it where they should go on the wiki. -- [[User:AskApache|AskApache]] ([[User talk:AskApache|talk]]) 05:35, 20 October 2012 (UTC)
:-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 05:35, 30 September 2012 (UTC)
+

Revision as of 04:39, 3 November 2012

Max drives stated in RAID level comparison

The chart under the heading RAID level comparison states a max number of drives for each RAID level. Where do these numbers come from? They seem quite erroneous, particularly the 2-drive max stated for RAID 1. I run a few servers with 3-way RAID 1, and as an experiment just did a 6-way RAID 1 with no complaint. Also, I googled and easily found examples of md arrays larger than 16 drives. Here's a 20 drive RAID 6: http://louwrentius.com/blog/2009/07/20-disk-18-tb-raid-6-storage-based-on-debian-linux/

I'm removing these figures as they're obviously not correct. If there are limits to the max number of decices, please add them and include a source that documents them.

--Brucebertrand (talk) 00:28, 15 October 2012 (UTC)

Alternate setups and filesystems

Just wanted to mention these directions worked great for me. It would be nice to have more examples for alternate setups and good ideas for filesystems, etc.. AskApache 15:07, 22 February 2012 (EST)

Hey AskApache, it's really rewarding to hear that this article was helpful. I spent a fair amount of time modifying and updating the old Installing with Software RAID or LVM article. Unfortunately, I was never able to spend enough time updating this article. Thankfully, 6arms1leg has made some excellent contributions, along with yourself.
Anyway, could you explain what alternate setups might apply? The filesystem question is an interesting one. I didn't realize there are alternatives to Linux raid auto. And that the Non-FS data allows you to format the array with any filesystem. After some quick searching, the Optimum RAID article on Linux Pro Magazine looks like a good place to start.
~ Filam 09:51, 23 February 2012 (EST)
Sure Filam, basically I would like more advanced and basic information about everthing! But specifically partioning and filesystems.
Partitioning
  • If you have 5 disks of different sizes, and the smallest disk is 500GB and the largest disk is 1.5TB, you can create a raid array on all 5 by creating a 500GB partition on each disk and use those partitions to create the array.
  • Some people using raid like to create a swap partition on each disk and then make a raid 0 array out of those for a fast swap (which is actually kind of redundant as swap already does raid 0 like striping when given multiple swaps with the same priority).
  • Back to the 5 disks, you could create a 100GB partition on each disk and create a raid 0 array out of that for a super fast /usr, /var, /lib directories which can be replaced in case of data loss. And then create 400GB partition on all 5 disks and create a raid 5 array on those partitions for a fast yet data-redundant /home/ directory.
Filesystems
  • You can create any filesystem on a raid array, but some are noticeably better than others. The same things apply here that are mentioned in the Maximizing Performance article.
  • Basically, XFS might be the best to use for a backup raid array containing large backup files, while reiserfs or ext4 might be the best for /home/.
  • When making an XFS filesystem on a raid array, XFS automagically recognizes it is a raid device and optimizes the XFS filesystem settings for you, however ext and reiserfs may need tweaked settings for optimization.
  • Filesystem settings correlate to the chuck-size and other mdadm options in the initial array creation as well, and should be factored in before creating the array.
Wishlist
  • More instructions on backing up partition tables and maybe even how to restore (good excercise to leave to reader)
  • Different ways to mount the devices in /etc/fstab
  • How to test speed
  • More instructions on customizing the mdadm.conf file
I'm working on this too but probably won't be editing anything again for awhile.. Thanks for this article!
--AskApache 13:00, 27 February 2012 (EST)
Thanks, but i don't really get your points.
@Filam:
What do you mean by filesystem?
A RAID array can be formatted with almost any filesystem that supports its size, while some of course are better suited than others. To the system the array is just a block device under /dev like any other.
If you just mean the fs-type tag in the partition table, the only suitable otions for RAID are "Non-FS data" and "Linux raid auto". But the fs-type tag you choose during partitioning is independant from the filesystem you format a disk/array with. The fs-tag only is important for system processes to recognize the correct filesystem (e.g. auto assembly of a RAID array during boot or using mount without the -t option). "Non-FS data" is the preferred method (see our RAID wiki page here, the paragraph after the note).
@AskApache:
Sure, there is a lot to improve on that wiki page, but before someone makes the effort to write about the details, it would be nice to complete some of the basics. For example we have the most common RAID levels explained in the Introduction section but only one step-by-step guide for a level 5 array.
Also, I disagree with some of your edits in the following sections:
Regarding the combination of RAID and filesystem parameters, that fact is mentioned in this section. There also is a reminder to do the RAID-math, suitable at least for ext-filesystems.
Some things on your wishlist, I think belong in other wiki pages (esp. information about /etc/fstab and partitioning)
Don't take me wrong, I'm glad someone cares about this page.
6arms1leg 18:41, 5 March 2012 (EST)
It's great to hear from you, 6arms1leg, and thanks for the thorough explanation. If it wouldn't be much trouble would you mind moving each of your points about AskApache's edits into a separate section? Or, AskApache, if you come across this first and would like to respond, just copy the point you would like to respond to into another section. Thanks, ~ Filam 10:52, 4 March 2012 (EST)
Not too much trouble at all, but I'm not quite sure what you are picturing. As you can see, I edited my post and moved my points into different sections. To me, the way I rearranged it now, it doesn't improve readability nor provides it a better overview. Please feel free to re-edit my post the way you think it looks best. 6arms1leg 18:41, 5 March 2012 (EST)
Ah, it is probably more clear if I just edit it. The readability was fine, it was just difficult to respond to. ~ Filam 21:02, 5 March 2012 (EST)
Thanks for your effort. 6arms1leg 04:45, 6 March 2012 (EST)

Copy the partition table

Note: Moved from #Alternate setups and filesystems. ~ Filam 21:02, 5 March 2012 (EST)

I don't like or understand your edits on the Copy the partition table section (no offense). To me, your edits make the process more complicated. For example, why did you remove the command # sfdisk -d /dev/path_to_formatted_array_disk | sfdisk /dev/path_to_unformatted_array_disk and replaced it with one that first dumps a file which you then copy to the next disk? And why would you want to keep a backup of your partition table?

I also prefer the use of a pipe. ~ Filam 21:02, 5 March 2012 (EST)
Not sure why you don't like the edit, lol. The reason I replaced the sfdisk command using a pipe to one using a file is 2-fold:
  1. Depending on how your shell is setup or currently configured, using a pipe will not work correctly. This can be caused by a couple things such as the IFS variable and various shell options.
I can't think of any shell in which such a simple pipe wouldn't work. People who change their shell variables and other standard options probably know what they are doing and in that case they should also know the consequences (different shell behavior) and how to still execute a command with a pipe. As far as I know, all commands in this wiki assume a standard shell (with working pipes). 6arms1leg 05:08, 7 March 2012 (EST)
The cause is actually due to how sfdisk is written, not how the shell is written. IOW, this is specific to sfdisk, not pipes. ~ AskApache 10:22, 1 May 2012 (UTC)
  1. By sending the output to a file you can easily replicate it in the future if your original partition table is corrupted.
-AskApache 21:28, 6 March 2012 (EST)
I still don't get this backup thing. Each of your member disks in the array has that partition table. If one gets corrupted you still can replicate it from any of the other member disks. In the unlikely event that all disks fail, you don't need that partition table anyway since you have to create a new array. The only exception I can think of is some rare exotic RAID setup, which only uses some (identical) partitions of each member disk while other partitions on the disk differ and with it the partition table. For such a setup I would prefer a seperate section (or link to another page as it is not RAID specific), which explanes how to backup the partition table. 6arms1leg 05:08, 7 March 2012 (EST)
Backups are a way of life, but you make good points. It is very close to totally unneccessary but backups for me are a habit. Should be moved in separate section.. ~ AskApache 10:22, 1 May 2012 (UTC)

Preparing and Planning for RAID Recovery

I've run into several RAID issues (almost all fs related) and recovering from a bad/broken/damaged RAID can be quite difficult and way confusing. I wrote a shell script that should be run after creating and assembling the array, and optionally after creating the filesystem -- the purpose is to have backups and all the info needed for a recovery situation. Not sure where to put it so created a tmp user page User:AskApache/raid-backup-log. Please check it out and help put it/parts of it where they should go on the wiki. -- AskApache (talk) 05:35, 20 October 2012 (UTC)