Logical volume management facts for kids
Logical volume management (LVM) is a smart way to handle computer storage. It helps organize space on large storage devices, like hard drives. LVM is much more flexible than traditional ways of dividing a hard drive.
With LVM, you can change the size of storage areas, even making them bigger than a single physical disk. You can also combine parts of different disks or spread data across multiple disks. This makes it easier to adjust storage as computer users' needs change. It's like a form of virtualisation for your storage.
Contents
How Logical Volume Management Works
Volume managers might seem different, but they all share some basic ideas. LVM starts with physical volumes (PVs). These can be parts of a hard disk, RAID devices, or SAN storage units.
PVs are divided into small, equal-sized pieces called physical extents (PEs). Imagine these PEs as tiny building blocks, often 4 MB each. All these PEs are then gathered into a volume group (VG). Think of a VG as a big pool of all your available storage blocks.
Creating Logical Volumes
From this pool of PEs, you can create logical volumes (LVs). These LVs are like virtual disk partitions. They act just like regular hard disk partitions. You can create file systems on them to store your files, or use them for things like swap space.
Changing Volume Sizes
You can make LVs bigger by adding more PEs from the pool. Some volume managers even let you shrink LVs. Some allow you to change the size while the computer is still running. Changing the LV size does not automatically change the size of the file system on it. A file system that can be resized while online is very helpful. It lets the system adjust storage without stopping any programs.
Protecting Your Data
PVs can also be grouped into physical volume groups (PVGs). This helps protect your data. You can make copies (mirrors) of your LVs by placing identical PEs on different PVGs. If one PVG fails, you still have a complete copy of your LV online. For the best protection, PVGs are usually set up so their PVs are on different disks or data buses.
Snapshots for Data Recovery
Some volume managers can also create snapshots. A snapshot is like a quick picture of your data at a certain moment. It uses a method called copy-on-write (COW). When data is about to change, the volume manager first copies the old PE to a special area. This keeps an older version of the data – the snapshot. You can then use this snapshot to go back to an earlier state of your data.
Snapshots are useful for backing up important data, like from a busy database. They can also help you undo big changes, such as an operating system upgrade. Some Linux-based LiveCD systems use snapshots to let you write to a read-only compact disc.
Challenges with Logical Volume Management
While LVM offers great flexibility, it can make some things harder. For example, recovering from a major computer problem (disaster recovery) can be more complex. This is especially true if your main operating system and important tools are stored on an LV.
Where LVM is Used
Many operating systems come with their own Logical Volume Managers:
- AIX uses its own Logical Volume Manager.
- FreeBSD includes Vinum.
- HP-UX has HP Logical Volume Manager, since 1992.
- Linux uses Logical Volume Manager (LVM) and Enterprise Volume Management System (EVMS).
- Microsoft Windows has Logical Disk Manager (LDM) in Windows 2000 and newer versions.
- OS/2 has LVM from version 4.5, including eComStation.
- Solaris uses Solaris Volume Manager (SVM) in Solaris 9 and later.
- Veritas Volume Manager (VxVM) is available on many Unix-like operating systems.
See also
In Spanish: Gestor de volúmenes lógicos para niños