西线无战事2012版下载:Logical volume management - Wikipedia, the fr...

来源:百度文库 编辑:九乡新闻网 时间:2024/04/30 03:13:04
Logical volume management
From Wikipedia, the free encyclopedia
(Redirected fromLogical Volume Management)
Jump to:navigation,search
Incomputer storage, logical volume management or LVM provides a method of allocating space onmass-storage devices that is more flexible than conventionalpartitioning schemes. In particular, a volume manager can concatenate,stripe together or otherwise combine partitions into larger virtual ones that administrators can re-size or move, potentially without interrupting system use.
Volume management represents just one of many forms ofstorage virtualization; its implementation takes place in a layer in thedevice-driver stack of anOS (as opposed to within storage devices or in a network).
Contents
[hide]
1 Design
2 Snapshots
3 Implementations
4 Disadvantages
5 Notes
6 References
7 External links
[edit] Design
Linux Logical Volume Manager (LVM) v1
Most volume-manager implementations share the same basic design. They start with physical volumes (PVs), which can be eitherhard disks, hard diskpartitions, orLUNs of an external storage device. Volume management treats PVs as sequences of chunks called physical extents (PEs). Some volume managers (such as that in HP-UX and Linux) have PEs of a uniform size; others (such as that inVeritas) has variably-sized PEs that can be split and merged at will.
Normally, PEs simply map one-to-one to logical extents (LEs). With mirroring, multiple PEs map to each LE. These PEs are drawn from a physical volume group (PVG), a set of same-sized PVs which act similarly to hard disks in a RAID1 array. PVGs are usually laid out so that they reside on differentdisks and/ordata buses for maximum redundancy.
The system pools LEs into a volume group (VG). The pooled LEs can then be concatenated together into virtual disk partitions called logical volumes orLVs. Systems can use LVs as rawblock devices just like disk partitions: creating mountablefile systems on them, or using them asswap storage.
Striped LVs allocate each successive LE from a different PV; depending on the size of the LE, this can improve performance on large sequential reads by bringing to bear the combined read-throughput of multiple PVs.
Administrators can grow LVs (by concatenating more LEs) or shrink them (by returning LEs to the pool). The concatenated LEs do not have to be contiguous. This allows LVs to grow without having to move already-allocated LEs. Some volume managers allow the re-sizing of LVs in either direction while online. Changing the size of the LV does not necessarily change the size of afilesystem on it; it merely changes the size of its containing space. A file system that can be resized online is recommended in that it allows the system to adjust its storage on-the-fly without interrupting applications.
PVs and LVs cannot be shared between or span different VGs (although some volume managers may allow moving them at will between VGs on the same host). This allows administrators conveniently to bring VGs online, to take them offline or to move them between host systems as a single administrative unit.
VGs can grow their storage pool by absorbing new PVs or shrink by retracting from PVs. This may involve moving already-allocated LEs out of the PV. Most volume managers can perform this movement online; if the underlying hardware is hot-pluggable this allows engineers to upgrade or replace storage without system downtime.
[edit] Snapshots
Some volume managers also implementsnapshots by applyingcopy-on-write to each LE. In this scheme, the volume manager will copy the LE to a copy-on-write table just before it is written to. This preserves an old version of the LV—the snapshot—which systems can later reconstruct by overlaying the copy-on-write table atop the current LV. Read-write snapshots are branching snapshots because they implicitly allow diverging versions of an LV.
Snapshots can be useful for backing up self-consistent versions of volatile data like table files from a busy database, or for rolling back large changes (such as an operating system upgrade) in a single operation. SomeLinux-basedLive CD systems also use snapshots to simulate read-write access on a read-onlycompact disc.
[edit] Implementations
Vendor Introduced in Volume manager Allocate anywhere[1] SnapshotsRAID 0RAID 1RAID 5RAID 10 Notes
IBMAIX 3.0 (1989)Logical Volume Manager Yes No[2] Yes Yes No Yes[3][4]
Hewlett-PackardHP-UX 9.0 HP Logical Volume Manager Yes Yes Yes Yes No Yes
FreeBSDVinum Volume Manager Yes No Yes Yes Yes[5]
NetBSDLogical Volume Manager Yes No Yes Yes No[6] No[7]
Linux 2.2Logical Volume Manager Yes Yes Yes Yes No
Linux 2.4Enterprise Volume Management System Yes Yes Yes Yes Yes
Linux 2.6Logical Volume Manager Yes Yes Yes Yes No
Silicon GraphicsIRIX orLinuxXVM Volume Manager Yes Yes Yes Yes Yes
Sun MicrosystemsSunOSSolaris Volume Manager (wasSolstice DiskSuite). No No Yes Yes Yes Yes[8]
Sun MicrosystemsSolaris 10ZFS Yes Yes Yes Yes Yes Yes
Veritas[9] Cross-OSVeritas Volume Manager (VxVM) Yes Yes Yes Yes Yes Yes[10]
MicrosoftWindows 2000 and later NT-based operating systemsLogical Disk Manager Yes Yes[11] Yes Yes Yes No[12]
[edit] Disadvantages
The levels of indirection that volume managers introduce can complicate the boot process and makedisaster recovery difficult, especially when the base operating-system and other essential tools are themselves on an LV.
Logical volumes can suffer fromexternal fragmentation when the underlying storage devices do not allocate their PEs contiguously. This can reduce I/O performance on slow-seeking media (such as magnetic disks), which have to seek over the gaps between extents during large sequential reads or writes. Volume managers which use fixed-size PEs, however, typically make PEs relatively large (a default of 4MB on the Linux LVM, for example) in order toamortize the cost of these seeks.
[edit] Notes
^ Denotes whether the volume manager allows LVs to grow and span onto any PV in the VG.
^ Does not have a copy-on-write snapshot mechanism; creates snapshots by freezing one volume of a mirror pair.
^ AIX 5.1
^ Refers to PEs as PPs (physical partitions), and to LEs as LPs (logical partitions).
^ FreeBSD from version 7.0 supports ZFS volume Manager (with some limitations):ZFS - FreeBSD Wiki.
^ There is no need to support raid5 in LVM because of NetBSD superior Raidframe subsystem.
^ NetBSD from version 6.0 supports ZFS volume Manager and its own re-implementation of Linux LVM. Re-implementation is based on a BSD licensed device-mapper driver and uses a port of Linux lvm tools as the userspace part of lvm. The version of ZFS included in NetBSD 6.0 is in development.
^ Refers to PVs as volumes (which can be combined with RAID0, RAID1 or RAID5 primitives into larger volumes), to LVs as soft partitions (which are contiguous extents placeable anywhere on volumes, but which cannot span multiple volumes), and to VGs as disk sets.
^ Third-party product; available for Windows and manyUnix-like OSes.
^ Refers to LVs as volumes, to VGs as disk groups; has variably-sized PEs called subdisks and LEs called plexes.
^Windows Server 2003 and later
^ Does not have a concept of PEs or LEs; can only RAID0, RAID1, RAID5 or concatenate disk partitions into larger volumes; file systems must span whole volumes.
[edit] References
Lewis, AJ,Logical Volume Manager HOWTO,http://tldp.org/HOWTO/LVM-HOWTO .
HP-UX 11: lvm(7) manual page, Hewlett-Packard, 1996,http://docs.hp.com/en/B2355-90684/lvm.7.html .
Vanel, Laurent; van der Knaap, Ronald (2000),AIX Logical Volume Manager from A to Z: Introduction and Concepts,IBM Redbooks,http://www.redbooks.ibm.com/redbooks/pdfs/sg245432.pdf .
Veritas Volume Manager 3.1 Administrator's Guide, Hewlett-Packard, 2001,http://docs.hp.com/en/B7961-90018/B7961-90018.pdf .
XVM Volume Manager Administration Guide, Silicon Graphics, 1999,http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=bks&fname=/SGI_Admin/XVM_AG .
Solaris Volume Manager Administration Guide, Sun Microsystems, 2003,http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWaadm/LOGVOLMGRADMIN/toc.html .
Comparison matrix of Windows LDM and Veritas Volume Manager, Symantec Corporation, 2003,http://eval.veritas.com/mktginfo/products/White_Papers/Storage_Server_Management/sfw41-ldm-comparison-matrix-paper.pdf
[edit] External links
A video article on how to create LVMs in Linux