Details
-
Improvement
-
Resolution: Duplicate
-
Major
-
None
-
8.0
-
None
Description
Sometimes power outages happen and sometimes there's no UPS.
In the context of XCP-ng (and I'm quite sure it's the same in Citrix Hypervisor), this led, sometimes, to critical files being truncated. My assumption is that they were being written, in a destructive way (rewritten from scratch each time there's a change), and then the power outage happened, leaving the file in a half-written state. I will gladly accept other theories
We've seen at least one case where /etc/xensource-inventory did not contain more than 4 lines after the outage (see https://xcp-ng.org/forum/topic/2182/brand_console-error-on-boot-no-networking). I think I also remember a case where the XAPI database was truncated in a similar situation.
- Such writes to xensource-inventory and state.db should probably be more atomic to avoid that situation so that it never happens. I don't know what's the best technical approach.
- Local backups should probably be available for easier recovery. XAPI offers a function to backup the XAPI database and one to backup the host, but a local copy of xensource-inventory and the XAPI database would probably save time when bad things happen.
Is that proposal pertinent to you?