What Does Volume group Mean?
This page mentions older exam versions. See the Current Exam Context and Legacy Exam Context sections below for the updated mapping.
On This Page
Quick Definition
A volume group is like a bucket that collects storage space from multiple hard drives or partitions. You can then cut that bucket into smaller pieces called logical volumes, which your computer uses like regular drives. It helps you manage storage more flexibly without worrying about which physical disk the data lives on.
Common Commands & Configuration
pvcreate /dev/sdbvgcreate vg_data /dev/sdb /dev/sdcvgextend vg_data /dev/sddvgreduce vg_data /dev/sdbvgsvgdisplay vg_datavgchange -ayvgcfgbackup vg_datavgcfgrestore vg_datavgremove vg_dataMust Know for Exams
Volume groups are a core topic in several IT certification exams, most notably for Linux certifications such as CompTIA Linux+ (XK0-005), Red Hat Certified System Administrator (RHCSA), and the Linux Professional Institute (LPIC-1) exams. In these exams, candidates must be able to create, extend, reduce, and manage volume groups using command-line tools like vgcreate, vgextend, vgreduce, vgdisplay, and vgchange. Questions often require you to interpret the output of vgdisplay, vgs, or pvs to determine how much free space is available in a volume group or which physical volumes are members.
In the RHCSA exam (EX200), volume groups are part of the storage management objective. You may be asked to configure a volume group that spans two disks, then create a logical volume from it, format it, and mount it. A typical objective might be: "Create a volume group named vg_data from /dev/sdb and /dev/sdc, create a logical volume of 1 GiB named lv_data, and mount it persistently." The exam also tests your ability to extend a volume group when a new disk is added and to reduce a volume group by removing a physical volume after migrating its data.
The CompTIA Linux+ exam includes questions about LVM architecture and troubleshooting. You might see a scenario where a volume group has missing physical volumes due to disk failure, and you need to recover the volume group or remove the missing device. Understanding how LVM metadata recovery works (vgcfgrestore, pvck) is essential.
In LPIC-1 (101-500), volume groups appear in topic 102.2, "Install and configure disk partitioning." While LVM is not the only focus, candidates must know how to set up LVM from scratch, including creating physical volumes, a volume group, and logical volumes. The exam may ask about the purpose of each component and the relationship between them.
Even in storage-centric certifications like VMware VCP-DCV, understanding volume groups is useful when working with Linux virtual machines that use LVM. While not a primary exam objective, storage administrators are expected to know how to resize VM disks and then reflect those changes inside the guest OS using LVM commands.
In all these exams, the key exam traps involve misunderstanding the difference between a physical volume and a volume group, thinking that removing a physical volume from a volume group does not require moving data first, or confusing volume group commands with logical volume commands. Mastering volume groups is a must-pass skill for any Linux system administration certification.
Simple Meaning
Think of a volume group as a big, flexible storage pool that you build from one or more physical hard drives or disk partitions. In everyday terms, imagine you have a few different-sized water tanks in your house: a small tank in the kitchen, a medium one in the bathroom, and a large one in the garden. Instead of using each tank independently for different tasks, you connect all their pipes together so that the water can flow freely between them. Now, instead of worrying about which tank has space left, you just draw water from the combined pool. That combined pool is your volume group.
The volume group doesn't care about the individual tanks anymore, it just sees one big supply of water. In the same way, a volume group hides the complexity of the separate physical hard drives or partitions. The operating system only sees the volume group, not the raw disks. You can then create logical volumes from that pool. Each logical volume acts like a separate hard drive in your computer. You can make some logical volumes big, some small, and you can even resize them later without buying new hardware. If you run out of space in the pool, you can add another physical disk to the volume group, and the space becomes available immediately to all the logical volumes using that pool.
This is a huge improvement over traditional partitioning, where each partition is stuck on a specific disk with a fixed size. If a partition runs out of space, you often have to delete it or move data manually. With a volume group, you can extend a logical volume online, often without rebooting or taking the system offline. That is why volume groups are the backbone of modern enterprise storage management, making life easier for system administrators.
Full Technical Definition
A volume group (VG) is a central abstraction in the Linux Logical Volume Manager (LVM) that aggregates one or more physical volumes (PVs) into a single storage pool. Physical volumes can be entire block devices (like /dev/sdb) or standard partitions (like /dev/sda3). The volume group metadata stores information about which physical volumes belong to the group, how their physical extents are allocated, and which logical volumes (LVs) are created from the pool.
When you create a volume group, LVM divides each physical volume into chunks of a fixed size called physical extents (PEs). The default PE size is usually 4 MiB, but it can be set at volume group creation time. Every logical volume you create is composed of a number of logical extents (LEs), which map to physical extents on the underlying physical volumes. The volume group manages this mapping through metadata that can be stored in multiple places for redundancy.
Key components include the VG name (e.g., vg_data), the UUID, the extent size, the list of PVs, and the list of LVs. Administrators use commands like vgcreate, vgextend, vgreduce, and vgdisplay to manage volume groups. The volume group can span multiple physical disks, and you can remove a physical volume from the group by moving its extents to other PVs in the same VG using pvmove.
Volume groups support advanced features like snapshotting, striping, mirroring, and thin provisioning. In a clustered environment, volume groups can be shared across nodes using Cluster LVM (CLVM) or High-Availability LVM (HA-LVM). The volume group metadata is stored in the first few sectors of each physical volume, and LVM uses a sequential metadata format that can be backed up and restored with vgcfgbackup and vgcfgrestore.
Performance considerations include I/O load balancing across physical volumes and the overhead of LVM metadata operations. The volume group does not directly handle read/write operations, those are handled by the device mapper layer at the kernel level. The volume group simply provides the mapping framework. In a RAID or hardware controller context, a volume group can aggregate hardware RAID arrays, combining capacity and performance.
In enterprise environments, volume groups are often used with SAN or NAS storage. For example, an administrator might create a volume group from a set of iSCSI LUNs. This VG can then host multiple logical volumes for database storage, application data, and logs. The flexibility of volume groups allows administrators to adjust capacity without application downtime.
Real-Life Example
Imagine you run a small library and you have six bookshelves of different sizes around the room. Some shelves are tall, some are short, some are wide. Instead of labeling each shelf separately and deciding exactly what goes where, you decide to combine all of them into one giant "library pool." You put a label on the wall that says "Main Collection" and then you just fill the shelves with books in any order. If you later buy a new tall bookshelf, you add it to the pool, and suddenly you have more room for books without reorganizing everything.
Now, think of that "Main Collection" as the volume group. The individual bookshelves are your physical hard drives. Each shelf holds a certain number of books, that is your storage capacity. When you want to create a section, say "Science Fiction," you carve out a section of the total shelf space available in the pool. That section is your logical volume. You don't care that part of it is on the tall shelf and part on the short shelf. You just know that the "Science Fiction" section exists and has a certain size.
If the "Science Fiction" section gets too full, you can expand it by taking more space from the pool. If you add more shelves to the pool, the pool grows, and every section can potentially use that new space. This is exactly how a volume group works in LVM. It takes the physical disks (shelves) and combines them into one logical pool, then lets you create flexible partitions (logical volumes) that can be resized without moving data around physically. In the library, you don't have to move books to a new shelf just because you bought a bigger shelf, you just expand the fiction section into the new shelf space. That is the beauty of a volume group.
Why This Term Matters
Volume groups are a fundamental building block in enterprise and Linux server storage management. Without volume groups, system administrators would be forced to work with static partitions that cannot grow or shrink easily. If a database partition ran out of space, the administrator would need to back up the data, repartition the disk, and restore everything, a process that could take hours of downtime. With a volume group, the administrator simply adds another physical volume to the volume group and extends the logical volume holding the database, often online, without any service interruption.
From a practical standpoint, volume groups allow administrators to pool storage from multiple disks of different sizes and capabilities. You might have two 500 GB SSDs and one 2 TB HDD. Instead of managing them separately, you create one volume group and then create logical volumes that use the fast SSDs for databases and the slower HDD for backups, all from the same pool. This flexibility reduces hardware waste and simplifies capacity planning.
Volume groups also support advanced features that directly impact uptime and data protection. Snapshots, for example, let you take point-in-time copies of a logical volume, which is critical for backup consistency. Thin provisioning allows you to over-allocate space in a volume group, so you can create large logical volumes while only using physical space as data is written. This is especially useful in virtualization environments where many VMs share the same storage pool.
In today's cloud and hybrid environments, volume groups provide a consistent interface for managing storage regardless of the underlying hardware. Whether the physical volumes are local SATA drives, iSCSI LUNs, or Fibre Channel SAN disks, the LVM volume group abstracts the differences. This simplifies automation scripts and configuration management tools like Ansible or Puppet, which can treat storage pools uniformly across thousands of servers.
How It Appears in Exam Questions
Volume group questions in certification exams often fall into three categories: scenario-based configuration, command output interpretation, and troubleshooting.
Scenario-based configuration questions typically present a situation like: "A server has two 10 GB disks added. The administrator needs to create a volume group called vg_data that uses both disks. Which of the following commands should be used first?" The correct answer is usually pvcreate to prepare each disk as a physical volume, then vgcreate vg_data /dev/sdb /dev/sdc. A distractor might be using vgcreate without first running pvcreate, or trying to use mkfs directly on the disk. Another common scenario: "The volume group vg_data has 4 GB free. The administrator needs to create a logical volume named lv_backup of size 2 GB. Which command will create it?" Here the answer is lvcreate -n lv_backup -L 2G vg_data. The distractor might use the wrong flag, such as -l instead of -L, or specify the path incorrectly.
Command output interpretation questions provide output from vgs, vgdisplay, or pvs and ask: "How much free space is in the volume group?" or "Which physical volume in the volume group is faulty?" For example, vgs might show VG #PV #LV #SN Attr VSize VFree. A question could say: "The output shows VFree as 8.00 GB. The administrator needs to create a 10 GB logical volume. What should they do first?" The correct answer is to extend the volume group by adding another physical volume. Traps include trying to create the logical volume anyway (it would fail), or shrinking an existing logical volume (which might cause data loss).
Troubleshooting questions often involve a volume group that fails to activate at boot. A typical question: "After a server reboot, the logical volumes in vg_data are not visible. The vgchange -ay command fails. What is the most likely cause?" The answer could be that a physical volume in the volume group is missing or has a failed disk. The next step might be to check pvs for missing PVs or use vgreduce --removemissing to clean up. Another classic trap question: "An administrator runs vgreduce vg_data /dev/sdb. What must they do first?" The correct answer is to move the physical extents off /dev/sdb using pvmove, otherwise data loss will occur. The distractor might be that the command succeeds automatically, which is incorrect.
Performance-related questions might ask: "Which LVM feature would you use to distribute I/O across multiple physical volumes in a volume group?" The answer is striping (using the -i flag in lvcreate). Another might ask: "What is the default extent size in LVM volume groups?" The answer is 4 MiB, and the candidate should know how to verify it with vgdisplay.
exam questions test not just the commands but the conceptual understanding of the relationship between physical volumes, volume groups, and logical volumes. Candidates should practice interpreting LVM output and know the correct order of operations for resizing, extending, and repairing volume groups.
Practise Volume group Questions
Test your understanding with exam-style practice questions.
Example Scenario
You are a junior system administrator for a small company that runs a customer database on a Linux server. The server currently has one 100 GB hard drive, and the database is stored on a logical volume named lv_db that is 60 GB. The volume group is called vg_server, and it was created from the only physical volume /dev/sda. One day, the database team reports that storage is running low, the logical volume is at 95% capacity.
You check with vgs and see that the volume group vg_server has only 40 GB free, but the physical disk has no more unallocated space. The solution is to add a new physical disk. You install a new 100 GB drive, /dev/sdb. First, you create a physical volume on it using pvcreate /dev/sdb. Then you add it to the volume group vg_server with vgextend vg_server /dev/sdb. Now vgs shows that vg_server has 140 GB total and 140 GB free (since the existing logical volumes already consumed 60 GB).
Next, you extend the logical volume lv_db by 40 GB using lvextend -L +40G /dev/vg_server/lv_db. Finally, you resize the filesystem to use the new space. For an ext4 filesystem, you use resize2fs /dev/vg_server/lv_db. The database now has 100 GB of storage, and there is still 40 GB free in the volume group for future growth. No downtime was required, and no data was moved. The database team is happy, and you have learned how volume groups make storage management flexible and responsive to real business needs.
In this scenario, the volume group acted as the flexible pool that allowed you to absorb a new physical disk and expand existing storage without tedious repartitioning. This is a textbook example of why volume groups are standard in server environments.
Common Mistakes
Using vgcreate on a raw disk without first running pvcreate.
LVM requires each disk or partition to be initialized as a physical volume before it can be added to a volume group. Skipping pvcreate will cause vgcreate to fail because the disk is not recognized as a valid LVM device.
Always run pvcreate /dev/sdX on each disk you plan to use, then run vgcreate vg_name /dev/sdX /dev/sdY.
Because when you run vgreduce vg_name /dev/sdb, the physical volume still holds data that belongs to logical volumes. Removing it without moving the extents will cause those logical volumes to lose data.
This statement is actually describing the correct behavior, not a mistake. Let me correct the entry: "Removing a physical volume from a volume group without first relocating its data."
Use pvmove /dev/sdb to move all physical extents to other physical volumes in the same volume group before running vgreduce vg_name /dev/sdb.
Trying to extend a logical volume when the volume group has no free physical extents.
Logical volumes can only consume free extents within the volume group. If the volume group is full, the lvextend command will fail with a "no free space" error, even if the underlying disks have unallocated space outside LVM.
First, verify free space in the volume group using vgs or vgdisplay. If none is available, either add a new physical volume to the volume group or reduce an existing logical volume (if safe).
Because after resizing a logical volume, the filesystem does not automatically grow to fill the new space. The logical volume is larger, but the filesystem still sees the old size.
This is a very common mistake. The lvextend command only extends the block device, not the filesystem. The administrator must separately resize the filesystem using tools like resize2fs, xfs_growfs, or lvextend -r (which resizes both).
After extending the logical volume, run the appropriate filesystem resize command for your filesystem type. Alternatively, use lvextend -r to automatically resize the filesystem as well.
Assuming that when you create a logical volume with 100%FREE, it consumes all space in the volume group forever.
The 100%FREE allocation happens at creation time, but the volume group can later be extended with more physical volumes. The logical volume will not automatically absorb the new space. It only uses the free extents available at the time of creation.
If you want a logical volume to use all space in a volume group including future additions, you must manually extend the logical volume after adding new disks. There is no automatic expansion.
Exam Trap — Don't Get Fooled
{"trap":"You are asked to extend a volume group by adding a new physical volume. The question says: 'The administrator runs vgextend vg_data /dev/sdb, but the command fails. What is the most likely reason?'
The trap answer is 'The disk is not formatted with a filesystem,' which many learners choose.","why_learners_choose_it":"Learners often confuse the preparation steps for a new disk. In everyday work, we format disks with mkfs to use them.
So they assume LVM also requires a filesystem before adding to a volume group. They do not realize that LVM works at a lower level using physical volumes, not filesystems.","how_to_avoid_it":"Remember that LVM requires a physical volume, not a filesystem.
Before you can add a disk to a volume group, you must run pvcreate /dev/sdb to initialize it as a physical volume. A filesystem is only created later, on top of a logical volume. So the real cause could be that pvcreate was not run first, or that the disk is already in use by another volume group."
Commonly Confused With
A physical volume is a single disk or partition that has been initialized for LVM. A volume group is a collection of one or more physical volumes. The physical volume is the building block; the volume group is the pool. A common exam trick is asking whether a command operates on a PV or a VG.
If you have two disks, /dev/sda and /dev/sdb, each is a physical volume after pvcreate. Together, they form a volume group named vg_data.
A logical volume is a virtual partition created from the free extents in a volume group. The volume group provides the space, and the logical volume consumes it. You format a logical volume with a filesystem, but you never format a volume group directly. Confusing these leads to mistakes like trying to mkfs on a VG.
The volume group vg_data contains 100 GB. You create a 20 GB logical volume called lv_web. lv_web is what you format and mount; vg_data is just the pool.
A volume group snapshot is a point-in-time copy of a logical volume, stored in the same volume group. It is not a different type of group but a feature that relies on the volume group's free extents. Beginners think snapshots are separate volume groups, but they are just special read-write logical volumes that capture changes.
If you have vg_data with lv_db, you create a snapshot called lv_db_snap inside vg_data. The snapshot uses free space in vg_data to store original data blocks.
Step-by-Step Breakdown
Identify and prepare physical disks
Use fdisk -l or lsblk to identify available disks (e.g., /dev/sdb, /dev/sdc). Initialize each disk as a physical volume using pvcreate /dev/sdb /dev/sdc. This writes LVM metadata to the first few sectors of each disk.
Create the volume group
Use vgcreate vg_name /dev/sdb /dev/sdc to aggregate the physical volumes into a pool. The volume group is now created with a default extent size (usually 4 MiB). You can specify a custom extent size with the -s option.
Create logical volumes from the volume group
Use lvcreate -n lv_name -L 10G vg_name to carve out a logical volume of 10 GB. The logical volume will use extents from the pool. You can also specify percentage-based sizing, e.g., -l 50%FREE.
Format and mount the logical volume
Format the logical volume with a filesystem, e.g., mkfs.ext4 /dev/vg_name/lv_name. Then create a mount point and mount it. Add an entry to /etc/fstab for persistence. The logical volume is now usable as a storage volume.
Extend the volume group when more space is needed
When the volume group runs low on free extents, add a new physical volume: pvcreate /dev/sdd followed by vgextend vg_name /dev/sdd. The volume group now has more free space for existing or new logical volumes.
Reduce the volume group (remove a physical volume)
Before removing a physical volume, migrate its extents to other PVs in the same VG using pvmove /dev/sdb. Then run vgreduce vg_name /dev/sdb. The physical volume can then be removed from the system.
Remove the volume group entirely
First remove all logical volumes with lvremove. Then use vgremove vg_name to delete the volume group. Finally, if desired, use pvremove on each physical volume to clear LVM metadata.
Practical Mini-Lesson
The volume group is the central management point in LVM, so understanding how to interact with it is critical for any Linux system administrator. In practice, most administrators will create a volume group early in the server build process, often during OS installation. The volume group might be named something intuitive like vg_root, vg_data, or vg_app. A typical production server might have two volume groups: one for the OS (vg_root) and one for application data (vg_data). This separation simplifies backup and disaster recovery.
When you create a volume group, you must choose an extent size. The default of 4 MiB is fine for most workloads, but large-scale storage might benefit from 16 MiB or 32 MiB extents, especially if you have very large logical volumes. The extent size affects how many extents are needed and can impact performance with very small logical volumes. You cannot change the extent size after the volume group is created, so choose wisely.
Professionals need to be comfortable with commands like vgscan to scan for volume groups on all disks, vgchange -ay to activate all volume groups, and vgdisplay to view detailed metadata. The vgs command provides a concise summary with total size, free space, and number of PVs and LVs. This is often the first command run when troubleshooting storage issues.
What can go wrong? A common failure scenario is when a physical volume fails or is disconnected. The volume group will become partially missing or completely inactive. The vgchange -ay command will fail, and vgs will show the VG with a "P" (partial) attribute. The admin must decide whether to recover the data, remove the missing PV, or restore from backup. Tools like vgreduce --removemissing can clean up the volume group but may cause data loss if the missing PV held active data.
Another potential issue is running out of metadata space. Each volume group has a limited number of entries for physical volumes and logical volumes. In older LVM versions, this could be a problem, but modern LVM allows increasing metadata size at VG creation time. If you hit metadata limits, you may need to back up data and recreate the VG with larger metadata.
Thin provisioning within a volume group can also cause oversubscription problems. If multiple thin logical volumes write data and the sum exceeds the physical capacity of the volume group, the VG will run out of space and writes will fail. Monitoring free space in the volume group is essential, especially in thin provisioning environments.
Finally, remember that volume groups cannot span across different LVM versions or types without conversion. For example, you cannot combine a standard LVM volume group with a clustered LVM volume group without changing the volume group type (vgchange -c). Understanding these practical management details will help you avoid costly mistakes in production.
Troubleshooting Clues
Symptom:
Symptom:
Symptom:
Symptom:
Symptom:
Memory Tip
Think V-G-: Volume Group is the Big Green Bucket that holds all the Physical Vegetables before they become Logical Lettuce.
Covered in These Exams
Current Exam Context
Current exam versions that test this topic — use these objectives when studying.
XK0-006CompTIA Linux+ →220-1101CompTIA A+ Core 1 →Legacy Exam Context
Older materials may mention these exam versions, but learners should use the current objectives for their target exam.
XK0-005XK0-006(current version)Related Glossary Terms
802.1Q is the networking standard that allows multiple virtual LANs (VLANs) to share a single physical network link by tagging Ethernet frames with VLAN identification information.
AAA (Authentication, Authorization, and Accounting) is a security framework that controls who can access a network, what they are allowed to do, and tracks what they did.
An A record is a type of DNS resource record that maps a domain name to an IPv4 address.
Quick Knowledge Check
1.What command creates a volume group named vg_backup from two physical volumes /dev/sdb and /dev/sdc?
2.Which LVM component is a pool of storage that can contain multiple physical volumes and from which logical volumes are created?
3.Before removing a physical volume from a volume group, what must you do to avoid data loss?
Frequently Asked Questions
Can a volume group span multiple physical disks?
Yes, that is one of the main purposes of a volume group. You can combine several disks or partitions into one volume group, and the logical volumes can use space from any of the underlying physical volumes.
What happens if a physical volume in a volume group fails?
The volume group becomes partially missing and cannot activate its logical volumes fully. You may use vgreduce --removemissing to remove the failed PV, but this will cause data loss if any logical volumes had data on that PV. It is important to have backups and redundancy (e.g., RAID) when using multiple disks in a VG.
Can I change the extent size after creating a volume group?
No, the extent size is set at volume group creation time and cannot be changed later. If you need a different extent size, you must create a new volume group and migrate the data.
How do I see how much free space is available in a volume group?
Use the vgs command or vgdisplay to show total size, allocated space, and free space. The VFree column in vgs output shows the free space in the volume group.
Is a volume group the same as a RAID array?
No. A RAID array combines disks for redundancy or performance at a lower level (hardware or mdadm). A volume group is an LVM abstraction that can include RAID arrays, single disks, or partitions. They serve different purposes but can work together.
Can I use a volume group across multiple servers?
Yes, but only with clustered LVM (CLVM) or shared storage solutions like SAN. Standard LVM expects exclusive access to physical volumes. Cluster LVM coordinates access across nodes to avoid corruption.
Summary
A volume group is a fundamental abstraction in LVM that pools multiple physical volumes into a single, flexible storage resource. By decoupling logical storage from physical hardware, volume groups allow system administrators to resize storage, add capacity, and manage space without downtime. The volume group is the container that holds physical volumes as building blocks and provides extents that can be allocated to logical volumes.
Understanding volume groups is critical for any IT professional working with Linux systems, especially for certifications like RHCSA, CompTIA Linux+, and LPIC-1. Exam questions test not only the commands (vgcreate, vgextend, vgreduce, vgdisplay) but also the conceptual relationships between physical volumes, volume groups, and logical volumes. Common traps include trying to remove a physical volume without moving its data, forgetting to resize the filesystem after extending a logical volume, and skipping pvcreate before adding a disk to a volume group.
In real-world production, volume groups give administrators the agility to respond to changing storage needs quickly. Whether you are adding a new disk to a volume group to grow a database volume or removing a failed disk after migrating its data, the volume group is the tool that makes these operations possible with zero downtime. Mastering volume groups is not just about passing exams, it is about being able to manage storage effectively in any Linux environment.