Software-RAID-HOWTO.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Software-RAID-HOWTO.Pdf 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
Recommended publications
  • VIA RAID Configurations
    VIA RAID configurations The motherboard includes a high performance IDE RAID controller integrated in the VIA VT8237R southbridge chipset. It supports RAID 0, RAID 1 and JBOD with two independent Serial ATA channels. RAID 0 (called Data striping) optimizes two identical hard disk drives to read and write data in parallel, interleaved stacks. Two hard disks perform the same work as a single drive but at a sustained data transfer rate, double that of a single disk alone, thus improving data access and storage. Use of two new identical hard disk drives is required for this setup. RAID 1 (called Data mirroring) copies and maintains an identical image of data from one drive to a second drive. If one drive fails, the disk array management software directs all applications to the surviving drive as it contains a complete copy of the data in the other drive. This RAID configuration provides data protection and increases fault tolerance to the entire system. Use two new drives or use an existing drive and a new drive for this setup. The new drive must be of the same size or larger than the existing drive. JBOD (Spanning) stands for Just a Bunch of Disks and refers to hard disk drives that are not yet configured as a RAID set. This configuration stores the same data redundantly on multiple disks that appear as a single disk on the operating system. Spanning does not deliver any advantage over using separate disks independently and does not provide fault tolerance or other RAID performance benefits. If you use either Windows® XP or Windows® 2000 operating system (OS), copy first the RAID driver from the support CD to a floppy disk before creating RAID configurations.
    [Show full text]
  • Storage Administration Guide Storage Administration Guide SUSE Linux Enterprise Server 12 SP4
    SUSE Linux Enterprise Server 12 SP4 Storage Administration Guide Storage Administration Guide SUSE Linux Enterprise Server 12 SP4 Provides information about how to manage storage devices on a SUSE Linux Enterprise Server. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About This Guide xii 1 Available Documentation xii 2 Giving Feedback xiv 3 Documentation Conventions xiv 4 Product Life Cycle and Support xvi Support Statement for SUSE Linux Enterprise Server xvii • Technology Previews xviii I FILE SYSTEMS AND MOUNTING 1 1 Overview
    [Show full text]
  • Building Reliable Massive Capacity Ssds Through a Flash Aware RAID-Like Protection †
    applied sciences Article Building Reliable Massive Capacity SSDs through a Flash Aware RAID-Like Protection † Jaeho Kim 1 and Jung Kyu Park 2,* 1 Department of Aerospace and Software Engineering & Engineering Research Institute, Gyeongsang National University, Jinju 52828, Korea; [email protected] 2 Department of Computer Software Engineering, Changshin University, Changwon 51352, Korea * Correspondence: [email protected] † This Paper Is an Extended Version of Paper Published in the IEEE International Conference on Consumer Electronics (ICCE) 2020, Las Vegas, NV, USA, 4–6 January 2020. Received: 14 November 2020; Accepted: 16 December 2020; Published: 21 December 2020 Abstract: The demand for mass storage devices has become an inevitable consequence of the explosive increase in data volume. The three-dimensional (3D) vertical NAND (V-NAND) and quad-level cell (QLC) technologies rapidly accelerate the capacity increase of flash memory based storage system, such as SSDs (Solid State Drives). Massive capacity SSDs adopt dozens or hundreds of flash memory chips in order to implement large capacity storage. However, employing such a large number of flash chips increases the error rate in SSDs. A RAID-like technique inside an SSD has been used in a variety of commercial products, along with various studies, in order to protect user data. With the advent of new types of massive storage devices, studies on the design of RAID-like protection techniques for such huge capacity SSDs are important and essential. In this paper, we propose a massive SSD-Aware Parity Logging (mSAPL) scheme that protects against n-failures at the same time in a stripe, where n is protection strength that is specified by the user.
    [Show full text]
  • NVIDIA Magnum IO Gpudirect Storage
    NVIDIA Magnum IO GPUDirect Storage Installation and Troubleshooting Guide TB-10112-001_v1.0.0 | August 2021 Table of Contents Chapter 1. Introduction........................................................................................................ 1 Chapter 2. Installing GPUDirect Storage.............................................................................2 2.1. Before You Install GDS.............................................................................................................2 2.2. Installing GDS............................................................................................................................3 2.2.1. Removal of Prior GDS Installation on Ubuntu Systems...................................................3 2.2.2. Preparing the OS................................................................................................................3 2.2.3. GDS Package Installation.................................................................................................. 4 2.2.4. Verifying the Package Installation.....................................................................................4 2.2.5. Verifying a Successful GDS Installation............................................................................5 2.3. Installed GDS Libraries and Tools...........................................................................................6 2.4. Uninstalling GPUDirect Storage...............................................................................................7 2.5. Environment
    [Show full text]
  • Rethinking RAID for SSD Reliability
    Differential RAID: Rethinking RAID for SSD Reliability Asim Kadav Mahesh Balakrishnan University of Wisconsin Microsoft Research Silicon Valley Madison, WI Mountain View, CA [email protected] [email protected] Vijayan Prabhakaran Dahlia Malkhi Microsoft Research Silicon Valley Microsoft Research Silicon Valley Mountain View, CA Mountain View, CA [email protected] [email protected] ABSTRACT sult, a write-intensive workload can wear out the SSD within Deployment of SSDs in enterprise settings is limited by the months. Also, this erasure limit continues to decrease as low erase cycles available on commodity devices. Redun- MLC devices increase in capacity and density. As a conse- dancy solutions such as RAID can potentially be used to pro- quence, the reliability of MLC devices remains a paramount tect against the high Bit Error Rate (BER) of aging SSDs. concern for its adoption in servers [4]. Unfortunately, such solutions wear out redundant devices at similar rates, inducing correlated failures as arrays age in In this paper, we explore the possibility of using device-level unison. We present Diff-RAID, a new RAID variant that redundancy to mask the effects of aging on SSDs. Clustering distributes parity unevenly across SSDs to create age dispari- options such as RAID can potentially be used to tolerate the ties within arrays. By doing so, Diff-RAID balances the high higher BERs exhibited by worn out SSDs. However, these BER of old SSDs against the low BER of young SSDs. Diff- techniques do not automatically provide adequate protec- RAID provides much greater reliability for SSDs compared tion for aging SSDs; by balancing write load across devices, to RAID-4 and RAID-5 for the same space overhead, and solutions such as RAID-5 cause all SSDs to wear out at ap- offers a trade-off curve between throughput and reliability.
    [Show full text]
  • Disk Array Data Organizations and RAID
    Guest Lecture for 15-440 Disk Array Data Organizations and RAID October 2010, Greg Ganger © 1 Plan for today Why have multiple disks? Storage capacity, performance capacity, reliability Load distribution problem and approaches disk striping Fault tolerance replication parity-based protection “RAID” and the Disk Array Matrix Rebuild October 2010, Greg Ganger © 2 Why multi-disk systems? A single storage device may not provide enough storage capacity, performance capacity, reliability So, what is the simplest arrangement? October 2010, Greg Ganger © 3 Just a bunch of disks (JBOD) A0 B0 C0 D0 A1 B1 C1 D1 A2 B2 C2 D2 A3 B3 C3 D3 Yes, it’s a goofy name industry really does sell “JBOD enclosures” October 2010, Greg Ganger © 4 Disk Subsystem Load Balancing I/O requests are almost never evenly distributed Some data is requested more than other data Depends on the apps, usage, time, … October 2010, Greg Ganger © 5 Disk Subsystem Load Balancing I/O requests are almost never evenly distributed Some data is requested more than other data Depends on the apps, usage, time, … What is the right data-to-disk assignment policy? Common approach: Fixed data placement Your data is on disk X, period! For good reasons too: you bought it or you’re paying more … Fancy: Dynamic data placement If some of your files are accessed a lot, the admin (or even system) may separate the “hot” files across multiple disks In this scenario, entire files systems (or even files) are manually moved by the system admin to specific disks October 2010, Greg
    [Show full text]
  • Identify Storage Technologies and Understand RAID
    LESSON 4.1_4.2 98-365 Windows Server Administration Fundamentals IdentifyIdentify StorageStorage TechnologiesTechnologies andand UnderstandUnderstand RAIDRAID LESSON 4.1_4.2 98-365 Windows Server Administration Fundamentals Lesson Overview In this lesson, you will learn: Local storage options Network storage options Redundant Array of Independent Disk (RAID) options LESSON 4.1_4.2 98-365 Windows Server Administration Fundamentals Anticipatory Set List three different RAID configurations. Which of these three bus types has the fastest transfer speed? o Parallel ATA (PATA) o Serial ATA (SATA) o USB 2.0 LESSON 4.1_4.2 98-365 Windows Server Administration Fundamentals Local Storage Options Local storage options can range from a simple single disk to a Redundant Array of Independent Disks (RAID). Local storage options can be broken down into bus types: o Serial Advanced Technology Attachment (SATA) o Integrated Drive Electronics (IDE, now called Parallel ATA or PATA) o Small Computer System Interface (SCSI) o Serial Attached SCSI (SAS) LESSON 4.1_4.2 98-365 Windows Server Administration Fundamentals Local Storage Options SATA drives have taken the place of the tradition PATA drives. SATA have several advantages over PATA: o Reduced cable bulk and cost o Faster and more efficient data transfer o Hot-swapping technology LESSON 4.1_4.2 98-365 Windows Server Administration Fundamentals Local Storage Options (continued) SAS drives have taken the place of the traditional SCSI and Ultra SCSI drives in server class machines. SAS have several
    [Show full text]
  • Architectures and Algorithms for On-Line Failure Recovery in Redundant Disk Arrays
    Architectures and Algorithms for On-Line Failure Recovery in Redundant Disk Arrays Draft copy submitted to the Journal of Distributed and Parallel Databases. A revised copy is published in this journal, vol. 2 no. 3, July 1994.. Mark Holland Department of Electrical and Computer Engineering Carnegie Mellon University 5000 Forbes Ave. Pittsburgh, PA 15213-3890 (412) 268-5237 [email protected] Garth A. Gibson School of Computer Science Carnegie Mellon University 5000 Forbes Ave. Pittsburgh, PA 15213-3890 (412) 268-5890 [email protected] Daniel P. Siewiorek School of Computer Science Carnegie Mellon University 5000 Forbes Ave. Pittsburgh, PA 15213-3890 (412) 268-2570 [email protected] Architectures and Algorithms for On-Line Failure Recovery In Redundant Disk Arrays1 Abstract The performance of traditional RAID Level 5 arrays is, for many applications, unacceptably poor while one of its constituent disks is non-functional. This paper describes and evaluates mechanisms by which this disk array failure-recovery performance can be improved. The two key issues addressed are the data layout, the mapping by which data and parity blocks are assigned to physical disk blocks in an array, and the reconstruction algorithm, which is the technique used to recover data that is lost when a component disk fails. The data layout techniques this paper investigates are variations on the declustered parity organiza- tion, a derivative of RAID Level 5 that allows a system to trade some of its data capacity for improved failure-recovery performance. Parity declustering improves the failure-mode performance of an array significantly, and a parity-declustered architecture is preferable to an equivalent-size multiple-group RAID Level 5 organization in environments where failure-recovery performance is important.
    [Show full text]
  • How Netflix Tunes EC2 Instances for Performance
    CMP325 How Netflix Tunes EC2 Instances for Performance Brendan Gregg, Performance and OS Engineering Team November 28, 2017 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Netflix performance and operating systems team • Evaluate technology - Instance types, Amazon Elastic Compute Cloud (EC2) options • Recommendations and best practices - Instance kernel tuning, assist app tuning • Develop performance tools - Develop tools for observability and analysis • Project support - New database, programming language, software change • Incident response - Performance issues, scalability issues © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda 1. Instance selection 2. Amazon EC2 features 3. Kernel tuning 4. Methodologies 5. Observability © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Warnings • This is what’s in our medicine cabinet • Consider these “best before: 2018” • Take only if prescribed by a performance engineer © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1. Instance selection © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The Netflix cloud Many application workloads: Compute, storage, caching… EC2 Applications (services) S3 ELB Elasticsearch Cassandra EVCache SES SQS © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Netflix AWS environment • Elastic Load Balancing ASG Cluster allows real load testing prod1 ELB 1. Single instance canary, then, Canary 2. Auto scaling group • Much better than micro- ASG-v010 ASG-v011 benchmarking alone, which … … is error prone Instance Instance Instance Instance Instance Instance Instance Instance Instance Instance © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
    [Show full text]
  • Setup Software RAID1 Array on Running Centos 6.3 Using Mdadm
    Setup software RAID1 array on running CentOS 6.3 using mdadm. (Multiple Device Administrator) All commands run from terminal as super user. Default CentOS 6.3 installation with two hard drives, /dev/sda and /dev/sdb which are identical in size. Machine name is “serverbox.local”. /dev/sdb is currently unused, and /dev/sda has the following partitions: /dev/sda1: /boot partition, ext4; /dev/sda2: is used for LVM (volume group vg_serverbox) and contains / (volume root), swap (volume swap_1) and /home (volume home). Final RAID1 configuration: /dev/md0 (made up of /dev/sda1 and /dev/sdb1): /boot partition, ext4; /dev/md1 (made up of /dev/sda2 and /dev/sdb2): LVM (volume group vg_serverbox), contains / (volume root), swap (volume swap_1) and /home (volume home). 1. Gather information about current system. Report the current disk space usage: df -h View physical disks: fdisk -l View physical volumes on logical disk partition: pvdisplay View virtual group details: vgdisplay View Logical volumes: lvdisplay Load kernel modules (to avoid a reboot): modprobe linear modprobe raid0 modprobe raid1 Verify personalities: cat /proc/mdstat The output should look as follows: serverbox:~# cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] unused devices: <none> 2. Preparing /dev/sdb To create a RAID1 array on a running system, prepare the /dev/sdb hard drive for RAID1, then copy the contents of /dev/sda hard drive to it, and finally add /dev/sda to the RAID1 array. Copy the partition table from /dev/sda
    [Show full text]
  • Setting up Software RAID in Ubuntu Server | Secu
    Setting up software RAID in Ubuntu Server | Secu... http://advosys.ca/viewpoints/2007/04/setting-up-so... Setting up software RAID in Ubuntu Server April 24th, 2007 Posted by Derrick Webber Updated Mar 13 2009 to reflect improvements in Ubuntu 8.04 and later. Linux has excellent software-based RAID built into the kernel. Unfortunately information on configuring and maintaining it is sparse. Back in 2003, O’Reilly published Managing RAID on Linux and that book is still mostly up to date, but finding clear instructions on the web for setting up RAID has become a chore. Here is how to install Ubuntu Server with software RAID 1 (disk mirroring). This guide has been tested on Ubuntu Server 8.04 LTS (Hardy Heron). I strongly recommend using Ubuntu Hardy or later if you want to boot from RAID1. Software RAID vs. hardware RAID Some system administrators still sneer at the idea of software RAID. Years ago CPUs didn’t have the speed to manage both a busy server and RAID activities. That’s not true any more, especially when all you want to do is mirror a drive with RAID1. Linux software RAID is ideal for mirroring, and due to kernel disk caching and buffering it can actually be faster than RAID1 on lower end RAID hardware. However, for larger requirements like RAID 5, the CPU can still get bogged down with software RAID. Software RAID is inexpensive to implement: no need for expensive controllers or identical drives. Software RAID works 1 de 23 27/09/09 13:41 Setting up software RAID in Ubuntu Server | Secu..
    [Show full text]
  • Ubuntu Server Guide Basic Installation Preparing to Install
    Ubuntu Server Guide Welcome to the Ubuntu Server Guide! This site includes information on using Ubuntu Server for the latest LTS release, Ubuntu 20.04 LTS (Focal Fossa). For an offline version as well as versions for previous releases see below. Improving the Documentation If you find any errors or have suggestions for improvements to pages, please use the link at thebottomof each topic titled: “Help improve this document in the forum.” This link will take you to the Server Discourse forum for the specific page you are viewing. There you can share your comments or let us know aboutbugs with any page. PDFs and Previous Releases Below are links to the previous Ubuntu Server release server guides as well as an offline copy of the current version of this site: Ubuntu 20.04 LTS (Focal Fossa): PDF Ubuntu 18.04 LTS (Bionic Beaver): Web and PDF Ubuntu 16.04 LTS (Xenial Xerus): Web and PDF Support There are a couple of different ways that the Ubuntu Server edition is supported: commercial support and community support. The main commercial support (and development funding) is available from Canonical, Ltd. They supply reasonably- priced support contracts on a per desktop or per-server basis. For more information see the Ubuntu Advantage page. Community support is also provided by dedicated individuals and companies that wish to make Ubuntu the best distribution possible. Support is provided through multiple mailing lists, IRC channels, forums, blogs, wikis, etc. The large amount of information available can be overwhelming, but a good search engine query can usually provide an answer to your questions.
    [Show full text]