---
obj: filesystem
---
# gmirror
The gmirror utility is used for mirror ([RAID](../linux/filesystems/RAID.md)-1) configurations on [FreeBSD](FreeBSD.md).  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
```shell
gmirror label [-Fhnv] [-b balance] [-s slice] name prov ...
```

- Remove a device
```shell
gmirror forget [-v] name ... # Forget disconnected devices
gmirror deactivate	[-v] name prov ...
gmirror remove [-v] name prov ...
```

- Destroy Mirror
```shell
gmirror destroy [-fv] name	...
```

- Clear metadata on device
```shell
gmirror clear [-v]	prov ...
```

- Status of stripes
```shell
gmirror list
gmirror status
```