Software-RAID-HOWTO.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Software-RAID-HOWTO Software-RAID-HOWTO Table of Contents The Software-RAID HOWTO...........................................................................................................................1 Jakob Østergaard [email protected] and Emilio Bueso [email protected] 1. Introduction..........................................................................................................................................1 2. Why RAID?.........................................................................................................................................1 3. Devices.................................................................................................................................................1 4. Hardware issues...................................................................................................................................1 5. RAID setup..........................................................................................................................................1 6. Detecting, querying and testing...........................................................................................................2 7. Tweaking, tuning and troubleshooting................................................................................................2 8. Reconstruction.....................................................................................................................................2 9. Performance.........................................................................................................................................2 10. Related tools......................................................................................................................................2 11. Partitioning RAID / LVM on RAID..................................................................................................3 12. Credits................................................................................................................................................3 13. Changelog..........................................................................................................................................3 1. Introduction..........................................................................................................................................3 1.1 Disclaimer..........................................................................................................................................3 1.2 What is RAID?...................................................................................................................................3 1.3 Terms.................................................................................................................................................4 1.4 The RAID levels................................................................................................................................4 1.5 Requirements.....................................................................................................................................6 2. Why RAID?.........................................................................................................................................6 2.1 Device and filesystem support...........................................................................................................7 2.2 Performance.......................................................................................................................................7 2.3 Swapping on RAID............................................................................................................................7 2.4 Why mdadm?.....................................................................................................................................8 3. Devices.................................................................................................................................................8 3.1 Spare disks.........................................................................................................................................9 3.2 Faulty disks........................................................................................................................................9 4. Hardware issues...................................................................................................................................9 4.1 IDE Configuration.............................................................................................................................9 4.2 Hot Swap..........................................................................................................................................10 Hot-swapping IDE drives................................................................................................................10 Hot-swapping SCSI drives..............................................................................................................11 Hot-swapping with SCA.................................................................................................................11 5. RAID setup........................................................................................................................................12 5.1 General setup...................................................................................................................................12 5.2 Downloading and installing the RAID tools....................................................................................12 5.3 Downloading and installing mdadm................................................................................................12 5.4 Linear mode.....................................................................................................................................13 5.5 RAID-0............................................................................................................................................14 5.6 RAID-1............................................................................................................................................14 5.7 RAID-4............................................................................................................................................15 5.8 RAID-5............................................................................................................................................16 5.9 The Persistent Superblock................................................................................................................17 5.10 Chunk sizes....................................................................................................................................18 RAID-0............................................................................................................................................18 RAID-0 with ext2............................................................................................................................19 i Software-RAID-HOWTO Table of Contents The Software-RAID HOWTO RAID-1............................................................................................................................................19 RAID-4............................................................................................................................................19 RAID-5............................................................................................................................................19 5.11 Options for mke2fs........................................................................................................................20 6. Detecting, querying and testing.........................................................................................................20 6.1 Detecting a drive failure...................................................................................................................20 6.2 Querying the arrays status................................................................................................................21 6.3 Simulating a drive failure.................................................................................................................22 Force-fail by hardware....................................................................................................................22 Force-fail by software.....................................................................................................................22 6.4 Simulating data corruption...............................................................................................................23 6.5 Monitoring RAID arrays..................................................................................................................24 7. Tweaking, tuning and troubleshooting..............................................................................................24 7.1 raid-level and raidtab.......................................................................................................................24 7.2 Autodetection...................................................................................................................................25 7.3 Booting on RAID.............................................................................................................................26 7.4 Root filesystem on RAID................................................................................................................26