Product SiteDocumentation Site

Red Hat Enterprise Linux 6

Storage Administration Guide

Deploying and configuring single-node storage in Red Hat Enterprise Linux 6

Edition 1

Logo

Edited by

Don Domingo

Engineering Content Services

Edited by

Jacquelynn East

Engineering Content Services

Red Hat Subject Matter Experts

Josef Bacik

Disk Quotas 
Server Development Kernel File System

Kamil Dudka

Access Control Lists 
Base Operating System Core Services - BRNO

Hans de Goede

Partitions 
Base Operating System Installer

Doug Ledford

RAID 
Server Development Hardware Enablement

Daniel Novotny

The /proc File System 
Base Operating System Core Services - BRNO

Nathan Straz

GFS2 
Quality Engineering QE - Platform

David Wysochanski

LVM/LVM2 
Server Development Kernel Storage

Contributors

Michael Christie

Online Storage 
Server Development Kernel Storage

Sachin Prabhu

NFS 
Software Maintenance Engineering

Rob Evers

Online Storage 
Server Development Kernel Storage

David Howells

FS-Cache 
Server Development Hardware Enablement

David Lehman

Storage configuration during installation 
Base Operating System Installer

Jeff Moyer

Solid-State Disks 
Server Development Kernel File System

Eric Sandeen

ext3, ext4, XFS, Encrypted File Systems 
Server Development Kernel File System

Mike Snitzer

I/O Stack and Limits 
Server Development Kernel Storage

Legal Notice

Copyright © 2011 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
RaleighNC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701

