Cari di RHE Linux 
    RHE Linux User Manual
Daftar Isi
(Sebelumnya) 19 : 1.2. Add-Ons - Package Ma ...20 : Part I. File Systems - St ... (Berikutnya)

Storage Administration Guide

Storage Administration Guide

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

Edition 2

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

Daftar Isi

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 File System 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. NFS Support for SELinux
9.11. pNFS Support (Block, Object and File)
9.12. NFSv4
9.13. 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. Partitions
12.1. Viewing the Partition Table
12.2. Creating a Partition
12.2.1. Making the Partition
12.2.2. Formatting and Labeling the Partition
12.2.3. Add to /etc/fstab
12.3. Removing a Partition
12.4. Resizing a Partition
13. LVM (Logical Volume Manager)
13.1. What is LVM2?
13.2. Using system-config-lvm
13.2.1. Utilizing Uninitialized Entities
13.2.2. Adding Unallocated Volumes to a Volume Group
13.2.3. Migrating Extents
13.2.4. Adding a New Hard Disk Using LVM
13.2.5. Adding a New Volume Group
13.2.6. Extending a Volume Group
13.2.7. Editing a Logical Volume
13.3. References
14. Swap Space
14.1. What is Swap Space?
14.2. Adding Swap Space
14.2.1. Extending Swap on an LVM2 Logical Volume
14.2.2. Creating an LVM2 Logical Volume for Swap
14.2.3. Creating a Swap File
14.3. Removing Swap Space
14.3.1. Reducing Swap on an LVM2 Logical Volume
14.3.2. Removing an LVM2 Logical Volume for Swap
14.3.3. Removing a Swap File
14.4. Moving Swap Space
15. Disk Quotas
15.1. Configuring Disk Quotas
15.1.1. Enabling Quotas
15.1.2. Remounting the File Systems
15.1.3. Creating the Quota Database Files
15.1.4. Assigning Quotas per User
15.1.5. Assigning Quotas per Group
15.1.6. Setting the Grace Period for Soft Limits
15.2. Managing Disk Quotas
15.2.1. Enabling and Disabling
15.2.2. Reporting on Disk Quotas
15.2.3. Keeping Quotas Accurate
15.3. References
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. Using the mount Command
17.1. Listing Currently Mounted File Systems
17.1.1. Specifying the File System Type
17.2. Mounting a File System
17.2.1. Specifying the File System Type
17.2.2. Specifying the Mount Options
17.2.3. Sharing Mounts
17.2.4. Moving a Mount Point
17.3. Unmounting a File System
17.4. Documentation
17.4.1. Manual Page Documentation
17.4.2. Useful Websites
18. The volume_key function
18.1. Commands
18.2. Using volume_key as an individual user
18.3. Using volume_key in a larger organization
18.3.1. Preparation for saving encryption keys
18.3.2. Saving encryption keys
18.3.3. Restoring access to a volume
18.3.4. Setting up emergency passphrases
18.4. Documentation
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. Solid-State Disk Deployment Guidelines
20.1. Deployment Considerations
20.2. Tuning Considerations
21. Write Barriers
21.1. Importance of Write Barriers
21.2. Enabling/Disabling Write Barriers
21.3. Write Barrier Considerations
22. Storage I/O Alignment and Size
22.1. Parameters for Storage Access
22.2. Userspace Access
22.3. Standards
22.4. Stacking I/O Parameters
22.5. Logical Volume Manager
22.6. Partition and File System Tools
23. Setting Up A Remote Diskless System
23.1. Configuring a tftp Service for Diskless Clients
23.2. Configuring DHCP for Diskless Clients
23.3. Configuring an Exported File System for Diskless Clients
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.2.2. iSCSI Target Setup
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.7.1. Fibre-Channel over Ethernet (FCoE) Target Setup
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.14.4. Changing the Read/Write State of an Online Logical Unit
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

Preface

1. Document Conventions

This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.
In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.

1.1. Typographic Conventions

Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.
Mono-spaced Bold
Used to highlight system input, including shell commands, file names and paths. Also used to highlight keys and key combinations. For example:
To see the contents of the file my_next_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command.
The above includes a file name, a shell command and a key, all presented in mono-spaced bold and all distinguishable thanks to context.
Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination. For example:
Press Enter to execute the command.
Press Ctrl+Alt+F2 to switch to a virtual terminal.
The first example highlights a particular key to press. The second example highlights a key combination: a set of three keys pressed simultaneously.
If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in mono-spaced bold. For example:
File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions.
Proportional Bold
This denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:
Choose SystemPreferencesMouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).
To insert a special character into a gedit file, choose ApplicationsAccessoriesCharacter Map from the main menu bar. Next, choose SearchFind . . . . . . from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose EditPaste from the gedit menu bar.
The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.
Mono-spaced Bold Italic or Proportional Bold Italic
Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:
To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh [email protected].
The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home.
To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release.
Note the words in bold italics above - username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.
Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:
Publican is a DocBook publishing system.

