|
NAMEgvirstor —
control utility for virtual data storage devices
SYNOPSIS
DESCRIPTIONThegvirstor utility is used for setting up a virtual
storage device of arbitrary large size (for example, several TB), consisting
of an arbitrary number of physical storage devices with the total size which
is equal to or smaller than the virtual size. Data for the virtual devices
will be allocated from physical devices on demand. The idea behind
gvirstor is similar to the concept of Virtual Memory
in operating systems, effectively allowing users to overcommit on storage
(free file system space). The concept is also known as "thin
provisioning" in virtualization environments, only here it is implemented
on the level of physical storage devices.
The first argument to
Additional options: EXAMPLESThe following example shows how to create a virtual device of default size (2 TiB), of default chunk (extent) size (4 MiB), with two physical devices for backing storage.gvirstor label -v mydata /dev/ada4 /dev/ada6 newfs /dev/virstor/mydata From now on, the virtual device will be available via the /dev/virstor/mydata device entry. To add a new physical device / component to an active virstor device:
gvirstor add
mydata
ada8
This will add physical storage of ada8 to /dev/virstor/mydata device. To see the device status information (including how much physical storage is still available for the virtual device), use: gvirstor list All standard
geom(8)
subcommands (e.g. SYSCTL VARIABLESgvirstor has several
sysctl(8)
tunable variables.
int kern.geom.virstor.debug This sysctl controls verbosity of the kernel module, in the range 1 to 15. Messages that are marked with higher verbosity levels than this are suppressed. Default value is 5 and it is not recommended to set this tunable to less than 2, because level 1 messages are error events, and level 2 messages are system warnings. int kern.geom.virstor.chunk_watermark Value in this sysctl sets warning watermark level for physical chunk usage on a single component. The warning is issued when a virstor component has less than this many free chunks (default 100). int kern.geom.virstor.component_watermark Value in this sysctl sets warning watermark level for component usage. The warning is issued when there are less than this many unallocated components (default is 1). All these sysctls are also available as loader(8) tunables. DIAGNOSTICSThegvirstor utility exits 0 on success,
and >0 if an error occurs.
The number (%d) is message verbosity / importance level, in the range 1 to 15. If a message filtering, dispatching or operator alert system is used, it is recommended that messages with levels 1 and 2 be taken seriously (for example, to catch out-of-space conditions as set by watermark) sysctls. SEE ALSOgeom(4), fstab(5), geom(8), glabel(8), newfs(8)HISTORYThegvirstor utility first appeared in
FreeBSD 7.0.
AUTHORSIvan Voras <ivoras@FreeBSD.org>Sponsored by Google Summer of Code 2006. BUGSCommandsadd and remove contain
unavoidable critical sections which may make the virstor device unusable if a
power failure (or other disruptive event) happens during their execution. It
is recommended to run them when the system is quiescent.
ASSUMPTIONS AND INTERACTION WITH FILE SYSTEMSThere are several assumptions thatgvirstor has in its
operation: that the size of the virtual storage device will not change once it
is set, and that the sizes of individual physical storage components will
always remain constant during their existence. For alternative ways to
implement virtual or resizable file systems see
zfs(1M),
gconcat(8)
and
growfs(8).
Note that
Visit the GSP FreeBSD Man Page Interface. |