Red Hat Enterprise Linux 6

Storage Administration Guide

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

Edition 2

Logo

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 © 2013 Red Hat Inc. and others.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
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.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.

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
I. File Systems
2. File System Structure and Maintenance
2.1. Why Share a Common Structure?
2.2. Overview of Filesystem Hierarchy Standard (FHS)
2.2.1. FHS Organization
2.3. Special Red Hat Enterprise Linux File Locations
2.4. The /proc Virtual File System
2.5. Discard unused blocks
3. Encrypted File System
3.1. Mounting a File System as Encrypted
3.2. Additional Information
4. Btrfs
4.1. Btrfs Features
5. The Ext3 File System
5.1. Creating an Ext3 File System
5.2. Converting to an Ext3 File System
5.3. Reverting to an Ext2 File System
6. The Ext4 File System
6.1. Creating an Ext4 File System
6.2. Mounting an Ext4 File System
6.3. Resizing an Ext4 File System
6.4. Other Ext4 File System Utilities
7. Global File System 2
8. The XFS File System
8.1. Creating an XFS File System
8.2. Mounting an XFS File System
8.3. XFS Quota Management
8.4. Increasing the Size of an XFS File System
8.5. Repairing an XFS File System
8.6. Suspending an XFS File System
8.7. Backup and Restoration of XFS File Systems
8.8. Other XFS File System Utilities
9. Network File System (NFS)
9.1. How It Works
9.1.1. Required Services
9.2. pNFS
9.3. NFS Client Configuration
9.3.1. Mounting NFS File Systems using /etc/fstab
9.4. autofs
9.4.1. Improvements in autofs Version 5 over Version 4
9.4.2. autofs Configuration
9.4.3. Overriding or Augmenting Site Configuration Files
9.4.4. Using LDAP to Store Automounter Maps
9.5. Common NFS Mount Options
9.6. Starting and Stopping NFS
9.7. NFS Server Configuration
9.7.1. The /etc/exports Configuration File
9.7.2. The exportfs Command
9.7.3. Running NFS Behind a Firewall
9.7.4. Hostname Formats
9.7.5. NFS over RDMA
9.8. Securing NFS
9.8.1. NFS Security with AUTH_SYS and export controls
9.8.2. NFS security with AUTH_GSS
9.8.3. File Permissions
9.9. NFS and rpcbind
9.9.1. Troubleshooting NFS and rpcbind
9.10. References
10. FS-Cache
10.1. Performance Guarantee
10.2. Setting Up a Cache
10.3. Using the Cache With NFS
10.3.1. Cache Sharing
10.3.2. Cache Limitations With NFS
10.4. Setting Cache Cull Limits
10.5. Statistical Information
10.6. References
II. Storage Administration
11. Storage Considerations During Installation
11.1. Updates to Storage Configuration During Installation
11.2. Overview of Supported File Systems
11.3. Special Considerations
12. File System Check
12.1. Best Practices for fsck
12.2. Filesystem-Specific Information for fsck
12.2.1. ext2, ext3, and ext4
12.2.2. XFS
12.2.3. Btrfs
13. Partitions
13.1. Viewing the Partition Table
13.2. Creating a Partition
13.2.1. Making the Partition
13.2.2. Formatting and Labeling the Partition
13.2.3. Add to /etc/fstab
13.3. Removing a Partition
13.4. Resizing a Partition
14. LVM (Logical Volume Manager)
14.1. What is LVM2?
14.2. Using system-config-lvm
14.2.1. Utilizing Uninitialized Entities
14.2.2. Adding Unallocated Volumes to a Volume Group
14.2.3. Migrating Extents
14.2.4. Adding a New Hard Disk Using LVM
14.2.5. Adding a New Volume Group
14.2.6. Extending a Volume Group
14.2.7. Editing a Logical Volume
14.3. References
15. Swap Space
15.1. What is Swap Space?
15.2. Adding Swap Space
15.2.1. Extending Swap on an LVM2 Logical Volume
15.2.2. Creating an LVM2 Logical Volume for Swap
15.2.3. Creating a Swap File
15.3. Removing Swap Space
15.3.1. Reducing Swap on an LVM2 Logical Volume
15.3.2. Removing an LVM2 Logical Volume for Swap
15.3.3. Removing a Swap File
15.4. Moving Swap Space
16. Disk Quotas
16.1. Configuring Disk Quotas
16.1.1. Enabling Quotas
16.1.2. Remounting the File Systems
16.1.3. Creating the Quota Database Files
16.1.4. Assigning Quotas per User
16.1.5. Assigning Quotas per Group
16.1.6. Setting the Grace Period for Soft Limits
16.2. Managing Disk Quotas
16.2.1. Enabling and Disabling
16.2.2. Reporting on Disk Quotas
16.2.3. Keeping Quotas Accurate
16.3. References
17. Redundant Array of Independent Disks (RAID)
17.1. What is RAID?
17.2. Who Should Use RAID?
17.3. RAID Types
17.4. RAID Levels and Linear Support
17.5. >Linux RAID Subsystems
17.6. RAID Support in the Installer
17.7. Configuring RAID Sets
17.8. Advanced RAID Device Creation
18. Using the mount Command
18.1. Listing Currently Mounted File Systems
18.1.1. Specifying the File System Type
18.2. Mounting a File System
18.2.1. Specifying the File System Type
18.2.2. Specifying the Mount Options
18.2.3. Sharing Mounts
18.2.4. Moving a Mount Point
18.3. Unmounting a File System
18.4. Documentation
18.4.1. Manual Page Documentation
18.4.2. Useful Websites
19. The volume_key function
19.1. Commands
19.2. Using volume_key as an individual user
19.3. Using volume_key in a larger organization
19.3.1. Preparation for saving encryption keys
19.3.2. Saving encryption keys
19.3.3. Restoring access to a volume
19.3.4. Setting up emergency passphrases
19.4. Documentation
20. Access Control Lists
20.1. Mounting File Systems
20.1.1. NFS
20.2. Setting Access ACLs
20.3. Setting Default ACLs
20.4. Retrieving ACLs
20.5. Archiving File Systems With ACLs
20.6. Compatibility with Older Systems
20.7. References
21. Solid-State Disk Deployment Guidelines
21.1. Deployment Considerations
21.2. Tuning Considerations
22. Write Barriers
22.1. Importance of Write Barriers
22.2. Enabling/Disabling Write Barriers
22.3. Write Barrier Considerations
23. Storage I/O Alignment and Size
23.1. Parameters for Storage Access
23.2. Userspace Access
23.3. Standards
23.4. Stacking I/O Parameters
23.5. Logical Volume Manager
23.6. Partition and File System Tools
24. Setting Up A Remote Diskless System
24.1. Configuring a tftp Service for Diskless Clients
24.2. Configuring DHCP for Diskless Clients
24.3. Configuring an Exported File System for Diskless Clients
25. Online Storage Management
25.1. Fibre Channel
25.1.1. Fibre Channel API
25.1.2. Native Fibre Channel Drivers and Capabilities
25.2. iSCSI
25.2.1. iSCSI API
25.2.2. iSCSI Target Setup
25.3. Persistent Naming
25.3.1. WWID
25.3.2. UUID and Other Persistent Identifiers
25.4. Removing a Storage Device
25.5. Removing a Path to a Storage Device
25.6. Adding a Storage Device or Path
25.7. Configuring a Fibre-Channel Over Ethernet Interface
25.7.1. Fibre-Channel over Ethernet (FCoE) Target Setup
25.8. Configuring an FCoE Interface to Automatically Mount at Boot
25.9. Scanning Storage Interconnects
25.10. iSCSI Discovery Configuration
25.11. Configuring iSCSI Offload and Interface Binding
25.11.1. Viewing Available iface Configurations
25.11.2. Configuring an iface for Software iSCSI
25.11.3. Configuring an iface for iSCSI Offload
25.11.4. Binding/Unbinding an iface to a Portal
25.12. Scanning iSCSI Interconnects
25.13. >Logging In to an iSCSI Target
25.14. Resizing an Online Logical Unit
25.14.1. Resizing Fibre Channel Logical Units
25.14.2. Resizing an iSCSI Logical Unit
25.14.3. Updating the Size of Your Multipath Device
25.14.4. Changing the Read/Write State of an Online Logical Unit
25.15. Adding/Removing a Logical Unit Through rescan-scsi-bus.sh
25.16. Modifying Link Loss Behavior
25.16.1. Fibre Channel
25.16.2. iSCSI Settings With dm-multipath
25.16.3. iSCSI Root
25.17. Controlling the SCSI Command Timer and Device Status
25.18. Troubleshooting
26. Device Mapper Multipathing and Virtual Storage
26.1. Virtual Storage
26.2. DM-Multipath
A. Revision History
Index