Global spare

poldas

Contributor
Joined
Sep 18, 2012
Messages
104
Hi,

I have 2 Volumes each has 4 SSD 1.9TB - RAIDZ1. I bought one more disk SSD 1.9TB and want to use it like a global spare for both Volumes. Is it possible to use one disk like a spare for two volumes?
 
Joined
Jul 3, 2015
Messages
926
Depends what you mean by 'volume' but assuming you mean zpool then no. A spare can only be assigned to one zpool. However, if you meant two vdevs in one zpool then yes sure the disk will act as a spare for the whole pool regardless of vdev.

If you did two pools then the question is why?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
Hi,

I have 2 Volumes each has 4 SSD 1.9TB - RAIDZ1. I bought one more disk SSD 1.9TB and want to use it like a global spare for both Volumes. Is it possible to use one disk like a spare for two volumes?
As Johnny said the question is why, because the configuration you have, if it is two separate pools, is less than optimal.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Yes, hot spares can be shared between pools. Here is an extract from the manual page;
Spares can be shared across multiple pools
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
Yes, hot spares can be shared between pools. Here is an extract from the manual page;
Is two pools the optimal configuration?
 
Joined
Jul 3, 2015
Messages
926

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
@Chris Moore, I don't know. I simply knew that spares had been designed for global use, back when ZFS was Solaris mostly/only. But going back to the original posting, it does look like a single pool with 2 vDevs would be better.

@Johnny Fartpants, again I don't know. Simply verified it from the manual page on Linux. But even if that is not a FreeBSD/NAS thing, they are moving the OpenZFS code base to the one shared with Linux.

The issue with spares on FreeBSD/NAS & Linux, is likely more to do with the "zed" daemon. If I recall correctly, that is the creature responsible for activating a spare. (I've not used spares at home, on FreeNAS or Linux. And any ZFS spares I have used, were on Solaris... which handles spare activation differently.)
 
Top