13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 5 ■ WORKING WITH FILESYSTEMSIt’s important to bear in mind that RAID, of any variety, is not a backup in and of itself. In particular,if all your disks are of the same vintage (which is likely in almost all cases, because you’ll probably havebought them all at the same time), the probability of more than one of them failing simultaneously is notindependent; it’s, if not likely, at least not unlikely that this will happen. This also means that if you dohave a disk fail, you don’t want to delay in replacing it, because the extra strain on the single disk may beenough to trigger another fail event.For a small array, RAID5 is probably the best bet, because it provides both faster access than with asingle non-RAID disk and fault tolerance. The larger the array, the more likely it is that two disks will failat once, and thus the more useful RAID6 becomes. RAID6 works out to be more expensive in diskpurchases, because you lose (in effect) two disks’ worth of space per array. A RAID6 array of six 500GBdisks will have 2TB (4 × 500GB) of useful space, while the same array setup as RAID5 will have 2.5TB (5 ×500GB) of space.■ Note You can also add a hot spare disk or disks in RAID5 and RAID6 setups. In the event of a disk failure, thehot spare will automatically be swapped in, meaning that a second disk failure won’t cause problems. Again, it’simportant to replace the failed disk ASAP, and this increases the cost further because the hot spare disk doesn’tadd anything to the usable capacity of the drive.The other decision to make is hardware vs. software RAID, in other words, whether the physical datadistribution is managed by a hardware controller or by a software layer sitting between the logical drives(what your filesystem sees) and the physical devices. Software RAID will be cheaper but may have slowerperformance; however, upgrading your server CPU can produce significant improvements in softwareRAID. In the event of controller failure, in a software RAID setup, disks can be moved to another serverrunning the same OS, whereas you might well have to buy a new matching hardware controller to rescueyour hardware RAID data. (You do have a backup as well, right?) Software RAID also enables you tocreate RAID arrays from partitions rather than from whole disks, so you can mix RAID levels on differentdisk partitions.■ Note You shouldn’t have two partitions on the same physical disk acting as part of the same RAID, because inthe event of disk failure, this means you lose two RAID sections rather than just one.mdadmIf you’re using software RAID, you may well be using mdadm to manage it. The default setup, set in/etc/mdadm/mdadm.conf, should be that you’ll receive warnings of any problems via email. This willprobably go to root unless you’ve changed it, so make sure that you have something useful set as yourroot e-mail address in /etc/aliases (which is a good idea anyway!):root: admin@example.com129Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!