Vinum is a logical volume manager that addresses physical disks shortcomings (Size, reliability, performance,...). Vinum volumes (logical disks) look exactly like a normal disk but with added functionalities.
Volumes: They are logical disks that look like unix disks but they have no size limitation, they are composed of plexes that represent the total address space of a volume. We can create fiesystems on these volumes as if they were physical drives. Vinum subdivides a single UNIX partition into subdisks which it uses as building blocks for plexes.Plexes can have more than one subdisk spread over all the Vinum drives, so the size of a drive does not dictate the size of a plex or a volume.
Plexes contain the same data for redundancy, they represent the entire date of a volume. Vinum attributes multiple plexes to a volume. Each plex represents the data in a volume.
Vinum drives(Unix partitions) can contain any numbers of subdisks.
Vinum offers , RAID-0 (Striping), RAID1 (Mirroring) and RAID5 (Parity)
Mirroring works by having two copies of the same data on different disks, data is written to both disks but can be read from either.
RAID 5 :
In this layout one block in each stripe holds the the parity of the other blocks.
The parity block position varies from one stripe to the next to have a balanced load.
In case of failure of a drive fails, RAID-5 reconstructs the data using the parity information.
The array keeps working in degraded mode: a read from the broken drive is done by
recalculating the data from the rest of the drives.
After a new drives is installed, Vinum calculates the data and writes it on the new drive.
RAID-5 requires less storage but write is around 25% slower than read
Creating Vinum Drives: You need to reserve disk space for Vinum drives, we create a partition of the type Vinum. We create Vinum partitions the same way we would an normal UFS partition with the exception that it would be of Vinum type instead. The all live in /dev/gvinum. Types of plexes: Different types of plexes have different characteristics, to some we can add disks after the creation phase to others we can't, to some the size of subdisks must be the same, to others subdisks could be of different sizes, the table below summarizes these characteristics:
Concatenated: for large amounts of data with average performance. Striped: High performance with high read and write. RAID-5: High availability focused on read access. A glimpse into the Vinum configuration file (Mirrored Volume):
Subdisks are created in Vinum partitions.
Plexes and subdisks names:
The plexes and subdisks names are generated automatically by the system. When creating a mirrored volume, it is important to ensure that the subdisks of each plex are on different drives, so that a drive failure will not take down both plexes.
The mirrored plex diagram:
FreeBSD now includes the Vinum as a module (class) in the GEOM framework accessible via gvinum.
As an alternative to Vinum, ZFS is a filesystem and a volume manager rolled into one package, with a slew of very powerful properties.