-2

iam using ssd for caching other disks ( flashcache module ) if a power failure happened write operations will just stop suddenly and lead to bad sector due to incomplete cache back to devices ( sata disks ) so is there is a way to continue get cache from ssd to devices ( disks ) after server startup, as the cache already stored on ssd?

Many thanks in advance

user205537
  • 59
  • 1
  • 7
  • Can you clarify what your actual question is? – sciurus Jan 15 '14 at 00:38
  • hi iam using ssd for caching other disks ( flashcache module ) if a power failure happened write operations will just stop suddenly and lead to bad sector due to incomplete cache back to devices ( sata disks ) so is there is a way to continue get cache from ssd to devices ( disks ) thanks – user205537 Jan 15 '14 at 01:04
  • That is not how bad sectors happen. That is a physical problem, not a data problem. – Falcon Momot Jan 15 '14 at 01:51
  • hi falcon power failure would make some bad sector if is there sensitive io running please read this http://www.howtogeek.com/173463/bad-sectors-explained-why-hard-drives-get-bad-sectors-and-what-you-can-do-about-it/ – user205537 Jan 15 '14 at 01:59

3 Answers3

1

You need to protect your site/facility power first. Please use an appropriately-sized UPS with enough run time.

Beyond that, I'm an advocate of quality SSDs. You want to use a good SSD with a super-capacitor onboard to protect in-flight data.

If you're asking about general cache persistence, that's another topic.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • hi iam using ssd for caching other disks ( flashcache module ) if a power failure happened write operations will just stop suddenly and lead to bad sector due to incomplete cache back to devices ( sata disks ) so is there is a way to continue get cache from ssd to devices ( disks ) thanks – user205537 Jan 15 '14 at 01:01
  • @user205537 Protect your server with a battery backup unit. Talking about other situations without taking this basic step is not reasonable. – ewwhite Jan 15 '14 at 02:25
1

According to the documentation:

It is important to note that in the first cut, cache writes are
non-atomic, ie, the "Torn Page Problem" exists. In the event of a
power failure or a failed write, part of the block could be written,
resulting in a partial write. We have ideas on how to fix this and
provide atomic cache writes (see the Futures section).

So it sounds like flashcache can't do what you want.

sciurus
  • 12,493
  • 2
  • 30
  • 49
  • Sadly this is the true flashcache can't do that :D i got it before i opened this topic but i thought there is might be an solution. – user205537 Jan 15 '14 at 01:47
1

Actually after testing flashcache using write-back cache method i were able to continue getting already stored cache on ssd back to cached disks after power failure or a crash normally using flashcache_load. It looks like the official documentation is outdated.

user205537
  • 59
  • 1
  • 7