Next | Prev | Up | Top | Contents | Index
lv Logical Volumes
lv logical volumes are created and administered by means of a file defining the volumes, /etc/lvtab, and the commands mklv, lvinit, lvinfo, and lvck. There are two components to creating a logical volume from a set of disk partitions:
The root partition cannot be part of a logical volume, since the commands required for logical volume initialization must reside on it. Also, swap space cannot be configured as a logical volume.
Striping of lv logical volumes imposes some minor restrictions:
- If you want to stripe, all the drives (or to be exact, the partitions used for striping) must be exactly the same size (in disk blocks).
- If you later want to add more disk partitions to the volume, you must add them in units of the striping. That is, if you want to add disks to a three-way striped volume, you must add them three at a time.
Once a logical volume is created, it can be used as if it were a single disk partition. For example, you can create a filesystem on the logical volume and mount the filesystem. The command lvinfo prints information about active logical volumes. See the lvinfo(1M) reference page for more information.
The lvck command checks the consistency of logical volumes by examining the logical volume labels of devices constituting the volumes. It looks for:
- disks connected in the wrong place
- inconsistencies between the logical volume labels of a logical volume
- internal inconsistencies in /etc/lvtab entries
- inconsistencies between the logical volume labels of a logical volume and its entry in /etc/lvtab
The -d option of lvck can be used to create a new /etc/lvtab file after disks are moved or renumbered. See the lvck(1M) reference page for details.
lvck has some repair capabilities. If it determines that the only inconsistency in a logical volume is that a minority of devices have missing or corrupt logical volume labels, it is able to restore a consistent logical volume by rewriting good labels. lvck queries the user before attempting any repairs on a volume.
Examples of the lvck command line are given in the section "Checking Logical Volumes With lvck" in Chapter 8.
Next | Prev | Up | Top | Contents | Index