Differences between version 11 and predecessor to the previous major change of LVMNotes.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 11 | Last edited on Tuesday, May 24, 2005 11:49:45 am | by CraigBox | Revert |
Older page: | version 6 | Last edited on Tuesday, October 14, 2003 12:13:58 pm | by DanielLawson | Revert |
@@ -9,9 +9,10 @@
!!Solution
At install time, create a small (<100mb) /boot, swap, and a reasonable (4-6gb) / partition. Leave the rest of the space unpartitioned.
-Make sure LVM is compiled into your kernel, and you have the LVM tools installed (
Debian: apt-get
install lvm10).
+Make sure LVM is compiled into your kernel, and you have the LVM tools installed.
Debian 3 (woody)
: install lvm10. Debian Sarge/Sid: install lvm2.
+Gentoo has lvm (1.01
) and lvm2
.
!Create a PV[1] partition on your drive
# fdisk /dev/sda
@@ -23,9 +24,9 @@
First, run vgscan:
# vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
- vgscan -- WARNING: This program does not do a VGDA backup of your volume group
+ vgscan -- WARNING: This program does not do a VGDA backup of your volume group[4]
This creates a volume group descriptor area (VGDA) at the start of the disks.
# pvcreate /dev/sda4
pvcreate -- physical volume "/dev/sda4" successfully created
@@ -43,9 +44,9 @@
# vgdisplay
Confirm that the VG size is the right amount for the size of the partition.
Note that if you use devfs, you'll need to use the full devfs pathname, not the /dev/sda4 symlink.
-EG:, use /dev/scsi/host0/bus0/target0/lun0/part4 instead of /dev/hda4
+EG:, use /dev/scsi/host0/bus0/target0/lun0/part4 instead of /dev/sda4
!Create some LVs [3]
# lvcreate -L20G -nhome lvmarray
@@ -99,11 +100,20 @@
You need to have e2fsprogs installed for this to work (but you probably needed it to make the FS to start with.)
When the time comes to learn to resize [LVM] partitions, there'll be more. Until then, see http://tldp.org/HOWTO/LVM-HOWTO
+
+!! LVM under Debian Sarge
+
+If you are upgrading from a 2.4 to a 2.6 kernel and you have an LVM1 partition, you must install the 'lvm2' package.
+
+There are two version of LVM:
+# LVM1 (lvm10 in woody/sarge) work only with linux-2.4.
+# LVM2 (lvm2, only in sarge) work with both linux-2.4 and 2.6, and is backward compatible with LVM1.
-----
!!Terminology
[1] __PV__: Physical Volume; a disc or a partition on a disc.
[2] __VG__: Volume Group; a group of one-or-more physical volumes across which you get a "virtual disk", a space to create logical volumes in.
[3] __LV__: Logical Volume; something you eventually create an FS on.
+[4] To create a __VGDA__ (Volume Group Descriptor Area) Backup use !vgcfgbackup(8) regularly