OPNsense Forum

English Forums => 25.7 Series => Topic started by: justmehereinBrisbane on September 15, 2025, 07:29:15 AM

Title: How to add a hot spare to a GEOM Raid 1
Post by: justmehereinBrisbane on September 15, 2025, 07:29:15 AM
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

Title: Re: How to add a hot spare to a GEOM Raid 1
Post by: Patrick M. Hausen on September 15, 2025, 08:00:14 AM
A GEOM mirror? Really? Quite unusual. You are sure it's not ZFS? Please post the output of
gpart show
gmirror status
Title: Re: How to add a hot spare to a GEOM Raid 1
Post by: justmehereinBrisbane on September 15, 2025, 08:34:08 AM
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





Title: Re: How to add a hot spare to a GEOM Raid 1
Post by: Patrick M. Hausen on September 15, 2025, 09:05:52 AM
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.
Title: Re: How to add a hot spare to a GEOM Raid 1
Post by: jade_nekotenshi on September 17, 2025, 04:49:10 PM
With a mirror, a three-way mirror almost makes more sense than a hot spare. Hot spares are more useful for RAIDZ/RAIDZ2.