--- title: "Read-only filesystem automatic remount" slug: "read-only-filesystem-automatic-remount" updated: 2024-07-28T11:29:24Z published: 2024-07-28T11:29:24Z canonical: "docs.zesty.co/read-only-filesystem-automatic-remount" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zesty.co/llms.txt > Use this file to discover all available pages before exploring further. # Read-only filesystem automatic remount This topic describes the steps that the Zesty Disk Agent performs to automatically remount read-only filesystems on the instance. This remount flow enables automatic mitigation to decrease the impact of the incident. Alerts will still be created for read-only filesystems regardless of the automatic resolution. If the Agent (v6.5.2 or later) detects that a filesystem is read-only, a series of scripts are automatically run, both before and after the Agent attempts to remount the filesystem. Those scripts begin empty. You can customize them to meet the needs of your environment, as described in [Customize the remount scripts](/docs/read-only-filesystem-automatic-remount#_sdqf2dk3sva). ### Automatic remount flow If the Agent identified a filesystem is in read-only mode, it will perform the following actions: 1. Run the **/zesty/user_scripts/pre_remount.sh** script. 2. Try to remount 4 times. 3. Continue, according to the result of the remount attempts: - If the remount succeeded, run the **/zesty/user_scripts/post_remount.sh** script. - If none of the remounts succeeded, run the **/zesty/user_scripts/post_failed_remount.sh** script. The automatic remount process is complete. The following figure shows the process flow: ![](https://cdn.document360.io/0eb80240-664b-49f5-9181-5713ddf9f725/Images/Documentation/Read-only filesystem automatic remount flow.png) ### Customize the remount scripts The provided scripts are provided empty. You can customize these scripts, for example: - To stop services from accessing the filesystem while a remount is attempted, customize the **pre_remount** script. - To restart stopped services after a successful remount, customize the **post_remount** script. - To reboot the instance iIf the remount fails, customize the **post_failed_remount** script. All script files are executed using the command **“bash “**. When editing the script files, be sure to include **“#!/bin/bash”** header. ![](https://cdn.document360.io/0eb80240-664b-49f5-9181-5713ddf9f725/Images/Documentation/read-only-filesystem-automatic-remount-image-ukv3pouw.png)