Adding spare drive?

Status
Not open for further replies.
Joined
Dec 2, 2015
Messages
730
I'm looking for advice on adding a spare drive to my system.

I'm running FreeNAS 9.10-STABLE-201605240427, with a single RAIDZ2 pool with 5 x 4TB drives. The system is used for personal and business use. I need the FreeNAS system to keep running while I am one the road, as I use ownCloud for business purposes, and my wife uses Plex. When I originally set up the system, I expected that I would normally be availabble on short notice to replace a failed drive. My situation has changed recently, and I am now self-employed, travelling frequently, with trips up to three weeks long.

I'm considering adding a spare drive, so that I could replace a failed drive remotely if I am on the road (I use ssh tunneling to access the GUI and CLI when I am on the road). I've looked at the official docs, but a search for "spare" doens't turn up much of interest. Is there anything I should be aware of before I add a 4 TB spare drive to my FreeNAS system?

System specs:
  • Motherboard: SuperMicro X10SL7-F
  • CPU: Intel G3258
  • RAM: 16G Crucial CT2KIT102472BD160B/CT2CP102472BD160B
  • PSU: SeaSonic SSR-550RM
  • Boot USB flash drives:
    • San Disk Cruzer Fit Usb Flash Drive 16 GB
    • Kingston 16GB DT Microduo 3C
  • Hard drives: 5 x Western Digital Red 4 TB in RAIDZ2
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No. Works fine. The only kinda-downside is that your array is only Z2. Z2 plus a spare is kind of silly compared to just going Z3, but of course you're stuck at Z2 unless you dump and recreate the pool.

Do be aware that you might not get a chance to replace the drive. I've had spares in pools for a long time, and when zfsd appeared, one day it very eagerly replaced a fail-y drive that was developing. It's very possible the system will rebuild for you if you configure it as a spare in the pool.
 
Joined
Dec 2, 2015
Messages
730
No. Works fine. The only kinda-downside is that your array is only Z2. Z2 plus a spare is kind of silly compared to just going Z3, but of course you're stuck at Z2 unless you dump and recreate the pool.
No question, if I had known at the start that I would be travelling this much, I would have set up the pool with RAIDZ3 at the beginning. But, with no time machine at hand, I need to make the best with tools I have available.

Do be aware that you might not get a chance to replace the drive. I've had spares in pools for a long time, and when zfsd appeared, one day it very eagerly replaced a fail-y drive that was developing. It's very possible the system will rebuild for you if you configure it as a spare in the pool.
I'm not following you here. Are you saying that the system may decide on its own to use the spare drive to replace a failing drive? If so, I'm not sure that is a problem, as long as the drive was really failing.

Thanks for your advice.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No, you cannot borrow my time machine. Stop asking! :smile:

Yes, zfsd is intended to allow the system to automatically replace drives. It doesn't seem to always do so, however. You can prevent the behaviour by inserting the disk into your array, but not adding it as a spare to the pool.

How a system determines a drive is fail-y is of course an interesting issue. In practice it doesn't seem to be a major problem. The drive it elected to replace was in fact actively failing. I think the drive may have detached and that may have been the straw that did it.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Joined
Dec 2, 2015
Messages
730
Key points:
  1. Use Manual Setup mode.
  2. Choose to extend your existing volume.
  3. Choose spare for the disk you're adding.
  4. Be careful, because if you screw up you will end up with a singe-disk stripe and you will have to rebuild the whole pool to fix it.
See http://doc.freenas.org/9.3/freenas_storage.html#manual-setup
Thank you very much for the extremely useful info. This should be in the manual. How do I make a suggestion for material to add to the manual?

I've got the new drive now. Can I do burn-in testing with it mounted in the FreeNAS server, before doing the Manual Setup to expose it to FreeNAS?
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I've got the new drive now. Can I do burn-in testing with it mounted in the FreeNAS server, before doing the Manual Setup to expose it to FreeNAS?
You can, BUT be warned, the Badblocks method will destroy any data on the disk, so make darn sure
you chose the correct drive to perform the command on. You have a recently done a backup of your data
and your configuration, right?
 
Joined
Dec 2, 2015
Messages
730
I certainly agree that it would be much better to run badblocks with the new drive installed in a different computer, if possible. But, I don't have another computer that could accept that drive. I can't justify purchasing a new computer to dedicate to the rare occasions when I need to test a new hard drive. So it is a question of do badblocks in the FreeNAS system, or don't do badblocks at all.

I refreshed both my backups, backed up the config file again, confirmed the /dev/daX address for the new drive by checking drive serial numbers in dmesg, then started badblocks. It has been grinding away since yesterday evening, with no reported errors yet.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
It's just to avoid human error, if you make sure you execute badblocks on the right drive there's no problem ;)
 
Status
Not open for further replies.
Top