GRAID3(8)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… GRAID3 πŸ’…

okay bestie, so graid3 is the control utility for RAID3 devices β€” it's giving "system manager's manual" but make it cute. come sit with me, this is gonna be iconic. ✨


🌸 SYNOPSIS 🌸

graid3 label [-Fhnrvw] [-s blocksize] name prov prov prov ...
graid3 clear [-v] prov ...
graid3 configure [-adfFhnrRvwW] name
graid3 rebuild [-v] name prov
graid3 insert [-hv] [-n number] name prov
graid3 remove [-v] -n number name
graid3 stop [-fv] name ...
graid3 list
graid3 status
graid3 load
graid3 unload

πŸ¦‹ DESCRIPTION πŸ¦‹

so graid3 is literally the tool for RAID3 array configuration. the whole vibe: once you create a device, every component gets detected and configured automatically β€” failure detection, stale component detection, rebuild of stale components, all of it, automatic, no cap. 🫢

the tea on storage: graid3 uses on-disk metadata (the provider's last sector) to store all the info it needs. yes, that last sector. she's working overtime. πŸ’€

the first argument to graid3 tells it which action to perform:

πŸŽ€ label

creates a RAID3 device. the last component you give it holds the parity data, and the rest all hold regular data. the number of components has to be exactly 3, 5, 9, 17, etc. β€” that's 2^n + 1, iykyk, math queen behavior. πŸ‘‘

additional options include:

  • -F β€” don't synchronize after a power failure or system crash. this one assumes the device is in a consistent state, so like… she's trusting you. πŸ™ˆ
  • -h β€” hardcode the providers' names in the metadata.
  • -n β€” turn off autosynchronization of stale components.
  • -r β€” use the parity component for reading, round-robin style. without this option the parity component isn't used at all for reading operations when the device is in a complete state. with it, random I/O read operations are even 40% faster πŸ”₯ β€” but sequential reads get slower. also, no using this option if -w is also specified.
  • -s β€” manually specify the array block size. the block size gets set equal to the least common multiple of all components' sector sizes and the value you specified. note that array sector size is calculated as a multiple of block size and number of regular data components. big values may decrease performance and compatibility, since all I/O requests have to be a multiple of sector size. big number β‰  big win, bestie 😭
  • -w β€” turn on verify reading. when reading from a device in a complete state, it also reads data from the parity component and verifies the data by comparing XORed regular data with parity data. if verification fails, an EIO error is returned and the value of the kern.geom.raid3.stat.parity_mismatch sysctl gets increased. also β€” no using this option if -r is also specified. them's the rules. ⭐

🧚 clear

clears the metadata on the given providers. poof, gone. ✨

πŸ“ configure

configures the given device.

additional options include:

  • -a β€” turn on autosynchronization of stale components.
  • -d β€” don't hardcode providers' names in the metadata.
  • -f β€” synchronize the device after a power failure or system crash.
  • -F β€” don't synchronize after a power failure or system crash. assumes the device is in a consistent state. (yes, she's the opposite of -f, they're sisters πŸ’…)
  • -h β€” hardcode providers' names in the metadata.
  • -n β€” turn off autosynchronization of stale components.
  • -r β€” turn on round-robin reading.
  • -R β€” turn off round-robin reading.
  • -w β€” turn on verify reading.
  • -W β€” turn off verify reading.

πŸ’œ rebuild

rebuilds the given component, forcibly. ngl, if autosynchronization wasn't turned off for the given device, this command should be unnecessary β€” she's a "just in case" girlie. 🫢

🌈 insert

adds the given component to the existing array β€” perfect if one of the components was removed previously with the remove command, or if one component is missing and will not be connected again. if no number is given, the new component gets added instead of the first missed component.

additional options include:

  • -h β€” hardcode providers' names in the metadata.

πŸ‘‘ remove

removes the given component from the given array and clears the metadata on it. bye bestie, your metadata's been wiped πŸŽ€

πŸ’– stop

stops the given arrays.

additional options include:

  • -f β€” stop the given array even if it's opened. bold. iconic. slightly chaotic. πŸ”₯

🌸 list

see geom(8).

🌸 status

see geom(8).

🌸 load

see geom(8).

🌸 unload

see geom(8).


additional options include:

  • -v β€” be more verbose. she's a talker, and we love her for it. πŸ—£οΈ

⭐ EXIT STATUS ⭐

exit status is 0 on success, and 1 if the command fails. simple as that, periodt. ✨


πŸ¦‹ EXAMPLES πŸ¦‹

use 3 disks to set up a RAID3 array (with the round-robin reading feature). create a file system, mount it, then unmount it and stop the device:

graid3 label -v -r data da0 da1 da2
newfs /dev/raid3/data
mount /dev/raid3/data /mnt
...
umount /mnt
graid3 stop data
graid3 unload

create a RAID3 array, but don't use the automatic synchronization feature. rebuild the parity component:

graid3 label -n data da0 da1 da2
graid3 rebuild data da2

replace one data disk with a brand new one:

graid3 remove -n 0 data
graid3 insert -n 0 data da5

πŸŽ€ SEE ALSO πŸŽ€

geom(4), geom(8), mount(8), newfs(8), umount(8)


🌈 HISTORY 🌈

the graid3 utility appeared in FreeBSD 5.3. she's been serving looks since day one. πŸ’…


πŸ’œ AUTHORS πŸ’œ

Pawel Jakub Dawidek <pjd@FreeBSD.org> β€” we stan. 🫢


πŸ’€ BUGS πŸ’€

  • there should be a section with an implementation description. (not me pointing out the missing homework 😭)
  • documentation for sysctls kern.geom.raid3.* is missing.
fr fr though, those are real gaps in the docs β€” don't come for me, come for the manpage. πŸ™ˆ

and that's the whole page, bestie! this sweet little manual lands from Debian, dated January 23, 2025 β€” go forth and RAID3 responsibly. mwah πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms