ZoL Hotspare auto-rebuild

Chuckleb

Moderator
Mar 5, 2013
1,017
331
83
Minnesota
So I saw that a drive was starting to fail and I pulled the disk, expecting that the hotspare that I defined would automatically rebuild. Well it didn't kick in and I had to actually remove it from the pool and force a resliver to that disk by hand.

My question, does ZFS on Linux (CentOS specifically) support hotspare autorebuilds? If so, what did I forget to enable, if not, then what's the point if defining a drive as a spare?
 

Terry Kennedy

Well-Known Member
Jun 25, 2015
1,067
506
113
New York City
www.glaver.org
Nevermind. I didn't realize that the autoreplace setting is off by default. I'll have to set that and wait for the next drive failure to see how it does.. or test on my bench systems at work.

Grr. Silly setting.
On [Open]Solaris, this is handled by an event daemon. Autoreplace on/off just tells the daemon whether or not to do the replacement. On FreeBSD, the autoreplace setting doesn't do anything by default - you need to write a devd rule to handle triggering the actual replacement. I'm not sure what Linux does, but I'm sure it could be added to systemd :rolleyes:.
 
  • Like
Reactions: lmk and Chuckleb

Chuckleb

Moderator
Mar 5, 2013
1,017
331
83
Minnesota
Ah, so there is still a watched daemon missing. OK, interesting. Thanks for the info, I'll have to add this back to my homework when the new drives come back.