15 managing disk partitions Logical Volume, Physical Volume and Volume Groups
partition is a fixed amount of disk space
with LVM it's easy to grow logical volume later
with LVM it's easy to grow logical volume later
Logical volume management is a widely-used technique for deploying logical rather than physical storage.
With LVM, "logical" partitions can span across physical hard drives and can be resized (unlike traditional ext3 "raw" partitions).
A physical disk is divided into one or more physical volumes (Pvs), and logical volume groups (VGs) are created by combining PVs.
You should read some more specified info here at The Linux Logical Volume Manager
This picture pretty much sums it up
Also there's some good information at A Beginner's Guide To LVM
One of the big advantages of LVM is that you can most easily reduce the size of one partition, and use it on other partitions for example, without data loss.
You can also allocate minimal amounts of space for each logical volume and leave some of the disk unallocated. Then, when the partitions start to fill up, they can be expanded as necessary.
From Archlinux wiki:
Advantages
LVM gives you more flexibility than just using normal hard drive partitions:
- Use any number of disks as one big disk.
- Have logical volumes stretched over several disks.
- Create small logical volumes and resize them "dynamically" as they get more filled.
- Resize logical volumes regardless of their order on disk. It does not depend on the position of the LV within VG, there is no need to ensure surrounding available space.
- Resize/create/delete logical and physical volumes online. File systems on them still need to be resized, but some support online resizing.
- Online/live migration of LV being used by services to different disks without having to restart services.
- Snapshots allow you to backup a frozen copy of the file system, while keeping service downtime to a minimum.
Disadvantages
- Linux exclusive (almost). There is no official support in most other OS (FreeBSD, Windows..).
- Additional steps in setting up the system, more complicated.
- If you use the Btrfs file system, its Subvolume feature will also give you the benefit of having a flexible layout. In that case, using the additional Abstraction layer of LVM may be unnecessary.
Comments
Post a Comment