Storage Administration Guide
Total Page:16
File Type:pdf, Size:1020Kb
Fedora 14 Storage Administration Guide Deploying and configuring single-node storage in Fedora Josef Bacik Kamil Dudka Hans de Goede Doug Ledford Daniel Novotny Nathan Straz David Wysochanski Michael Christie Storage Administration Guide Sachin Prabhu Rob Evers David Howells David Lehman Jeff Moyer Eric Sandeen Mike Snitzer Fedora 14 Storage Administration Guide Deploying and configuring single-node storage in Fedora Edition 1.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/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. 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. For guidelines on the permitted uses of the Fedora trademarks, refer to https://fedoraproject.org/wiki/ Legal:Trademark_guidelines. 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. Storage Administration Guide This guide provides instructions on how to effectively manage storage devices and file systems on Fedora 14 and later. 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. We Need Feedback! ....................................................................................................... xi 1. Overview 1 1.1. What's New in Fedora 14 ............................................................................................. 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 Fedora 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 ................................................................................ 40 7. The Ext4 File System 43 7.1. Creating an Ext4 File System ...................................................................................... 44 7.2. Converting an Ext3 File System to Ext4 ....................................................................... 44 7.3. Mounting an Ext4 File System .................................................................................... 45 7.4. Resizing an Ext4 File System ..................................................................................... 46 7.5. Other Ext4 File System Utilities ................................................................................... 46 8. The XFS File System 49 8.1. Creating an XFS File System ...................................................................................... 49 8.2. Mounting an XFS File System ..................................................................................... 50 v Storage Administration Guide 8.3. XFS Quota Management ............................................................................................ 51 8.4. Increasing the Size of an XFS File System .................................................................. 52 8.5. Repairing an XFS File System .................................................................................... 53 8.6. Suspending an XFS File System ................................................................................. 53 8.7. Backup and Restoration of XFS File Systems .............................................................. 54 8.8. Other XFS File System Utilities ................................................................................... 55 9. Network File System (NFS) 57 9.1. How It Works ............................................................................................................. 57 9.1.1. Required Services ........................................................................................... 58 9.2. NFS Client Configuration ............................................................................................ 59 9.2.1. Mounting NFS File Systems using /etc/fstab ............................................... 60 9.3. autofs ..................................................................................................................... 60 9.3.1. Improvements in autofs Version 5 over Version 4 ............................................... 61 9.3.2. autofs Configuration .....................................................................................