1.2. Pull-quote Conventions

Terminal output and source code listings are set off visually from the surrounding text.
Output sent to a terminal is set in mono-spaced roman and presented thus:
books Desktop   documentation  drafts  mss photos   stuff  svnbooks_tests  Desktop1  downloads  images  notes  scripts  svgs
Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:
package org.jboss.book.jca.ex1;import javax.naming.InitialContext;public class ExClient{   public static void main(String args[]) throws Exception   {  InitialContext iniCtx = new InitialContext();  Object ref = iniCtx.lookup("EchoBean");  EchoHome   home   = (EchoHome) ref;  Echo   echo   = home.create();  System.out.println("Created Echo");  System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));   }}

1.3. Notes and Warnings

Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.

Note

Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.

Important

Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration.

Warning

Warnings should not be ignored. Ignoring warnings will most likely cause data loss.

2. Getting Help and Giving Feedback

2.1. Do You Need Help?

If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer Portal at http://access.redhat.com. Through the customer portal, you can:
  • search or browse through a knowledgebase of technical support articles about Red Hat products.
  • submit a support case to Red Hat Global Support Services (GSS).
  • access other product documentation.
Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo. Click on the name of any mailing list to subscribe to that list or to access the list archives.

2.2. We Need Feedback!

If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: http://bugzilla.redhat.com/ against the product Red Hat Enterprise Linux.
When submitting a bug report, be sure to mention the manual's identifier: doc-Storage_Administration_Guide
If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.

Chapter 1. Overview

The Storage Administration Guide contains extensive information on supported file systems and data storage features in Red Hat Enterprise Linux 6. This book is intended as a quick reference for administrators managing single-node (i.e. non-clustered) storage solutions.
The Storage Administration Guide is split into two parts: File Systems, and Storage Administration.
The File Systems part details the various file systems Red Hat Enterprise Linux 6 supports. It describes them and explains how best to utilize them.
The Storage Administration part details the various tools and storage administration tasks Red Hat Enterprise Linux 6 supports. It describes them and explains how best to utilize them.

1.1. What's New in Red Hat Enterprise Linux 6

Red Hat Enterprise Linux 6 features the following file system enhancements:

File System Encryption (Technology Preview)

You can now encrypt a file system at mount using eCryptfs[1] , which provides an encryption layer on top of an actual file system. This "pseudo-file system" allows per-file and file name encryption, which offers more granular encryption than encrypted block devices. For more information about file system encryption, refer to Chapter 3, Encrypted File System.

File System Caching (Technology Preview)

FS-Cache[1] allows you to use local storage for caching data from file systems served over the network (e.g. through NFS). This helps minimize network traffic, although it does not guarantee faster access to data over the network. FS-Cache allows a file system on a server to interact directly with a client's local cache without creating an overmounted file system. For more information about FS-Cache, refer to Chapter 10, FS-Cache.

I/O Limit Processing

The Linux I/O stack can now process I/O limit information for devices that provide it. This allows storage management tools to better optimize I/O for some devices. For more information on this, refer to Chapter 22, Storage I/O Alignment and Size.

ext4 Support

The ext4 file system is fully supported in this release. It is now the default file system of Red Hat Enterprise Linux 6, supporting an unlimited number of subdirectories. It also features more granular timestamping, extended attributes support, and quota journaling. For more information on ext4, refer to Chapter 6, The Ext4 File System.

Network Block Storage

Fibre-channel over Ethernet is now supported. This allows a fibre-channel interface to use 10-Gigabit Ethernet networks while preserving the fibre-channel protocol. For instructions on how to set this up, refer to Section 24.7, " Configuring a Fibre-Channel Over Ethernet Interface".


[1] This feature is being provided in this release as a technology preview. Technology Preview features are currently not supported under Red Hat Enterprise Linux subscription services, may not be functionally complete, and are generally not suitable for production use. However, these features are included as a customer convenience and to provide the feature with wider exposure.
You are free to provide feedback and functionality suggestions for a technology preview feature before it becomes fully supported. Erratas will be provided for high-severity security issues.
(Sebelumnya) 19 : 1.2. Add-Ons - Package Ma ...20 : Part I. File Systems - St ... (Berikutnya)