Home Contact Download

asyd.net

Welcome to Bruno Bonfils's (aka asyd homepage).

Managing software raid1 with gmirror

Description

gmirror is a tool for creating / managing software raid 1 under FreeBSD >= 5.3.

Requirements

FreeBSD 5.3 or more with geom compiled in. (or with module)

Usefull commands

Task Command
Load gmirror modules kldload geom_mirror
Create a new gmirror gmirror label -v -b split -s 2048 gm0 da0 da1
Verify gmirror status gmirror status
List gmirrors gmirror list

Disk Failure

If a disk fails, you should replace the disk and tell gmirror to resync the array. First, you'll need to identify the faulty disk:

#> gmirror status
#> gmirror list

Then, you should stop the FreeBSD host, and replace the faulty disk. Once the disks is changed, restart the host.

Now, you should reintegrate the new disk to the array:

(note: you should replace ad0 and gm0 with correct values you've identified before)

#> gmirror remove gm0 ad0
#> gmirror insert gm0 ad0

Now, enjoy reconstruction !

You could get informed on sync status:

#> gmirror status