Abstract
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
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
2.2. We Need Feedback!
1. Overview
1.1. What's New in Red Hat Enterprise Linux 6
2. Storage Considerations During Installation
2.1. Updates to Storage Configuration During Installation
2.2. Overview of Supported File Systems
2.3. Special Considerations
3. Btrfs
3.1. Btrfs Features
4. LVM (Logical Volume Manager)
4.1. What is LVM2?
4.2. Using system-config-lvm
4.2.1. Utilizing Uninitialized Entities
4.2.2. Adding Unallocated Volumes to a Volume Group
4.2.3. Migrating Extents
4.2.4. Adding a New Hard Disk Using LVM
4.2.5. Adding a New Volume Group
4.2.6. Extending a Volume Group
4.2.7. Editing a Logical Volume
4.3. References
5. Partitions
5.1. Viewing the Partition Table
5.2. Creating a Partition
5.2.1. Making the Partition
5.2.2. Formatting and Labeling the Partition
5.2.3. Add to /etc/fstab
5.3. Removing a Partition
5.4. Resizing a Partition
6. File System Structure
6.1. Why Share a Common Structure?
6.2. Overview of File System Hierarchy Standard (FHS)
6.2.1. FHS Organization
6.3. Special Red Hat Enterprise Linux File Locations
6.4. The /proc Virtual File System
7. Using the mount Command
7.1. Listing Currently Mounted File Systems
7.1.1. Specifying the File System Type
7.2. Mounting a File System
7.2.1. Specifying the File System Type
7.2.2. Specifying the Mount Options
7.2.3. Sharing Mounts
7.2.4. Moving a Mount Point
7.3. Unmounting a File System
7.4. Documentation
7.4.1. Manual Page Documentation
7.4.2. Useful Websites
8. The Ext3 File System
8.1. Creating an Ext3 File System
8.2. Converting to an Ext3 File System
8.3. Reverting to an Ext2 File System
9. The Ext4 File System
9.1. Creating an Ext4 File System
9.2. Mounting an Ext4 File System
9.3. Resizing an Ext4 File System
9.4. Other Ext4 File System Utilities
10. Global File System 2
11. The XFS File System
11.1. Creating an XFS File System
11.2. Mounting an XFS File System
11.3. XFS Quota Management
11.4. Increasing the Size of an XFS File System
11.5. Repairing an XFS File System
11.6. Suspending an XFS File System
11.7. Backup and Restoration of XFS File Systems
11.8. Other XFS File System Utilities
12. Network File System (NFS)
12.1. How It Works
12.1.1. Required Services
12.2. pNFS
12.3. NFS Client Configuration
12.3.1. Mounting NFS File Systems using /etc/fstab
12.4. autofs
12.4.1. Improvements in autofs Version 5 over Version 4
12.4.2. autofs Configuration
12.4.3. Overriding or Augmenting Site Configuration Files
12.4.4. Using LDAP to Store Automounter Maps
12.5. Common NFS Mount Options
12.6. Starting and Stopping NFS
12.7. NFS Server Configuration
12.7.1. The /etc/exports Configuration File
12.7.2. The exportfs Command
12.7.3. Running NFS Behind a Firewall
12.7.4. Hostname Formats
12.8. Securing NFS
12.8.1. NFS Security with AUTH_SYS and export controls
12.8.2. NFS security with AUTH_GSS
12.8.3. File Permissions
12.9. NFS and rpcbind
12.9.1. Troubleshooting NFS and rpcbind
12.10. Using NFS over UDP
12.11. References
13. FS-Cache
13.1. Performance Guarantee
13.2. Setting Up a Cache
13.3. Using the Cache With NFS
13.3.1. Cache Sharing
13.3.2. Cache Limitations With NFS
13.4. Setting Cache Cull Limits
13.5. Statistical Information
13.6. References
14. Encrypted File System
14.1. Mounting a File System as Encrypted
14.2. Additional Information
15. The volume_key function
15.1. Commands
15.2. Using volume_key as an individual user
15.3. Using volume_key in a larger organization
15.3.1. Preparation for saving encryption keys
15.3.2. Saving encryption keys
15.3.3. Restoring access to a volume
15.3.4. Setting up emergency passphrases
15.4. Documentation
16. Redundant Array of Independent Disks (RAID)
16.1. What is RAID?
16.2. Who Should Use RAID?
16.3. RAID Types
16.4. RAID Levels and Linear Support
16.5. Linux RAID Subsystems
16.6. RAID Support in the Installer
16.7. Configuring RAID Sets
16.8. Advanced RAID Device Creation
17. Swap Space
17.1. What is Swap Space?
17.2. Adding Swap Space
17.2.1. Extending Swap on an LVM2 Logical Volume
17.2.2. Creating an LVM2 Logical Volume for Swap
17.2.3. Creating a Swap File
17.3. Removing Swap Space
17.3.1. Reducing Swap on an LVM2 Logical Volume
17.3.2. Removing an LVM2 Logical Volume for Swap
17.3.3. Removing a Swap File
17.4. Moving Swap Space
18. Disk Quotas
18.1. Configuring Disk Quotas
18.1.1. Enabling Quotas
18.1.2. Remounting the File Systems
18.1.3. Creating the Quota Database Files
18.1.4. Assigning Quotas per User
18.1.5. Assigning Quotas per Group
18.1.6. Setting the Grace Period for Soft Limits
18.2. Managing Disk Quotas
18.2.1. Enabling and Disabling
18.2.2. Reporting on Disk Quotas
18.2.3. Keeping Quotas Accurate
18.3. References
19. Access Control Lists
19.1. Mounting File Systems
19.1.1. NFS
19.2. Setting Access ACLs
19.3. Setting Default ACLs
19.4. Retrieving ACLs
19.5. Archiving File Systems With ACLs
19.6. Compatibility with Older Systems
19.7. References
20. Write Barriers
20.1. Importance of Write Barriers
20.2. Enabling/Disabling Write Barriers
20.3. Write Barrier Considerations
21. Storage I/O Alignment and Size
21.1. Parameters for Storage Access
21.2. Userspace Access
21.3. Standards
21.4. Stacking I/O Parameters
21.5. Logical Volume Manager
21.6. Partition and File System Tools
22. Setting Up A Remote Diskless System
22.1. Configuring a tftp Service for Diskless Clients
22.2. Configuring DHCP for Diskless Clients
22.3. Configuring an Exported File System for Diskless Clients
23. Solid-State Disk Deployment Guidelines
23.1. Deployment Considerations
23.2. Tuning Considerations
24. Online Storage Management
24.1. Fibre Channel
24.1.1. Fibre Channel API
24.1.2. Native Fibre Channel Drivers and Capabilities
24.2. iSCSI
24.2.1. iSCSI API
24.3. Persistent Naming
24.3.1. WWID
24.3.2. UUID and Other Persistent Identifiers
24.4. Removing a Storage Device
24.5. Removing a Path to a Storage Device
24.6. Adding a Storage Device or Path
24.7. Configuring a Fibre-Channel Over Ethernet Interface
24.8. Configuring an FCoE Interface to Automatically Mount at Boot
24.9. Scanning Storage Interconnects
24.10. iSCSI Discovery Configuration
24.11. Configuring iSCSI Offload and Interface Binding
24.11.1. Viewing Available iface Configurations
24.11.2. Configuring an iface for Software iSCSI
24.11.3. Configuring an iface for iSCSI Offload
24.11.4. Binding/Unbinding an iface to a Portal
24.12. Scanning iSCSI Interconnects
24.13. Logging In to an iSCSI Target
24.14. Resizing an Online Logical Unit
24.14.1. Resizing Fibre Channel Logical Units
24.14.2. Resizing an iSCSI Logical Unit
24.14.3. Updating the Size of Your Multipath Device
24.15. Adding/Removing a Logical Unit Through rescan-scsi-bus.sh
24.16. Modifying Link Loss Behavior
24.16.1. Fibre Channel
24.16.2. iSCSI Settings With dm-multipath
24.16.3. iSCSI Root
24.17. Controlling the SCSI Command Timer and Device Status
24.18. Troubleshooting
25. Device Mapper Multipathing and Virtual Storage
25.1. Virtual Storage
25.2. DM-Multipath
A. Revision History
Glossary
Index