I've experienced some problems in the past days. My root partition was randomly remounting ro
(read-only) when some ext4 errors were detected.
I've got another HDD mounted at /mnt/files
and everything under this directory is synced using Nextcloud.
When the root filesystem remounted read-only, Nextcloud started randomly deleting my data. This is not a problem as I can always restore the files from the trashbin on my server. The restore process takes a long time, so I wanted to kill Nextcloud immediately when the root filesystem remounts, to prevent further data loss.
Is it possible to run killall nextcloud
when it remounts ro
?
Anyway, I booted a live CD and fixed all the detected errors so it shouldn't happen again, but I want to be sure it doesn't affect my data again.