|
NAMEgvinum —
Logical Volume Manager control program
DEPRECATION NOTICEgvinum and associated
geom(4)
kernel support is deprecated, and may not be available in
FreeBSD 14.0 and later. Users are advised to migrate
to
gconcat(8),
gmirror(8),
gstripe(8),
graid(8),
or ZFS(8).
More information is available at
https://wiki.freebsd.org/DeprecationPlan/gvinum.
SYNOPSIS
COMMANDS
DESCRIPTIONThegvinum utility communicates with the kernel
component of the GVinum logical volume manager. It is designed either for
interactive use, when started without command line arguments, or to execute a
single command if the command is supplied on the command line. In interactive
mode, gvinum maintains a command line history.
OPTIONSThegvinum commands may be followed by an option.
ENVIRONMENTFILES
EXAMPLESTo create a mirror on disks /dev/ada1 and /dev/ada2, create a filesystem, mount, unmount and then stopgvinum :
gvinum mirror /dev/ada1
/dev/ada2 newfs
/dev/gvinum/gvinumvolume0 mount /dev/gvinum/gvinumvolume0
/mnt ... unmount /mnt gvinum stop To create a striped mirror on disks /dev/ada1 /dev/ada2 /dev/ada3 and /dev/ada4 named "data" and create a filesystem: gvinum mirror -s -n data /dev/ada1
/dev/ada2 /dev/ada3 /dev/ada4 newfs /dev/gvinum/data To create a raid5 array on disks /dev/ada1 /dev/ada2 and /dev/ada3, with stripesize 493k you can use the raid5 command: gvinum raid5 -s 493k /dev/ada1
/dev/ada2 /dev/ada3 Then the volume will be created automatically. Afterwards, you have to initialize the volume: gvinum start myraid5vol The initialization will start, and the states will be updated when it's finished. The list command will give you information about its progress. Imagine that one of the drives fails, and the output of 'printconfig' looks something like this: drive gvinumdrive1 device
/dev/ada2 drive gvinumdrive2 device
/dev/??? drive gvinumdrive0 device
/dev/ada1 volume myraid5vol plex name myraid5vol.p0 org raid5
986s vol myraid5vol sd name myraid5vol.p0.s2 drive
gvinumdrive2 len 32538s driveoffset 265s plex myraid5vol.p0 plexoffset
1972s sd name myraid5vol.p0.s1 drive
gvinumdrive1 len 32538s driveoffset 265s plex myraid5vol.p0 plexoffset
986s sd name myraid5vol.p0.s0 drive
gvinumdrive0 len 32538s driveoffset 265s plex myraid5vol.p0 plexoffset
0s Create a new drive with this configuration: drive gdrive4 device
/dev/ada4 Then move the stale subdisk to the new drive: gvinum move gdrive4
myraid5vol.p0.s2 Then, initiate the rebuild: gvinum start
myraid5vol.p0 The plex will go up form degraded mode after the rebuild is finished. The plex can still be used while the rebuild is in progress, although requests might be delayed. Given the configuration as in the previous example, growing a RAID-5 or STRIPED array is accomplished by using the grow command: gvinum grow myraid5vol.p0
/dev/ada4 If everything went ok, the plex state should now be set to
growable. You can then start the growing with the
gvinum start
myraid5vol.p0 As with rebuilding, you can watch the progress using the
For a more advanced usage and detailed explanation of gvinum, the handbook is recommended. SEE ALSOgeom(4), geom(8)HISTORYThegvinum utility first appeared in
FreeBSD 5.3. The vinum
utility, on which gvinum is based, was written by
Greg Lehey.
The AUTHORSLukas Ertl <le@FreeBSD.org>Chris Jones <soc-cjones@FreeBSD.org> Ulf Lilleengen <lulf@FreeBSD.org> BUGSCurrently,gvinum does not rename devices in
/dev/gvinum until reloaded.
The Moving subdisks that are not part of a mirrored or RAID-5 volume will destroy data. It is perhaps a bug to permit this. Plexes in which subdisks have been moved do not automatically sync or rebuild parity. This may leave data unprotected and is perhaps unwise. Currently,
Visit the GSP FreeBSD Man Page Interface. |