How to add a hot spare to a GEOM Raid 1

Started by justmehereinBrisbane, September 15, 2025, 07:29:15 AM

Previous topic - Next topic
Hi

I have an up and running OPNSENSE system with the latest updates  with 2 x 240GB SSDS running in software GEOM raid 1

Is it possible to add a 3rd 240GB SSD to add as a hot spare that would kick in if one of the disks in the raid 1 was to fail?

Or do i have to do this at installation?

Thanking you

J


A GEOM mirror? Really? Quite unusual. You are sure it's not ZFS? Please post the output of
gpart show
gmirror status
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick

Thank you for your response.


I can confirm it is ZFS as I am able to take snapshots.

gpart show
=>       40  500118112  ada0  GPT  (238G)
         40     532480     1  efi  (260M)
     532520       1024     2  freebsd-boot  (512K)
     533544        984        - free -  (492K)
     534528   16777216     3  freebsd-swap  (8.0G)
   17311744  482805760     4  freebsd-zfs  (230G)
  500117504        648        - free -  (324K)

=>       40  500118112  ada1  GPT  (238G)
         40     532480     1  efi  (260M)
     532520       1024     2  freebsd-boot  (512K)
     533544        984        - free -  (492K)
     534528   16777216     3  freebsd-swap  (8.0G)
   17311744  482805760     4  freebsd-zfs  (230G)
  500117504        648        - free -  (324K)

gmirror status produces no output

I have created a os-monit service called raid_check  path is /sbin/gmirror status tests is NonZeroStatus

This shows up in Monit status as

Program 'Raid_Check'
  status                       OK
  monitoring status            Monitored
  monitoring mode              active
  on reboot                    start
  last exit value              0
  last output                  -
  data collected               Mon, 15 Sep 2025 16:31:01



Hope all of this makes sense.

Cheers

J






Now the output of this command please - you are running a ZFS mirror, not a GEOM one:

zpool status
And yes, you can add a hot spare with ZFS.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

With a mirror, a three-way mirror almost makes more sense than a hot spare. Hot spares are more useful for RAIDZ/RAIDZ2.