Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| omv7:omv7_plugins:snapraid [2026/08/18 13:41] – initial version. Still missing screenshot and formatting adjustments auanasgheps | omv7:omv7_plugins:snapraid [2026/08/18 13:42] (current) – old revision restored (2025/01/18 14:05) auanasgheps | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== SnapRAID | + | {{indexmenu_n> |
| + | \\ | ||
| + | < | ||
| + | Remark: Given the similar setup, this doc contains numerous reused screen shots from the OMV6 version of this doc. | ||
| + | ---></ | ||
| + | ---- | ||
| + | \\ | ||
| + | < | ||
| + | \\ | ||
| + | {{ : | ||
| + | |||
| + | ====== SnapRAID | ||
| + | \\ | ||
| + | \\ | ||
| ===== Summary ===== | ===== Summary ===== | ||
| - | SnapRAID | + | SnapRAID is a backup program for JBOD disk arrays. SnapRAID stores data parity information which enables the recovery of disk failures. SnapRAID is targeted toward home media centers, with a lot of large files that rarely change. |
| - | [[https://github.com/auanasgheps/snapraid-aio-script|snapraid-aio-script]] | + | |
| - | around your SnapRAID | + | Beside |
| - | one or more arrays independently from the OMV web interface, with support | + | * All data is hashed to ensure data integrity and to avoid silent corruption. |
| - | for email, Apprise, and Healthchecks.io notifications, Docker container | + | * If failed disks are too many to allow a recovery, only the data on the failed disks is lost. All data on the remainder of disks is safe. |
| - | management, sync/scrub thresholds, | + | * If files are accidentally deleted, they can be recovered. |
| + | * SnapRAID can be used with disks that already filled. | ||
| + | * The disks of the array can be different sizes. | ||
| + | * Data disks can be added at any time. | ||
| + | * SnapRAID can be removed at any time without the need to reformat or move data. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Third Party Software Note ==== | ||
| + | |||
| + | While this OMV plugin makes the SnapRAID package easy to integrate into openmediavault, | ||
| + | |||
| + | ===== Prerequisites ===== | ||
| + | |||
| + | * [[https:// | ||
| + | * An additional (dedicated) drive is required to store SnapRAID | ||
| + | * For reports on drive health | ||
| + | * Enabling -> [[https:// | ||
| + | * Consider testing the server' | ||
| + | |||
| + | |||
| + | |||
| + | ===== How SnapRAID Works ===== | ||
| + | |||
| + | To explain how SnapRAID works, a comparison to RAID5 may be helpfull.\\ | ||
| + | ---- | ||
| + | \\ | ||
| + | |||
| + | < | ||
| + | |||
| + | SnapRAID is in between RAID and a Backup program, trying to get the best benefits of both. | ||
| + | \\ | ||
| + | **Features**: | ||
| + | * Can protect the contents of multiple disks. | ||
| + | * Filesystem types are irrelevant but simple filesystems, like EXT4, are recommended. | ||
| + | * Calculates file parity information on demand. | ||
| + | * Different sized disks can be protected without losing storage space. | ||
| + | * Can reconstruct a failed hard drive. | ||
| + | * Can restore deleted files. | ||
| + | * Uses a check summing hash that protects against silent corruption (bit-rot), with the ability to reconstruct corrupted files. | ||
| + | * A disk can be added or removed at any time. | ||
| + | * Can be removed at any time without the need to recover or move data. | ||
| + | |||
| + | |||
| + | {{ : | ||
| + | |||
| + | ---- | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | Traditional RAID5 stripes data and interleaves parity information across multiple drives.\\ | ||
| + | \\ | ||
| + | **Features**: | ||
| + | * Can aggregate a collection of disks into a pool that appears, to the OS, to be a single drive. | ||
| + | * Can use dissimilar sized disks (software RAID) but the array total will limit larger disks to the smallest disk's size. (Hardware RAID may require identical disks.) | ||
| + | * Calculates parity on the fly. | ||
| + | * An array can operate with one member disk disabled. | ||
| + | * Can reconstruct a failed hard drive. | ||
| + | * Provides a parallel I/O speed boost. | ||
| + | |||
| + | {{ :: | ||
| + | |||
| + | |||
| + | |||
| + | ===== Installation ===== | ||
| - | This plugin | + | In OMV7's GUI:\\ |
| - | plugin to be installed first. That plugin provides the SnapRAID binary | + | Under **System**, **Plugins**, |
| - | the array configuration that this plugin reads. | + | \\ |
| - | SnapRAID AIO is a **full replacement for the built-in diff script** included | + | ===== Initial Configuration ===== |
| - | in the openmediavault-snapraid plugin. It covers everything the diff script | + | \\ |
| - | does (sync, scrub, notifications) and adds significantly more control. | + | < |
| + | \\ | ||
| + | ---- | ||
| + | Under **Services**, **SnapRAID**, | ||
| + | In the **Name** field, specify a name for the new array and **Save**.\\ | ||
| + | \\ | ||
| + | {{ : | ||
| + | \\ | ||
| + | \\ | ||
| < | < | ||
| < | < | ||
| Line 28: | Line 114: | ||
| <tr> | <tr> | ||
| <td style=" | <td style=" | ||
| - | If you are currently using the built-in diff script, disable its schedule | + | Naming a SnapRAID array is a new feature in OMV7 which allows for the creation of independent arrays. |
| - | before enabling | + | |
| - | same time will cause conflicts. | + | |
| </tr> | </tr> | ||
| </ | </ | ||
| Line 36: | Line 120: | ||
| </ | </ | ||
| - | > SnapRAID AIO is third-party software. For questions about the underlying | + | ---- |
| - | > script, see the [[https:// | + | |
| - | ===== Prerequisites ===== | ||
| - | * **openmediavault-snapraid** installed and at least one array configured. | + | < |
| - | * **omv-extras** installed (required to install this plugin). | + | \\ |
| - | * Email notifications configured under //System → Notification// if you want email alerts. | + | |
| - | * For disk spindown: **hd-idle** installed manually. | + | |
| - | * For Docker management: Docker running on the same host. | + | |
| - | * For Apprise notifications: | + | |
| - | ===== Installation ===== | + | \\ |
| + | Under **Services**, | ||
| + | \\ | ||
| + | In the **Array** field: Select the name of the previously created array.\\ | ||
| + | In the **Drive** field: | ||
| + | In the drive **Name** field: | ||
| + | **Check the boxes** for **Content** and **Data**\\ | ||
| + | \\ | ||
| + | {{ : | ||
| - | - Navigate | + | \\ |
| - | - Search for **snapraid-aio**. | + | < |
| - | - Click **Install**. | + | \\ |
| + | < | ||
| + | \\ | ||
| + | < | ||
| + | < | ||
| + | | ||
| + | < | ||
| + | <td colspan=" | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <td style=" | ||
| + | Since at least one good copy of the Content File is required for a full drive restoration, | ||
| + | </tr> | ||
| + | | ||
| + | </ | ||
| + | </ | ||
| + | \\ | ||
| + | ---- | ||
| + | \\ | ||
| + | < | ||
| - | > [SCREENSHOT: | + | \\ |
| + | Again, the parity disk must be the same size, or larger, than the largest drive in the collection of disks to be protected. | ||
| - | ===== Quick Start ===== | + | In the **Array** field: Select the name of the previously created array. |
| + | In the **Drive** field: | ||
| + | In the **Name** field: | ||
| + | **Check the box** for **Parity**.\\ | ||
| - | After installation a new entry **SnapRAID AIO** appears in the **Services** menu. | ||
| - | The recommended workflow for a new array: | + | {{ :: |
| - | + | \\ | |
| - | - In the SnapRAID | + | < |
| - | - Run an initial **sync** from the SnapRAID plugin so the parity is established. | + | \\ |
| - | - Open **Services → SnapRAID | + | < |
| - | - Click **Create** and select your array. | + | < |
| - | - Configure notifications, | + | |
| - | | + | < |
| + | <td colspan=" | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <td style=" | ||
| + | Split Parity is a new SnapRAID | ||
| + | - While the rule, "< | ||
| + | - New users should note that split parity is an advanced feature that increases admin complexity. Split parity configurations are not recommended for users who are not familiar with SnapRAID. | ||
| + | </ | ||
| + | | ||
| + | </ | ||
| + | </ | ||
| < | < | ||
| Line 79: | Line 202: | ||
| <tr> | <tr> | ||
| <td style=" | <td style=" | ||
| - | Always run an initial sync from the SnapRAID | + | < |
| - | The AIO script expects parity | + | |
| </tr> | </tr> | ||
| </ | </ | ||
| </ | </ | ||
| </ | </ | ||
| + | ---- | ||
| + | \\ | ||
| + | < | ||
| + | \\ | ||
| - | ===== Config List ===== | + | {{ :: |
| + | \\ | ||
| + | ---- | ||
| - | The main view shows a table of all AIO configurations. | + | ===== SnapRAID Initialization ===== |
| - | > [SCREENSHOT: | + | The functions of SnapRAID |
| + | \\ | ||
| + | Under **Services**, | ||
| + | A window will pop up that will show the progress of the **Sync** operation.\\ | ||
| + | \\ | ||
| + | Note, during the very first Sync, a warning may be in the window " | ||
| + | \\ | ||
| + | Depending on the amount of data, the Sync operation may take considerable time. When the Sync is done, all files on protected disks will be logged into content files along with their checksums, timestamps, parity data and other information. | ||
| + | \\ | ||
| + | The remainder of the tools, under the tools icon, can be used for manual operations within the GUI. Some of these tools are discussed in manual operations. | ||
| - | ^ Column ^ Description ^ | + | {{ ::omv6-plugins-snapraid-05-02.jpg? |
| - | | Array | Human-readable name of the SnapRAID array | | + | ===== SnapRAID |
| - | | Scheduled | Check mark if an automated schedule is configured | | + | |
| - | | Last Run | Timestamp and outcome of the last script execution (OK / WARNING / Started) | | + | |
| - | | Config File | Path to the underlying | + | |
| - | ==== Toolbar Actions ==== | + | There are two methods of SnapRAID Administration and maintenance; |
| - | ^ Action ^ Description ^ | + | ==== Basic Order of Operations ==== |
| - | | **Create** | Add a new AIO configuration | | + | |
| - | | **Edit** | Modify the selected configuration | | + | |
| - | | **Schedule** | Configure or change the cron schedule for this configuration | | + | |
| - | | **Delete** | Remove the configuration, | + | |
| - | ==== Tools Menu ==== | + | The basic order of SnapRAID maintenance operations is; **Diff**, **Sync** and **Scrub**. \\ |
| + | \\ | ||
| + | ---- | ||
| + | === Diff === | ||
| + | \\ | ||
| + | The **Diff** plugin tool is found under **Services**, | ||
| + | (The CLI command is '' | ||
| + | \\ | ||
| + | **Diff** (short for " | ||
| + | \\ | ||
| + | \\ | ||
| + | In accordance with the above, it's important to determine the following: | ||
| + | - **Were there excessive deletes? | ||
| + | In normal data operations a hand full of user deletes are expected. | ||
| + | - **Were there an excessive number of updated or modified files? | ||
| + | In most cases, administrators will have a rough idea of what is normal for updated or modified files. | ||
| + | \\ | ||
| + | In either case, if there are excessive deletes or an excessive number of updated / modified files, **Diff** settings within this plugin can be used to __stop__ an automated sync operation, allowing for the recovery of deleted or modified files. | ||
| + | \\ | ||
| - | Each row has a **Tools** submenu with the following actions: | + | < |
| - | ^ Tool ^ Description ^ | + | {{ :: |
| - | | **Run Now** | Execute the AIO script immediately for this array | | + | \\ |
| - | | **Force Sync** | Run the AIO script bypassing delete and update thresholds (use with caution) | | + | ---- |
| - | | **Sync** | Run a raw `snapraid sync` — useful after initial array setup before the first AIO run | | + | |
| - | | **Last Log** | Display the most recent log file produced by this array' | + | |
| - | > [SCREENSHOT: | ||
| - | ===== Configuration Form ===== | + | === Sync === |
| - | The configuration form is divided into several sections. | + | The **Sync** plugin tool is found under **Services**, |
| + | (The CLI command is '' | ||
| - | > [SCREENSHOT: | + | After the initial sync, subsequent sync operations log only new or changed file information into content file(s). Sync also creates new checksums and updates parity information for the same files. |
| - | ==== Array Selection ==== | + | **Sync considerations**: |
| + | * It's important to note that when checksums and parity information are updated for changed files, it won't be possible to restore files or folders to their previous state. | ||
| + | * When Sync is running, avoid adding or deleting files during the process. | ||
| + | * If automation is used, schedule Sync operations for after hours periods where changing or adding files is unlikely to occur. | ||
| - | The top of the form contains a single required field: | + | ---- |
| - | * **SnapRAID array** — select the array this configuration applies to. Each array can have only one AIO configuration. The dropdown is populated from arrays defined in the SnapRAID plugin. | ||
| - | ==== Email Notifications ==== | + | === Scrub === |
| - | > [SCREENSHOT: Email Notifications section showing toggle and greyed-out sender/receiver fields] | + | The **Scrub** plugin tool is found under **Services**, |
| + | (The CLI command is '' | ||
| + | \\ | ||
| + | Scrub uses file information and their checksums, to check for the presence and health of files and to detect bad blocks.\\ | ||
| + | \\ | ||
| + | < | ||
| - | * **Enable email notifications** — sends a report email after each run using OMV's configured notification address (//System → Notification// | + | {{ ::omv6-plugins-snapraid-09.jpg? |
| + | ---- | ||
| - | ==== Healthchecks.io ==== | + | If bad blocks are found, during the Scrub, SnapRAID **status** will list them. (In the GUI, **SnapRAID status** is found under **Services**, |
| - | * **Enable Healthchecks.io** — reports script completion or failure to a [[https:// | + | {{ :: |
| - | * **Healthchecks UUID** — the UUID portion of your ping URL (not the full URL). | + | \\ |
| - | * **Healthchecks URL** — override for self-hosted instances. Must end with a trailing slash. Defaults to `https://hc-ping.com/`. | + | The **Fix** command, executed on the command line, will repair bad blocks.\\ |
| + | Use '' | ||
| + | Then use '' | ||
| - | ==== Apprise Notifications ==== | + | ---- |
| - | [[https:// | ||
| - | < | + | === Fix === |
| - | < | + | The **Fix** plugin tool is found under **Services**, |
| - | <table width=" | + | (The CLI command is '' |
| - | < | + | \\ |
| - | <td colspan=" | + | If files are missing, that were not intentionally deleted, use the **Fix** tool to recover them. |
| - | < | + | \\ |
| - | </ | + | {{ ::omv6-plugins-snapraid-08.jpg? |
| - | </ | + | \\ |
| - | < | + | If using the plugin' |
| - | < | + | For guidance on using the **Fix** command more selectively on the command line, on a "per file" basis, see the -> [[https:// |
| - | Apprise | + | \\ |
| - | </tr> | + | \\ |
| - | </ | + | === Summary === |
| - | </ | + | |
| - | </ | + | |
| - | > [SCREENSHOT: | + | * **Diff** checks for the number of added, deleted, changed |
| + | * **Sync** adds new files to content file(s), assigns checksums to new files and resets checksums to existing but changed files. | ||
| + | * **Scrub** checks for parity errors and bad blocks. | ||
| + | \\ | ||
| + | ---- | ||
| + | ===== Automation ===== | ||
| - | | + | Automation of SnapRAID housekeeping is done with what is known as a "**Diff Script**".\\ |
| - | * **Apprise URLs** — one or more service URLs in Apprise format (e.g. `tgram:// | + | \\ |
| - | * **Attach report on warnings** — attaches | + | In a Diff script, the first command |
| - | * **Test Apprise** button — sends a test notification immediately using the saved URLs. Only available after saving | + | The second command, **Sync**, catalogues new files and assigns checksums and creates parity information for them. **Sync** also updates checksums and parity information for changed files.\\ |
| + | Finally | ||
| + | \\ | ||
| + | This plugin provides | ||
| + | \\ | ||
| - | ==== Apprise Email ==== | ||
| - | Apprise can also send email directly via SMTP or provider-specific URLs, independently of OMV's built-in notification system. | ||
| - | | + | ==== Diff Script Setup ==== |
| - | * **Apprise Email URL** — SMTP or provider URL in Apprise format (e.g. `mailtos://user:pass@smtp.example.com`). | + | \\ |
| - | * **Attach report | + | Under, |
| - | * **Test Apprise email** button — sends a test email using the configured URL. | + | \\ |
| + | < | ||
| + | \\ | ||
| + | {{ ::omv6-plugins-snapraid-10.jpg? | ||
| + | \\ | ||
| + | **1**. For most users, the defaults | ||
| + | **2**. | ||
| + | **3**. **Run Scrub** | ||
| + | **4**. | ||
| + | **5**. | ||
| + | - When Scrub Frequency is specified, (in this instance " | ||
| + | - When Scrub Percentage is specified, (in this instance " | ||
| + | \\ | ||
| + | With a scrub percentage of 25, with scrubs scheduled to run once a week, the entire array will be scrubbed once a month. | ||
| + | \\ | ||
| + | **6**. The **Update Threshold** and **Delete Threshold** are parameters for the Diff script. | ||
| + | * **Update Threshold** sets the upper limit allowed for new files and updated / altered files. | ||
| + | * **Delete Threshold** sets the upper limit for allowed file deletes. | ||
| + | If either of the above thresholds are exceeded, | ||
| + | (As noted in the GUI, if these thresholds are set to **0**, Sync and Scrub will be performed regardless.) | ||
| + | \\ | ||
| + | < | ||
| + | \\ | ||
| + | \\ | ||
| + | ---- | ||
| + | | ||
| - | ==== Custom Notification Hook (Legacy) ==== | + | \\ |
| + | === Scheduling the Diff Script | ||
| - | | + | In the screen shown above, click on **Schedule Diff**. The **Scheduled Diff** window will appear |
| - | ==== Sync Thresholds ==== | + | This example is configured as follows: |
| + | * The **Enabled** box is checked. | ||
| + | **Under Time of execution**: | ||
| + | * As shown in **Minute** and **Hour**, the Diff Script will start at **01: | ||
| + | * In this case, under **Day of the week**, jobs are run only on **Sunday**. | ||
| + | * Check the **Send command output via email**. | ||
| + | * Finally, click the **Save** button. | ||
| - | Thresholds prevent accidental mass deletions or updates from being synced to parity. The script aborts and issues a warning when a threshold is exceeded, unless the warning count reaches | + | {{ : |
| + | \\ | ||
| + | < | ||
| + | < | ||
| - | > [SCREENSHOT: | + | \\ |
| + | ---- | ||
| - | * **Delete threshold** — abort sync if more than N files were deleted since the last run. Set to `0` to disable. Default: 500. | ||
| - | * **Update threshold** — abort sync if more than N files were updated since the last run. Set to `0` to disable. Default: 500. | ||
| - | * **Add/ | ||
| - | * **Sync warning threshold** — how many times a threshold warning fires before the sync is forced anyway. `0` = always force sync past thresholds. `-1` = never force (always require manual override). Default: -1. | ||
| - | ==== Scrub Settings ==== | ||
| - | SnapRAID scrub verifies stored parity data against your files to detect silent bit-rot. | + | === Diff Script Considerations === |
| - | * **Scrub percentage** — percentage of the array to verify per run. Lower values spread verification over many runs. Default: 5%. | + | A consideration, |
| - | * **Scrub age (days)** — only scrub blocks that have not been verified within the last N days. Default: 10. | + | \\ |
| - | * **Scrub | + | When it comes to speed of operations, in most use cases, |
| - | | + | \\ |
| + | \\ | ||
| - | ==== SnapRAID Options ==== | ||
| - | > [SCREENSHOT: SnapRAID | + | ===== Notes ===== |
| + | * Docker Containers that are stored on data drives should be paused or stopped during a sync. Otherwise Sync errors may result. | ||
| + | * It is recommended that SnapRAID' | ||
| + | * For a better understanding of the SnapRAID works and it's features, reading the -> [[https:// | ||
| + | \\ | ||
| + | \\ | ||
| - | * **Pre-hash data** — read data twice before syncing to detect silent read errors before they reach parity. Recommended. Default: enabled. | ||
| - | * **Sync zero-sized files** — SnapRAID skips empty files by default; enable this to include them. | ||
| - | * **Spin down disks when done** — spin down drives after the script completes using `hd-idle`. Requires hd-idle to be installed separately. | ||
| - | < | ||
| - | < | ||
| - | <table width=" | ||
| - | <tr> | ||
| - | <td colspan=" | ||
| - | < | ||
| - | </td> | ||
| - | </tr> | ||
| - | <tr> | ||
| - | <td style=" | ||
| - | Disk spindown requires **hd-idle** to be installed on the system. It is not installed automatically — install it via //System → Plugins// or manually before enabling this option. Without it, the setting has no effect. | ||
| - | </tr> | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | * **Verbose output in notification** — include full SnapRAID command output in notification messages. Not recommended for large arrays — produces very large messages. | ||
| - | * **Log retention (days)** — delete log files older than N days. `0` = keep forever. | ||
| - | * **SnapRAID log directory** — directory where per-run log files (`SnapRAID-*.txt`) are written. Leave empty to use `/root`. Also used by the **Last Log** tool action. | ||
| - | * **Log SMART data** — include SMART drive health data in the run log. Default: enabled. | ||
| - | * **Include SMART data in notification** — include SMART output in notification messages. | ||
| - | * **Log SnapRAID status** — run `snapraid status` and include the output in the log. | ||
| - | * **Include status in notification** — include the status output in notification messages. | ||
| - | * **Ignore pattern** — space-separated glob patterns to exclude from diff counts only (files matching these patterns are not counted against the delete/ | ||
| - | ==== Docker and Service Management ==== | ||
| - | > [SCREENSHOT: | + | ==== Other Useful Command Line Tools ==== |
| + | '' | ||
| + | If files are detected | ||
| + | \\ | ||
| + | '' | ||
| + | If parity issues with the parity drive are persistent | ||
| - | When enabled, the script pauses or stops your Docker containers before running SnapRAID operations and restores them afterward, preventing open-file conflicts. | + | ---- |
| - | * **Manage Docker containers / services** — master toggle for Docker management. | ||
| - | * **Docker mode** — `Pause/ | ||
| - | * **Docker containers** — select which containers to manage. The list is populated from currently running containers. | ||
| - | * **Service start delay (seconds)** — seconds to wait after restarting services before the script continues. | ||
| - | ==== Custom Hooks ==== | + | \\ |
| + | \\ | ||
| + | {{ : | ||
| + | ===== Recovery Operations ===== | ||
| - | Custom hooks let you run arbitrary shell commands or scripts before and after the SnapRAID | + | Recovery operation examples for single files, missing files, etc., are provided in the -> [[https:// |
| - | * **Enable custom hooks** — master toggle. | + | ==== Recovering a Failed Drive ==== |
| - | * **Before hook name** — display name shown in the log output. | + | |
| - | * **Before hook command** — shell command or script path executed before SnapRAID runs. Runs as root. | + | |
| - | * **After hook name** — display name shown in the log output. | + | |
| - | * **After hook command** — shell command or script path executed after SnapRAID completes. Runs as root. | + | |
| - | * **Execute after hook before spindown** — when disk spindown is enabled, run the after hook before spinning down the disks instead of after. | + | |
| - | ===== Scheduling ===== | + | === General |
| - | Each configuration | + | One of the more desirable features of SnapRAID is it's ability to restore data to a replacement drive. |
| + | \\ | ||
| + | Contrary to popular belief, spinning drives rarely fail "all at once" as if turning off a light switch off. In many cases, drives will begin to reallocate sectors among other symptoms that indicate that they are beginning to fail. If these symptoms are ignored, the drive may begin to corrupt data that is stored on it or written to it.\\ | ||
| + | \\ | ||
| + | Configuring -> [[https:// | ||
| + | \\ | ||
| + | When it has been determined that a drive is beginning | ||
| + | \\ | ||
| + | \\ | ||
| + | === Prepare for Drive Replacement === | ||
| + | |||
| + | Replacing a failing or failed drive, requires a number of preliminary steps: | ||
| - | > [SCREENSHOT: | + | * First it's crucial that the **Diff script**, if automated, is turned **OFF**. |
| + | * Do not run a **Snyc** operation until after the replacement is completed. | ||
| + | * If user / admins have automated processes (downloaders, | ||
| + | * Server users should be informed to not use the server during the drive replacement. | ||
| - | ^ Field ^ Description ^ | ||
| - | | Enable | Enable or disable this schedule without deleting it | | ||
| - | | Time of execution | Preset intervals (Hourly, Daily, Weekly, etc.) or Custom for full cron control | | ||
| - | | Minute / Hour / Day of month / Month / Day of week | Active when Time of execution is set to Custom | | ||
| - | | Send email on completion | OMV-level cron email (separate from AIO script notifications) | | ||
| - | | Comment | Label shown in the OMV cron list; auto-filled with the array name | | ||
| - | The cron job runs as root and calls: | + | ---- |
| - | < | + | |
| - | / | + | |
| - | </ | + | |
| - | ===== Notes ===== | + | === Failure Scenario |
| + | \\ | ||
| + | In the following scenario, a SnapRAID protected drive has failed completely.\\ | ||
| + | \\ | ||
| + | When server notifications are -> [[https:// | ||
| + | \\ | ||
| + | {{ :: | ||
| - | ==== Log Files ==== | + | ---- |
| - | Each script run produces | + | < |
| - | ==== Per-Array State Files ==== | + | \\ |
| - | The plugin stores two counter files per configuration in `/var/lib/snapraidaio/`: | + | {{ : |
| + | \\ | ||
| + | ---- | ||
| + | < | ||
| + | < | ||
| + | \\ | ||
| + | {{ : | ||
| + | ---- | ||
| - | * `<uuid>.warnCount` — tracks how many consecutive threshold warnings have fired, used against | + | <html>< |
| - | * `<uuid>.scrubCount` — tracks run count for the Scrub every N runs feature. | + | <html>< |
| + | < | ||
| - | These files are removed when the configuration is deleted. | ||
| - | ==== hd-idle ==== | + | {{ : |
| - | See the note in the [[#snapraid_options|SnapRAID Options]] section. Disk spindown requires `hd-idle` | + | < |
| + | ---- | ||
| + | |||
| + | Under **Storage**, | ||
| + | |||
| + | Click the " | ||
| + | In this example case, the file system selected from the pop-down will be **EXT4**.\\ | ||
| + | In the **Device *** pop-down, **/ | ||
| + | Click the **Save** button. | ||
| + | |||
| + | |||
| + | {{ : | ||
| + | |||
| + | < | ||
| + | ---- | ||
| + | The following **Mount** window will be immediately presented.\\ | ||
| + | In the **File system *** field, click the pop-down **arrow** and select the previously formatted drive (**/ | ||
| + | \\ | ||
| + | |||
| + | |||
| + | {{ : | ||
| + | |||
| + | \\ | ||
| + | < | ||
| + | \\ | ||
| + | ---- | ||
| + | < | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | {{ : | ||
| + | |||
| + | ---- | ||
| + | |||
| + | < | ||
| + | Highlight each drive, one at a time, and click on the **Edit** icon {{: | ||
| + | \\ | ||
| + | |||
| + | {{ : | ||
| + | \\ | ||
| + | ---- | ||
| + | |||
| + | < | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ---- | ||
| + | |||
| + | < | ||
| + | < | ||
| + | \\ | ||
| + | {{ : | ||
| + | |||
| + | ---- | ||
| + | |||
| + | < | ||
| + | < | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | < | ||
| + | \\ | ||
| + | < | ||
| + | ---- | ||
| + | |||
| + | === Restore Data === | ||
| + | |||
| + | In the same window (**Services**, | ||
| + | |||
| + | Depending on the size and speed of the drive and the amount of data, the **Fix** command may run for several hours.\\ | ||
| + | When **END OF LINE** is displayed, the **Fix** operation is complete.\\ | ||
| + | \\ | ||
| + | < | ||
| + | \\ | ||
| + | {{ :: | ||
| + | \\ | ||
| + | < | ||
| + | |||
| + | ---- | ||
| + | |||
| + | Under, **Services**, | ||
| + | \\ | ||
| + | This concludes data restoration to a SnapRAID protected drive.\\ | ||
| + | **MergerFS users** skip see the section below titled; **Replacing a Failed Drive in MergerFS**.\\ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | The remainder of tasks, within OMV, would be to repointing **Shared Folders** and other services to the replacement drive. | ||
| + | \\ | ||
| + | When all references | ||
| + | \\ | ||
| + | Finally, re-enable all automated tasks (Diff script) enable SMB network sharing (if previously disabled) and inform users that shares are available.\\ | ||
| + | \\ | ||
| + | \\ | ||
| + | ---- | ||
| + | |||
| + | === Replacing a Failed Drive in MergerFS === | ||
| - | ==== Force Sync ==== | ||
| < | < | ||
| Line 305: | Line 587: | ||
| <tr> | <tr> | ||
| <td style=" | <td style=" | ||
| - | **Force Sync** bypasses all delete and update thresholds and syncs unconditionally. | + | Device names, dev/sda1, dev/sdb1, etc., may be reordered |
| - | Only use this when you are certain the changes | + | |
| - | planned deletion or reorganization). You will be asked to confirm before the action runs. | + | |
| </tr> | </tr> | ||
| </ | </ | ||
| </ | </ | ||
| </ | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | Add the **Mount Point** column:\\ | ||
| + | Under **Storage**, | ||
| + | \\ | ||
| + | {{ :: | ||
| + | \\ | ||
| + | ---- | ||
| + | \\ | ||
| + | The result now shows mount points by **UUID** (**U**niversally **U**nique **ID**entifier). | ||
| + | Note the "Copy and Paste" Icon{{: | ||
| - | ===== Troubleshooting ===== | + | {{ :: |
| + | \\ | ||
| + | < | ||
| + | < | ||
| + | \\ | ||
| + | < | ||
| + | < | ||
| + | \\ | ||
| + | **Note: | ||
| + | ---- | ||
| + | Under **Storage**, | ||
| - | ^ Symptom ^ Likely cause ^ Resolution ^ | + | {{ :: |
| - | | No arrays appear in the selector | SnapRAID plugin not installed or no arrays configured | Install openmediavault-snapraid | + | |
| - | | Last Run shows WARNING | Threshold exceeded, or SnapRAID reported an error | Check the run log via Tools → Last Log | | + | |
| - | | Apprise test fails | Apprise not yet installed, or URL incorrect | Verify the URL format against the Apprise documentation; | + | |
| - | | Schedule shows "not scheduled" | + | |
| - | | Docker containers not being managed | Wrong mode, or containers not running when config was saved | Refresh the container list by editing the config | + | |
| + | < | ||
| + | \\ | ||
| + | ---- | ||
| + | \\ | ||
| + | < | ||
| + | |||
| + | {{ :: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | Under **Storage**, | ||
| + | Finally, re-enable all automated tasks and enable network shares (if previously disabled.)\\ | ||
| + | \\ | ||
| + | This concludes adding a SnapRAID restored drive to a MergerFS array.\\ | ||
| + | \\ | ||
| + | \\ | ||
| ===== Source Code ===== | ===== Source Code ===== | ||
| - | * [[https:// | + | -> [[https:// |
| - | * [[https://github.com/auanasgheps/snapraid-aio-script|snapraid-aio-script on GitHub]] | + | |
| + | ===== A Closing Note ===== | ||
| + | |||
| + | We, who support the openmediavault project, hope you’ve found this guide to be useful and that you’ll find your openmediavault server to be efficient, easy to use, and enjoyable.\\ | ||
| + | \\ | ||
| + | If you found this plugin guide to be helpful, please consider a modest donation to support the hosting costs of this server.\\ | ||
| + | \\ | ||
| + | **OMV-Extras.org** | ||
| + | \\ | ||
| + | < | ||
| + | <form action=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <img alt="" | ||
| + | </ | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | **Venmo: ryecoaaron** \\ | ||
| + | |||