lvm.7 (2010 10)

l
lvm(7) lvm(7)
Create the volume group, vg01, containing the physical volume,
/dev/dsk/c0t0d0
, with the
vgcreate command.
vgcreate /dev/vg01 /dev/dsk/c0t0d0
You can view information about the newly created volume group with the
vgdisplay command.
vgdisplay -v /dev/vg01
Create a logical volume of size 100 MB, named
usrvol, on this volume group with the lvcreate com-
mand.
lvcreate -L 100 -n usrvol /dev/vg01
This creates two device files for the logical volume,
/dev/vg01/usrvol
, which is the block device file,
and
/dev/vg01/rusrvol
, which is the character (raw) device file.
You can view information about the newly created logical volume with the
lvdisplay command.
lvdisplay /dev/vg01/usrvol
Any operation allowed on a disk partition is allowed on the logical volume. Thus, you can use
usrvol to
hold a file system.
newfs /dev/vg01/rusrvol
mount /dev/vg01/usrvol /usr
To use a volume group version 2.0 or higher in the above example, only few changes are required.
The volume group directory and
group file are created automatically in all supported versions.
The
vgcreate command would be changed. The following creates the volume group with an extent size
of 32 megabytes and a maximum volume group size of 32 terabytes (see vgcreate (1M)).
vgcreate -V 2.0 -s 32 -S 32t /dev/vg01 /dev/dsk/c0t0d0
or
vgcreate -V 2.1 -s 32 -S 32t /dev/vg01 /dev/dsk/c0t0d0
or
vgcreate -V 2.2 -s 32 -S 32t /dev/vg01 /dev/dsk/c0t0d0
The following creates the volume group with an unshare unit of 512 KB.
vgcreate -V 2.2 -U 512 -s 32 -S 32t /dev/vg01 /dev/dsk/c0t0d0
SEE ALSO
lvchange(1M), lvcreate(1M), lvdisplay(1M), lvextend(1M), lvlnboot(1M), lvmadm(1M), lvmove(1M),
lvmpud(1M), lvreduce(1M), lvremove(1M), lvrmboot(1M), pvchange(1M), pvcreate(1M), pvdisplay(1M),
pvmove(1M), vgcfgbackup(1M), vgcfgrestore(1M), vgchange(1M), vgcreate(1M), vgdisplay(1M),
vgexport(1M), vgextend(1M), vgimport(1M), vgmodify(1M), vgmove(1M), vgreduce(1M), vgremove(1M),
vgscan(1M), vgversion(1M), intro(7).
HP-UX System Administration: Logical Volume Management .
If HP MirrorDisk/UX is installed: lvmerge(1M), lvsplit(1M), lvsync(1M), vgsync(1M).
If HP Serviceguard is installed: cmcheckconf(1M), cmquerycl(1M), Managing Serviceguard .
6 Hewlett-Packard Company 6 HP-UX 11i Version 3: October 2010