GVINUM(8)
π GVINUM π
hey bestie, welcome to the manual page for gvinum β the System Manager's Manual's very own Logical Volume Manager control program. yes she's iconic, yes she's also deprecated (more on that in a sec π«£), and yes we're gonna read the whole thing together. grab a snack. π
πΈ NAME πΈ
gvinum β Logical Volume Manager control program
π¨ DEPRECATION NOTICE π¨
okay so this is important, please actually read it:gvinumand the associatedgeom(4)kernel support is deprecated, and is not available in FreeBSD 15.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 β¨
gvinum [command] [-options]
π COMMANDS π
okay so this is the whole menu of things she can do. every single one. no skipping. π
attach plex volume [rename]attach subdisk plex [offset] [rename]β Attach a plex to a volume, or a subdisk to a plex. If offset is specified, the subdisk will be attached to the given offset within the plex. If rename is specified, the subdisk or plex will change name according to the object it attaches to.checkparity [-f] plexβ Check the parity blocks of a RAID-5 plex. The parity check will start at the beginning of the plex if the-fflag is specified, or otherwise at the location of the parity check pointer, the first location at which plex's parity is incorrect. All subdisks in the plex must beupfor a parity check.concat [-fv] [-n name] drivesβ Create a concatenated volume from the specified drives. If no name is specified, a unique name will be set bygvinum.create [-f] [description-file]β Create a volume as described in description-file. If no description-file provided, opens an editor and provides the currentgvinumconfiguration for editing. The-fflag will makegvinumignore any errors regarding creating objects that already exists. However, in contrast tovinum, objects that are not properly named in the description-file will not be created when the-fflag is given. π (yes, that's a real difference, don't @ me)detach [-f] [plex | subdisk]β Detach a plex or subdisk from the volume or plex to which it is attached.grow plex deviceβ Grow a plex by creating agvinumdrive and subdisk on device and attach it to the plex. If required by the plex organization, it will be put into thegrowablestate.helpβ Provides a synopsis ofgvinumcommands and arguments. (the "bestie help me" of commands π«Ά)l|list [-rvV] [volume | plex | subdisk]ld [-rvV] [drive ...]ls [-rvV] [subdisk ...]lp [-rvV] [plex ...]lv [-rvV] [volume ...]β List information about the relevant object(s). The-rflag provides recursive display, showing each object's subordinate objects in proper relation. The-vand-Vflags provide progressively more detailed output.mirror [-fsv] [-n name] drivesβ Create a mirrored volume from the specified drives. It requires at least a multiple of 2 drives. If no name is specified, a unique name will be set bygvinum. If the-sflag is specified, a striped mirror will be created, and thus requires a multiple of 4 drives.move|mv -f drive subdisk [...]β Move the subdisk(s) to the specified drive. The-fflag is required, as all data on the indicated subdisk(s) will be destroyed as part of the move. This can currently only be done when the subdisk is not being accessed.
If a single subdisk is moved, and it forms a part of a RAID-5 plex, the moved subdisks will need to be set to the βstaleβ state, and the plex will require a start command. If multiple subdisk(s) is moved, and form part of a RAID-5 plex, the moved disk(s) will need to be set to the βupβ state and the plex will require a rebuildparity command. If the subdisk(s) form part of a plex that is mirrored with other plexes, the plex will require restarting and will sync once restarted. Moving more than one subdisk in a RAID-5 plex or subdisks from both sides of a mirrored plex volume will destroy data. Note that parity rebuilds and syncing must be started manually after a move. π
printconfigβ Write a copy of the current configuration to standard output.quitβ Exitgvinumwhen running in interactive mode. Normally this would be done by entering the EOF character.raid5 [-fv] [-s stripesize] [-n name] drivesβ Create a RAID-5 volume from the specified drives. If no name is specified, a unique name will be set bygvinum. This organization requires at least three drives.rename [-r] drive | subdisk | plex | volume newnameβ Change the name of the specified object. The-rflag will recursively rename subordinate objects.
β οΈ Note that device nodes will not be renamed until gvinum is restarted. so don't panic when you don't see it yet, bestie.
rebuildparity [-f] plexβ Rebuild the parity blocks of a RAID-5 plex. The parity rebuild will start at the beginning of the plex if the-fflag is specified, or otherwise at the location of the parity check pointer. All subdisks in the plex must beupfor a parity check.resetconfig [-f]β Reset the completegvinumconfiguration. (nuclear option fr fr π§¨)rm [-r] volume | plex | subdiskβ Remove an object and, if-ris specified, its subordinate objects.saveconfigβ Savegvinumconfiguration to disk after configuration failures.setstate [-f] state volume | plex | subdisk | driveβ Set state without influencing other objects, for diagnostic purposes only. The-fflag forces state changes regardless of whether they are legal.startβ Read configuration from all vinum drives.start [-S size] volume | plex | subdiskβ Allow the system to access the objects. If necessary, plexes will be synced and rebuilt. If a subdisk was added to a running RAID-5 or striped plex,gvinumwill expand into this subdisk and grow the whole RAID-5 array. This can be done without unmounting your filesystem. The-Sflag is currently ignored.stop [-f] [volume | plex | subdisk]β Terminate access to the objects, or stopgvinumif no parameters are specified.stripe [-fv] [-n name] drivesβ Create a striped volume from the specified drives. If no name is specified, a unique name will be set bygvinum. This organization requires at least two drives.
π¦ DESCRIPTION π¦
The gvinum 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. (main character energy: she remembers what you said last time π
)
π OPTIONS π
The gvinum commands may be followed by an option.
-fβ The-f(βforceβ) option overrides safety checks. It should be used with extreme caution. This option is required in order to use themovecommand.-rβ The-r(βrecursiveβ) option applies the command recursively to subordinate objects. For example, in conjunction with thelvcommand, the-roption will also show information about the plexes and subdisks belonging to the volume. It is also used by therenamecommand to indicate that subordinate objects such as subdisks should be renamed to match the object(s) specified and by thermcommand to delete plexes belonging to a volume and so on.-vβ The-v(βverboseβ) option provides more detailed output.-Vβ The-V(βvery verboseβ) option provides even more detailed output than-v. (she's extra and we love her π)
πΏ ENVIRONMENT πΏ
EDITORβ The name of the editor to use for editing configuration files, by defaultvi(1)is invoked.
π FILES π
/dev/gvinumβ directory with device nodes forgvinumobjects
π« EXAMPLES π«
To create a mirror on disks /dev/ada1 and /dev/ada2, create a filesystem, mount, unmount and then stop gvinum:
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 from 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 start command:
gvinum start myraid5vol.p0
As with rebuilding, you can watch the progress using the list command.
For a more advanced usage and detailed explanation of gvinum, the handbook is recommended. π
π SEE ALSO π
πΈ HISTORY πΈ
okay so story time, bestie π β gvinum first showed up in FreeBSD 5.3. and like, it didn't come from nowhere: the vinum utility, which gvinum is literally based on, was written by Greg Lehey. iconic lineage fr π₯
the gvinum utility itself was written by Lukas Ertl. then Chris Jones added the move and rename commands and the documentation, all through the 2005 Google Summer of Code program π. a partial rewrite of gvinum was done by Lukas Ertl and Ulf Lilleengen through the 2007 Google Summer of Code program, and the documentation has been updated to reflect the new functionality. glow-up behavior, no cap β¨
π AUTHORS π
the brains behind the whole vibe, give them their flowers π«Ά:
- Lukas Ertl
<le@FreeBSD.org> - Chris Jones
<soc-cjones@FreeBSD.org> - Ulf Lilleengen
<lulf@FreeBSD.org>
π BUGS π
okay bestie, this is the part where we sit down and have a little talk π. none of this is a vibe, but you need to know it:
- Currently,
gvinumdoes not rename devices in/dev/gvinumuntil reloaded. so like, the name change is giving nothing until you reload π - The
-Sinitsize flag tostartis ignored. literally ignored. don't count on it. - Moving subdisks that are not part of a mirrored or RAID-5 volume will destroy data. It is perhaps a bug to permit this. so yeah β data gone, unalive, periodt π
- Plexes in which subdisks have been moved do not automatically sync or rebuild parity. This may leave data unprotected and is perhaps unwise. unprotected data is not the serve you think it is π©
- Currently,
gvinumdoes not yet fully implement all of the functions found invinum. Specifically, the following commands fromvinumare not supported β like, they're just not in the group chat: debugβ Cause the volume manager to enter the kernel debugger.debug flagsβ Set debugging flags.dumpconfig[drive ...]β List the configuration information stored on the specified drives, or all drives in the system if no drive names are specified.info[-vV]β List information about volume manager state.labelvolume β Create a volume label.resetstats[-r][volume | plex | subdisk]β Reset statistics counters for the specified objects, or for all objects if none are specified.setdaemon[value]β Set daemon configuration.
bestie please read the destroy-data one twice. i'm so serious. π«Ά
and that's the whole page, you made it to the end!! π this one's from the Debian build, dated January 23, 2025, and it lives at section GVINUM(8) π go forth and configure your volumes responsibly, mwah π
β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- Copyright (c) 2005 Chris Jones
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms