knowledge/technology/bsd/gmirror.md
2023-12-04 11:02:23 +01:00

1 KiB

obj
filesystem

gmirror

The gmirror utility is used for mirror (RAID-1) configurations on FreeBSD. After a mirror's creation, all components are detected and configured automatically. All operations like failure detection, stale component detection, rebuild of stale components, etc. are also done automatically. The gmirror utility uses on-disk metadata (stored in the provider's last sector) to store all needed information. Since the last sector is used for this purpose, it is possible to place a root file system on a mirror.

Usage

  • Automatic Creation
gmirror label [-Fhnv] [-b balance] [-s slice] name prov ...
  • Remove a device
gmirror forget [-v] name ... # Forget disconnected devices
gmirror deactivate	[-v] name prov ...
gmirror remove [-v] name prov ...
  • Destroy Mirror
gmirror destroy [-fv] name	...
  • Clear metadata on device
gmirror clear [-v]	prov ...
  • Status of stripes
gmirror list
gmirror status