What is the difference between a Partition and a Volume in Redhat Linux 5?
migrated from stackoverflow.com Jul 16 '10 at 9:41
This question came from our site for professional and enthusiast programmers.
A partition in Linux, is the same things as in other PC OS: a disk contains a partition table that contains the definition of the sliced sub-parts of the drive. The number of partition is limited by the BIOS/PC architecture.
Take a modern SATA drive /dev/sda. If you have 4 partitions they will be called:
You can create a file-system on those partitions (or on the whole drive).
In Linux, there is a volume manager, called LVM that let the kernel handle drives logically and not just physically. And the logic in LVM can do far more than juste separate a single drive into smaller parts. It can create a single volume over multiple drives, create snapshot, extend a volume, reduce it's size and more.
Two SATA disks (/dev/sda and /dev/sdb) of 300 Gb can be used to create a single volume of 600 Gb. You can turn partition or whole disk into physical volume handled by LVM:
From those physical volumes you create a volume group:
So, MyGroup span over two drives. An almost infinite number of volumes can be created from there:
Volume can be used as old fashion partitions:
During installation, RedHat handle those steps for you.
The downside of using LVM it's harder to repair a disk if you lose LVM internal data. So, it's better to backup the content of a volume than the disks themself (like using dd(1)).
A partition is a given space on a hard drive designated by entering its offset and size into a partition table. A volume is an amount of storage which usually has filesystem structures on it to allow storing files.
A partition may be a volume, but is not required to be one.