stratisd icon indicating copy to clipboard operation
stratisd copied to clipboard

Make static header updates more robust

Open jbaublitz opened this issue 3 years ago • 2 comments
trafficstars

Related to #3035 Related to https://github.com/stratis-storage/project/issues/50

We should handle some sort of failure recovery when the static header (previously unchangeable) changes due to the underlying device size changing like in the RAID case. In these situations, it is possible for the first header write to succeed and the second header write to fail, leaving the headers in "correct" (according to the CRC) but disagreeing states

Potential options:

  1. Rollback using temporary files and back up functionality
  2. Rollback using an in-memory solution to cache the old header and try to restore it if the second write fails
  3. Special case set up
  4. Use some of our unused static header space to add in a "last updated" field; this is likely the most generalized (and potentially correct) solution, particularly if we add more fields to the static header that are able to change

jbaublitz avatar Sep 12 '22 15:09 jbaublitz

Currently, I think we're tending towards extending the static header with a timestamp of "last updated".

jbaublitz avatar Sep 22 '22 14:09 jbaublitz

We should potentially put this in the same release as #3274

jbaublitz avatar Mar 09 '23 20:03 jbaublitz