Using RAID in Linux - page 5
The Mysteries of RAID
This is a good question. First of all--what don't we need to keep in an array? There is no sense to keep our swap there there, especially in a RAID 0 or RAID 5 configuration. Linux can put its swap on common disks and will handle the swap space better. For example, /etc/fstab configuration can look like:
/dev/sda2 swap swap defaults,pri=1 0 0 /dev/sdb2 swap swap defaults,pri=1 0 0 /dev/sdc2 swap swap defaults,pri=1 0 0 /dev/sdd2 swap swap defaults,pri=1 0 0
which means that partitions /dev/sda2 to /dev/sdd2 are using swap with equal priority and the system will balance the load on them itself.
The only exception to this approach is when using RAID 1--in this case, the mirroring of swap-partitions can increase the long-life of your system. In case a disk crashes, then, the computer will continue to work with the swap space on the mirror.
Should we place the root file system on the array and/or try to boot from it? I don't know the proper answer, and it's a never-ending dispute among system administrators. From my point of view, there is no profitability in such a configuration, and only possible harm when you may not be able to boot at all.
In any case, it's kind of a moot point, since nowadays there is no possibility to boot from any RAID except RAID 1. Therefore, if you want to keep file systems (for some reason) on any other level of array, you will need to create a special separate partition (/boot) for kernel loading.
Also, I don't think it's good idea to keep /usr on RAID 0 or RAID 5, because in case of array rejection or breakdown, you can easily lose all the useful system tools, and without them you will have really big problems trying to restore your system integrity.
There are also the file systems /home, /opt, /var, /tmp, /usr/local and others to consider. When planning RAID, remember that usually UNIX filesystems like /home, /opt, and /usr/local obviously keep "slow-changing" data, and file systems like /var "fast-changing" data. And for /tmp, well, we don't need to take care of it at all after a system crash. So, I recommend that for /home, /opt, and /usr/local the best choice will be RAID 5 and for /var its preferable to apply RAID 0 or RAID 10. Remember, everything you decide about RAID configuration should come from your system targets and common sense.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Gives Up on Upstart, Ubuntu and Linux Kernel Updates