lkml.org 
[lkml]   [1998]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: (reiserfs) Re: LVM / Filesystems / High availability
Date

To bring some clearing into the LVM discusion in this list
i added the LVM-HOWTO, which explains the LVM terms and basic handling
(at least for me ;*) )

The concept is pretty similar to the HP or AIX ones but kind
of different to Veritas.

BTW: LVM is available from http://www.msede.com/linux/lvm

Regards,
Heinz



Heinz Mauelshagen's LVM (Logical Volume Manager) howto. 06/26/1998

LVM is free software.


Abstract:
---------
The LVM adds an additional layer between the physical peripherals
and the i/o interface in the kernel.

This allows the concatenation of several disk partitions or total disks
(so-called physical volumes or PVs) or even multiple devices
to form a storage pool (so-called Volume Group or VG) with
allocation units called physical extents (called PE).
Please see scenario below.

Parts out of this VG then can be allocated to so-called Logical Volumes
or LVs in units called logical extents or LEs.
Each LE is mapped to a corresponding PE.
LEs and PEs are equal in size.


The LVs can then be used through device special files similar to
/dev/sd[a-z]* or /dev/hd[a-z]* named /dev/VolumeGroupName/LogicalVolumeName.

But going beyond this, you are able to extend or reduce
VGs _AND_ LVs at runtime.

So...
If for example the capacity of a LV gets too small and your VG containing
this LV is full, you could add another PV to that VG and simply extend
the LV afterwards.
If you reduce or delete a LV you can use the freed capacity for different
LVs in the same VG.


The above scenario looks like this:

/------------------------------------------\
| /--PV2---\ VG 1 /--PVn---\ |
| |-VGDA---| |-VGDA-- | |
| |PE1PE2..| |PE1PE2..| |
| | | ...... | | |
| | | | | |
| | /-----------------------\ | |
| | \-------LV 1------------/ | |
| | ..PEn| | ..PEn| |
| \--------/ \--------/ |
\------------------------------------------/

PV 1 could be /dev/sdc1 sized 1GB
PV n could be /dev/sde1 sized 2GB
VG 1 could be test_vg
LV 1 could be /dev/test_vg/test_lv
VGDA is the volume group descriptor area hloding the LVM metadata
PE1 up to PEn is the number of physical extends on each disk(partition)



Installation steps see INSTALL and insmod(1)/modprobe(1), kmod/kerneld(8)
to load the logical volume manager module.


Configuration steps for getting the above scenario:

1. do a "pvcreate /dev/sd[ce]1"
Think of setting the partition system id to 0xFE before!
For testing purposes you can use more than one primary partition on a disk.
(Don't do that for normal LVM operation for performance reasons)

2. do a "vgcreate test_vg /dev/sd[ce]1"
(vgcreate activates the new volume group too)

3. do a "lvcreate -L1500 -ntest_lv test_vg" to get a 1500MB linear LV named
/dev/test_vg/test_lv
or a "lvcreate -i2 -I4 -l1500 -nanother_test_lv test_vg" to get a 100 LE
large logical volume with 2 stripes and stripesize 4 KB.

4. use created LVs as you like to.
For example generate a filesystem in one with "mke2fs /dev/test_vg/test_lv"
and mount it.

5. extend /dev/test_vg/test_lv to 1600MB with:
"lvextend -L+100 /dev/test_vg/test_lv"
or
"lvextend -L1600 /dev/test_vg/test_lv"

6. reduce /dev/test_vg/test_lv to 900 logical extends with:
"lvreduce -l-700 /dev/test_vg/test_lv"
or
"lvreduce -l900 /dev/test_vg/test_lv"

7. rename a VG with:
"vgchange -an test_vg" # only works, if no logical volumes are open
"vgrename test_vg whatever"
"vgchange -ay whatever"

8. rename a LV after closing it with:
"lvchange -an /dev/whatever/test_lv"
"lvrename /dev/whatever/test_lv /dev/whatever/whatvolume"
or
"lvrename whatever test_lv whatvolume"
"lvchange -ay /dev/whatever/whatvolume" # to reactivate it for use

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement Entwicklungsbereich 2 Deutsche Telekom AG
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Postfach 10 05 41
mge@ez-darmstadt.telekom.de 64205 Darmstadt
Germany
+49 6151 886-425
FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.033 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site