Skip to end of metadata
Go to start of metadata

Introduction

The Persistence Health Monitor (PHM) is responsible to react on persistence failure of any kind. It covers every failure that prevents persistence to work properly beginning form corrupt file system parition to corrupt database file.

The Concept

The Persistence Healt Monitor is a deamon listening to dbus messages send by e.g. systemd services and reacts on failures related to persistence.

Mount issues

As systemd will be used to startup the system including mounting of the file system partition, the PHM needs to interact with systemd. In the mount file, we use the Option OnFailure to set a recovery unit which is activated when a failure state will be entered.

 

  • Example unit file for the cached data partition data-mnt_c.mount:
[Unit]
Description=mount data-mnt_c
OnFailure=PersistenceRecovery.service
Conflicts=umount.target
 
[Mount]
What=/dev/sdc1
Where=/data/mnt_c
Type=ext
Options=someOptions

 

  • Example unit file for the write through data partition data-mnt_wt.mount:
[Unit]
Description=mount data-mnt_wt
OnFailure=PersistenceRecovery.service
Conflicts=umount.target
 
[Mount]
What=/dev/sdb1
Where=/data/mnt_wt
Type=ext
Options=someOptions

 

  • Example unit file for recovery service PersistenceRecovery.service:
[Unit]
# send failure nootification to Persistence Healt Monitor
Description= Persistence recovery
Requires=dbus.socket
After=dbus.socket
 
[Service]
ExecStart=-/bin/dbus-send --system --print-reply --type=method_call ...
Type=oneshot
RemainAfterExit=false
 

Copied from MediaWiki
Last Edit: 13:50, 18 August 2014‎ Ingo.Huerner

  • No labels