0

When the main Linux partition becomes ro for some reason (errors), I am trying to use cron job to check and reboot (so that fsck can run and attempt a fix), but I see that even the cron may not run!

If, I detect that mount on / has become ro, what can I do to reliably reboot a Linux host?

-- Thanks

Ani
  • 32
  • 2
  • 13
  • 3
    As filesystem is in RO mode any method of reboot is safe. Even pull the power cord. – Romeo Ninov Sep 01 '23 at 13:18
  • That is not possible (the device does not have any operator closeby!) need to do it in some automated way – Ani Sep 01 '23 at 16:59
  • This site is for corporate systems. So your system is for example in datacenter so you can open service request to datacenter personnel to do it. Or your enterprise system have own service processor so you can login there from the interface power off/on the machine. – Romeo Ninov Sep 01 '23 at 17:11
  • thanks @RomeoNinov but my question is more to understand if I can use `cron` or any other mechanisms to take a remedial action – Ani Sep 02 '23 at 04:38
  • You can try command `reboot`. But if it not work I explain you how you should proceed. – Romeo Ninov Sep 02 '23 at 04:52
  • And reboot of course is not the answer to the problem: the cause (most probably hardware failure, or else, much more rare, kernel bug) has to be addressed, usually with money and new hardware. – A.B Sep 02 '23 at 14:27

0 Answers0