Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search
Custom Search
Custom Search

LVM HOWTO

AJ Lewis


          
        

Revision History
Revision 0.19 2006-11-27 Revised by: ajl
Clarified full snapshot conditions in Section 3.8 and Section 13.4.1 and added a note about resizing the origin of a snapshot; Fixed Rackable copyright; Fixed e-mail address
Revision 0.18 2006-11-27 Revised by: ajl
Clarify whole disk usage in Section 11.1; Updated copyright; Updated e-mail address
Revision 0.17 2005-10-03 Revised by: ajl
Added FAQ entry for max size of LVs in LVM2; Did some cleanup of "Recover physical volume metadata" section; Updated e-mail address
Revision 0.16 2005-07-15 Revised by: ajl
Added lvm2 boot-time scripts info; Added "Recover physical volume metadata" section - thanks to Maximilian Attems for the patch
Revision 0.15 2005-06-09 Revised by: ajl
Removed references to xfs_freeze - it is no longer needed; Updated snapshots subsection in Anatomy of LVM section; Added a couple entries to the LVM2 FAQ; Fixed a couple typos
Revision 0.14 2004-10-06 Revised by: ajl
Added reference to lvm2_createinitrd in source tree; Adjusted lvcreate example slightly; Added 'vgchange -ay' in 'Moving a volume group to another system' recipe
Revision 0.13 2004-08-16 Revised by: ajl
Clarify symlink farm description; Fix dm control device major number; Remove /boot from vg in small lvm setup example; Add notes about /boot and / on LVM; Remove outdated link;
Revision 0.12 2004-06-07 Revised by: ajl
Updated LVM2 FAQ entries
Revision 0.11 2004-05-03 Revised by: ajl
Updated LVM2 FAQ entries
Revision 0.10 2004-04-22 Revised by: ajl
removed -print0 from find command after receiving reports that it doesn't work
Revision 0.9 2004-04-16 Revised by: ajl
Added -print0 to find command before piping it to cpio; Changed vgimport command line for LVM 2; Added ext3 to the ext2 resize section; Updated FAQ; Updated Links section
Revision 0.8 2004-02-25 Revised by: ajl
Updated CVS locations and FTP links; Added section on extending a JFS filesystem; Fixed typos - Ran aspell against document
Revision 0.7 2004-02-16 Revised by: ajl
Updated to include LVM 2 and device mapper information; Updated email addresses; Updated copyright; Added FAQ section; Added document license; Updated to docbook 4.2
Revision 0.6 2003-12-09 Revised by: ajl
Updated for LVM 1.0.8; fixed broken link; Clarified redhat init script section;
Revision 0.5 2003-02-10 Revised by: ajl
Updated Redhat initscript information for 7.0 and above; Added information on removing a partition table from a disk if pvcreate fails; Default PE size is 32MB now; Updated method for snapshotting under XFS.
Revision 0.4 2002-12-16 Revised by: ajl
Updated for LVM 1.0.6
Revision 0.3 2002-09-16 Revised by: ajl
removed example pvmove from Command Operations section - we now just point to the more detailed recipe on pvmove that contains various warnings and such
Revision 0.2 2002-09-11 Revised by: ajl
Updated for LVM 1.0.5 and converted to DocBook XML 4.1.2.
Revision 0.1 2002-04-28 Revised by: gf
Initial conversion from Sistina's LaTeX source and import to tLDP in LinuxDoc format.

This document describes how to build, install, and configure LVM for Linux. A basic description of LVM is also included. This version of the HowTo is for LVM 2 with device-mapper, as well as LVM 1.0.8.


Table of Contents
Introduction
1. Latest Version
2. Disclaimer
3. Contributors
1. What is LVM?
2. What is Logical Volume Management?
2.1. Why would I want it?
2.2. Benefits of Logical Volume Management on a Small System
2.3. Benefits of Logical Volume Management on a Large System
3. Anatomy of LVM
3.1. volume group (VG)
3.2. physical volume (PV)
3.3. logical volume (LV)
3.4. physical extent (PE)
3.5. logical extent (LE)
3.6. Tying it all together
3.7. mapping modes (linear/striped)
3.8. Snapshots
4. Frequently Asked Questions
4.1. LVM 2 FAQ
4.2. LVM 1 FAQ
5. Acquiring LVM
5.1. Download the source
5.2. Download the development source via CVS
5.3. Before You Begin
5.4. Initial Setup
5.5. Checking Out Source Code
5.6. Code Updates
5.7. Starting a Project
5.8. Hacking the Code
5.9. Conflicts
6. Building the kernel modules
6.1. Building the device-mapper module
6.2. Build the LVM 1 kernel module
7. LVM 1 Boot time scripts
7.1. Caldera
7.2. Debian
7.3. Mandrake
7.4. Redhat
7.5. Slackware
7.6. SuSE
8. LVM 2 Boot Time Scripts
9. Building LVM from the Source
9.1. Make LVM library and tools
9.2. Install LVM library and tools
9.3. Removing LVM library and tools
10. Transitioning from previous versions of LVM to LVM 1.0.8
10.1. Upgrading to LVM 1.0.8 with a non-LVM root partition
10.2. Upgrading to LVM 1.0.8 with an LVM root partition and initrd
11. Common Tasks
11.1. Initializing disks or disk partitions
11.2. Creating a volume group
11.3. Activating a volume group
11.4. Removing a volume group
11.5. Adding physical volumes to a volume group
11.6. Removing physical volumes from a volume group
11.7. Creating a logical volume
11.8. Removing a logical volume
11.9. Extending a logical volume
11.10. Reducing a logical volume
11.11. Migrating data off of a physical volume
12. Disk partitioning
12.1. Multiple partitions on the same disk
12.2. Sun disk labels
13. Recipes
13.1. Setting up LVM on three SCSI disks
13.2. Setting up LVM on three SCSI disks with striping
13.3. Add a new disk to a multi-disk SCSI system
13.4. Taking a Backup Using Snapshots
13.5. Removing an Old Disk
13.6. Moving a volume group to another system
13.7. Splitting a volume group
13.8. Converting a root filesystem to LVM 1
13.9. Recover physical volume metadata
A. Dangerous Operations
A.1. Restoring the VG UUIDs using uuid_fixer
A.2. Sharing LVM volumes
B. Reporting Errors and Bugs
C. Contact and Links
C.1. Mail lists
C.2. Links
D. GNU Free Documentation License
D.1. PREAMBLE
D.2. APPLICABILITY AND DEFINITIONS
D.3. VERBATIM COPYING
D.4. COPYING IN QUANTITY
D.5. MODIFICATIONS
D.6. COMBINING DOCUMENTS
D.7. COLLECTIONS OF DOCUMENTS
D.8. AGGREGATION WITH INDEPENDENT WORKS
D.9. TRANSLATION
D.10. TERMINATION
D.11. FUTURE REVISIONS OF THIS LICENSE
D.12. ADDENDUM: How to use this License for your documents