Red Hat Enterprise Linux 6 Storage Administration Guide
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat Enterprise Linux 6 Storage Administration Guide Deploying and configuring single-node storage in Red Hat Enterprise Linux 6 Josef Bacik Kamil Dudka Hans de Goede Doug Ledford Daniel Novotny Storage Administration Guide Nathan Straz David Wysochanski Michael Christie Sachin Prabhu Rob Evers David Howells David Lehman Jeff Moyer Eric Sandeen Mike Snitzer Red Hat Enterprise Linux 6 Storage Administration Guide Deploying and configuring single-node storage in Red Hat Enterprise Linux 6 Edition 0 Author Josef Bacik [email protected] Author Kamil Dudka [email protected] Author Hans de Goede [email protected] Author Doug Ledford [email protected] Author Daniel Novotny [email protected] Author Nathan Straz [email protected] Author David Wysochanski [email protected] Author Michael Christie [email protected] Author Sachin Prabhu [email protected] Author Rob Evers [email protected] Author David Howells [email protected] Author David Lehman [email protected] Author Jeff Moyer [email protected] Author Eric Sandeen [email protected] Author Mike Snitzer [email protected] Editor Don Domingo [email protected] Copyright © 2010 Red Hat Inc. and others. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries. All other trademarks are the property of their respective owners. 1801 Varsity Drive Raleigh, NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 Storage Administration Guide This guide provides instructions on how to effectively manage storage devices and file systems on Red Hat Enterprise Linux 6. It is intended for use by system administrators with basic to intermediate knowledge of Red Hat Enterprise Linux or Fedora. Preface ix 1. Document Conventions ................................................................................................... ix 1.1. Typographic Conventions ..................................................................................... ix 1.2. Pull-quote Conventions ......................................................................................... x 1.3. Notes and Warnings ............................................................................................ xi 2. Getting Help and Giving Feedback .................................................................................. xi 2.1. Do You Need Help? ............................................................................................. xi 2.2. We Need Feedback! ........................................................................................... xii 1. Overview 1 1.1. What's New in Red Hat Enterprise Linux 6 .................................................................... 1 2. Storage Considerations During Installation 3 2.1. Updates to Storage Configuration During Installation ...................................................... 3 2.2. Overview of Supported File Systems ............................................................................. 3 2.3. Special Considerations ................................................................................................. 4 3. LVM (Logical Volume Manager) 7 3.1. What is LVM2? ............................................................................................................ 8 3.2. Using system-config-lvm ........................................................................................ 8 3.2.1. Utilizing Uninitialized Entities ............................................................................ 11 3.2.2. Adding Unallocated Volumes to a Volume Group ............................................... 11 3.2.3. Migrating Extents ............................................................................................. 13 3.2.4. Adding a New Hard Disk Using LVM ................................................................. 15 3.2.5. Adding a New Volume Group ........................................................................... 16 3.2.6. Extending a Volume Group .............................................................................. 17 3.2.7. Editing a Logical Volume .................................................................................. 18 3.3. References ................................................................................................................ 21 4. Partitions 23 4.1. Viewing the Partition Table .......................................................................................... 24 4.2. Creating a Partition .................................................................................................... 25 4.2.1. Making the Partition ......................................................................................... 25 4.2.2. Formatting and Labeling the Partition ................................................................ 26 4.2.3. Add to /etc/fstab ........................................................................................ 26 4.3. Removing a Partition .................................................................................................. 27 4.4. Resizing a Partition .................................................................................................... 27 5. File System Structure 29 5.1. Why Share a Common Structure? ............................................................................... 29 5.2. Overview of File System Hierarchy Standard (FHS) ...................................................... 29 5.2.1. FHS Organization ............................................................................................ 29 5.3. Special Red Hat Enterprise Linux File Locations .......................................................... 36 5.4. The /proc Virtual File System ...................................................................................... 37 6. The Ext3 File System 39 6.1. Creating an Ext3 File System ...................................................................................... 40 6.2. Converting to an Ext3 File System .............................................................................. 40 6.3. Reverting to an Ext2 File System ................................................................................ 41 7. The Ext4 File System 43 7.1. Creating an Ext4 File System ...................................................................................... 44 7.2. Mounting an Ext4 File System .................................................................................... 45 7.3. Resizing an Ext4 File System ..................................................................................... 45 7.4. Other Ext4 File System Utilities ................................................................................... 46 8. Global File System 2 47 v Storage Administration Guide 9. The XFS File System 49 9.1. Creating an XFS File System ...................................................................................... 49 9.2. Mounting an XFS File System ..................................................................................... 50 9.3. XFS Quota Management ............................................................................................ 51 9.4. Increasing the Size of an XFS File System .................................................................. 52 9.5. Repairing an XFS File System .................................................................................... 53 9.6. Suspending an XFS File System ................................................................................. 53 9.7. Backup and Restoration of XFS File Systems .............................................................. 54 9.8. Other XFS File System Utilities ................................................................................... 55 10. Network File System (NFS) 57 10.1. How It Works ........................................................................................................... 57 10.1.1. Required Services .......................................................................................... 58 10.2. NFS Client Configuration .......................................................................................... 59 10.2.1. Mounting NFS File Systems using /etc/fstab .............................................. 60 10.3. autofs .................................................................................................................... 60 10.3.1. Improvements in autofs Version 5 over Version 4 ............................................. 61