hazza n00b
Joined: 30 Dec 2002 Posts: 68 Location: Burton on Trent
|
Posted: Thu Nov 01, 2012 10:47 am Post subject: Re: ZFS pool with ssd cache and power-loss recovery |
|
|
zzaappp wrote: | Supposing I lose power before the SSD has finished committing to the HD's in the pool. What happens when power returns? |
Any journaled data that has made it into flash will be replayed correctly to the mechanical discs on a system restart.
From testing I've done, there's one scenario in which I lose data when running with an SSD cache disk and sync=standard, and that's when an SSD doesn't honour commits. In theory, if you have a battery-backed SSD, it can safely do so, but if the power outage exceeds the battery life (unlikely) or it's a non-battery-backed SSD that simply ignores commits (unbelievably, some firmware revisions of certain drives can do this!), if there's data in the SSD's DRAM buffer that hasn't been flushed to flash, that's when you get data loss as it's simply not there to be replayed upon restart.
If you're running dual power supplies with at least one of them UPS backed and the filesystem running sync=standard, it's highly unlikely that you'd get a utility power failure, a UPS failure and either a dishonoured commit or SSD supercap failure in the milliseconds-long window where there is unflushed data in SSD cache DRAM.
Hope that helps,
Harry |
|