Rebooting a system
To prevent unplanned downtime, it's crucial to take specific precautions before initiating a reboot. The method followed to reboot a system can significantly impact whether the process is successful.
Practice
Considerations before rebooting a system.
1. Active Users
Minimise disruption for logged in users by notifying them about the reboot.
- Use the who
or w
commands to see a list of logged-in users.
- Send a message to all logged in users, warning them of the impending reboot.
2. Open Files
Confirm that all important files have been saved and that no processes are writing data to the disk. - Force all data in the buffer to be written to the disk.
3. Mounted filesystems
Mount failures at boot time can prevent the system from fully booting up. Check that all mounts can be mounted successfully before rebooting the system.
- List all currently mounted filesystems.
- Verify that all mounts in
/etc/fstab
can be mounted successfully.
4. Scheduled jobs
Rebooting in the middle of a backup or maintenance job can result in an incomplete state. Check the scheduling of jobs and schedule the reboot accordingly.
- List currently scheduled jobs.