Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs_in_draft:utilities_bckup_maint [2022/12/12 23:59] – [Cloning Flash Media] crashtest | docs_in_draft:utilities_bckup_maint [2022/12/13 03:22] (current) – removed crashtest | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
- | < | ||
- | < | ||
- | |||
- | |||
- | |||
- | {{ : | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | For the interim; users who are interested in maintenance processes, utilities, etc., for OMV6 can refer to the → <a href=" | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | {{ : | ||
- | |||
- | |||
- | < | ||
- | |||
- | {{ : | ||
- | |||
- | < | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | \\ | ||
- | |||
- | |||
- | ===== Introduction to Server Maintenance ===== | ||
- | |||
- | So you now have a working Openmediavault installation. | ||
- | For casual home users that may seem like all that's required and for | ||
- | a computer hobbyist, a working Linux server may be enough. | ||
- | installed on. \\ | ||
- | \\ | ||
- | On the other hand, PC hardware and hard drives fail faster than one might think. | ||
- | expand openmediavault with server add-on packages, etc. As users discover the value added packages available to expand capabilities, | ||
- | Linux servers tend to " | ||
- | may not be compatible with existing server packages. \\ | ||
- | \\ | ||
- | All of the above possibilities compound the risk of creating an unresolvable problem. | ||
- | possible events leaves an open question; "How do I recover?" | ||
- | |||
- | ==== Purpose ==== | ||
- | |||
- | The purpose and intent of this document is to provide home users and new Linux admin' | ||
- | and simple backup processes needed to support and successfully maintain a server. | ||
- | |||
- | While openmediavault is driven by an easy to use web page GUI, server maintenance is greatly | ||
- | facilitated if users know how to get on the command line. When asking for advice on the forum, forum supporters may ask for "the output of a command" | ||
- | A running assumption is that Openmediavault users will know how to get on the command line when necessary. | ||
- | |||
- | This document was written to introduce new users to useful utilities and to provide examples of maintenance concepts and relatively simple procedures. | ||
- | \\ | ||
- | {{ : | ||
- | ===== Utilities to Help With Openmediavault Management ===== | ||
- | |||
- | As previously noted, being able to work from the command line would be very useful to users, who may need to | ||
- | gather detailed information on the OS and platform hardware, for troubleshooting and | ||
- | for an occasional edit to a configuration file. Much can be learned with the following | ||
- | utilities that allow users to look at Openmediavault “under the hood”. \\ | ||
- | |||
- | |||
- | |||
- | |||
- | ==== WinSCP ==== | ||
- | |||
- | WinSCP allows users, beginners and experienced alike, to visualize the Linux file structure in a manner | ||
- | similar to Windows Explorer. | ||
- | users to work with their server remotely. \\ | ||
- | \\ | ||
- | One of the more useful features of WinSCP is that it gives users the ability to edit Linux configuration | ||
- | files with a familiar editor like Notepad. | ||
- | WinSCP, it will run from WINE (in Linux Mint, Ubuntu and others). | ||
- | |||
- | WinSCP can be downloaded here -> [[https:// | ||
- | |||
- | |||
- | === Installing WinSCP === | ||
- | |||
- | During the installation process, if prompted, select the **Explorer Interface**. | ||
- | file system only. If the Explorer Interface is not offered it can be selected after the installation, | ||
- | under View, **Preferences**, | ||
- | |||
- | ---- | ||
- | |||
- | == Open WINSCP == | ||
- | |||
- | < | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | |||
- | ---- | ||
- | \\ | ||
- | < | ||
- | |||
- | \\ | ||
- | - In **Host name**: | ||
- | - In **User name**: Enter **root**\\ | ||
- | - In **Password**: | ||
- | \\ | ||
- | - Optional: Clicking on **Save** will store the above data so that it's not required to enter the same information when logging in again.\\ | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | R-PI users would enter the user < | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | WinSCP opens with a two pane window. Selections are made in the left pane; operations are done on the right.\\ | ||
- | The folder **srv** was selected on the left. **dev-disk-by-label-uuid-xxxx** was highlighted on the right. A right click of the mouse brings up an operations menu. **Properties** was selected. In this particular popup, permissions could be changed. (Without backup, changing permissions is **NOT** a recommended action for beginners. [[https:// | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | In a similar manner, a configuration file can be highlighted in the right pane. A right click of the mouse, on a file or folder, brings up the menu. Select **EDIT**, from the menu and Windows notepad, or the internal editor can be used for editing configuration files. Beginners will find either choice to be easier than using nano or vi on the Linux command line. | ||
- | |||
- | **File and Folder Operations: | ||
- | While they can be done in WinSCP, very large file copies, moves, or deletes are best done using [[https:// | ||
- | |||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | When using the standard Linux file systems available in OMV, data drives are < | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ==== PuTTY ==== | ||
- | |||
- | PuTTY is similar to a Window’s command prompt, but it allows users to work on openmediavault’s command line from a remote PC. If PuTTY was not installed as part of your installation process, install it on a Windows PC. It’s available here. → [[https:// | ||
- | |||
- | Using PuTTY is as simple as typing in the server’s IP address in the **Host Name** field and clicking on open. There will be a warning for a first time connection – click **OK**. Then, login on the command line. | ||
- | |||
- | {{ :: | ||
- | \\ | ||
- | Login as **root** or, in the case of a Raspberry PI, as the admin user (typically **pi**). | ||
- | |||
- | ---- | ||
- | |||
- | ==== MC (Midnight Commander) ==== | ||
- | |||
- | Midnight Commander is a command line file utility that utilizes a very cleverly created graphical interface. It’s very useful for navigating through openmediavault’s directory structure. It excels in efficient copying, moving, and deleting folders and files.\\ | ||
- | \\ | ||
- | The installation process:\\ | ||
- | \\ | ||
- | * Use **PuTTY** to get to openmediavault’s command line. | ||
- | * Log in as '' | ||
- | * On the command line type the following; '' | ||
- | * When prompted continue with “'' | ||
- | \\ | ||
- | (R-PI users will log in as '' | ||
- | \\ | ||
- | When the installation finishes, on the command line, type '' | ||
- | \\ | ||
- | Midnight Command is a two pane window where the source is the left pane and the destination is the right pane. Copies and moves are done, left to right. Since it’s possible to navigate to any location on the openmediavault host, in either pane, the source and destination can be set for any location.\\ | ||
- | \\ | ||
- | A mouse works in MC. Click on the various menu items at the top and bottom, to select them. Similarly, files or folders can be selected by clicking on them. To level up, click on the ''/ | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | < | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | \\ | ||
- | Work with MC carefully and before doing anything extensive with it, the appropriate backups are recommended. [[https:// | ||
- | ---- | ||
- | |||
- | ==== USBImager ==== | ||
- | |||
- | [[https:// | ||
- | |||
- | Details for using USBimager are found in Operating System Backup , under [[https:// | ||
- | ---- | ||
- | ==== Virtual Box ==== | ||
- | |||
- | Virtual Box is a cross platform virtualization platform that will work with both servers and clients. For learning about openmediavault, | ||
- | |||
- | If users have a Windows client with at least 6GB RAM and plenty of hard disk space, installing Virtual Box on the client to host test VM’s of openmediavault is highly recommended. → [[https:// | ||
- | |||
- | {{ : | ||
- | |||
- | ===== Backups and Backup-strategy ===== | ||
- | |||
- | It’s important to understand the concept of backup and why backup is important. In understanding the concept of backup, an automotive analogy may be helpful.\\ | ||
- | \\ | ||
- | If one has a car and that car has a spare tire, is the “car” backed up? The answer is “No”. There are a great number of things that can happen to a car that can disable it, until parts are replaced or the car is otherwise repaired. These items would include the battery, alternator, any component of the ignition system, the transmission, | ||
- | \\ | ||
- | Where the automotive analogy fails, generally speaking, is when a car fails it can be repaired. In computing, if a user’s personal data is lost without backup, it’s __permanently lost__. There are many possible events where data may be corrupted beyond recovery (viruses, ransomware) or is completely lost due to drive failures, a failing drive controller or other hardware failures. This is why real data back up is far more important than the computing equivalent of a spare tire (RAID).\\ | ||
- | \\ | ||
- | ---- | ||
- | ==== Backing Up Data ==== | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | The scenario depicted in this graphic represents true backup. There are **two full copies of data**. With two separate copies, this backup strategy is superior to traditional RAID1 for home or small business use cases for a couple reasons. | ||
- | \\ | ||
- | * Rsync can be used with most USB connected hard drives where RAID1, when used with USB connected drives, is notably unreliable. | ||
- | * If there’s a drive error, an accidental deletion, a virus, or other data related issue; in RAID1 the effects are // | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | ===== Full Disk Mirroring / Backup with Rsync ===== | ||
- | |||
- | While individual shared folders can be replicated using Services, Rsync, a more efficient approach is using an Rsync Command line, in a scheduled job, under System, Scheduled Jobs to mirror a drive. This method allows for replicating the file and folder contents of an entire data drive, to an external drive or a second internal drive of adequate size. | ||
- | |||
- | * To implement something similar to the following example; it’s necessary to add and mount a destination drive, in accordance with the section labeled A Basic Data Drive. | ||
- | * When formatted, the hard drives used in this example were labeled to indicate their function. This is a good practice that will help new users to easily identify drives and avoid admin mistakes. | ||
- | * Dissimilar sized drives can be used, provided that the destination drive is large enough to hold the source drive’s data. | ||
- | |||
- | ---- | ||
- | |||
- | The following Rsync command line is an example of how a data drive can be mirrored onto a second drive. | ||
- | \\ | ||
- | < | ||
- | </ | ||
- | |||
- | \\ | ||
- | The source drive is on the left and the destination is on the right. In this example, the entire contents of **dev-disk-by-uuid-3bdb3de5-218b-4930**, | ||
- | \\ | ||
- | The switches are:\\ | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | < | ||
- | If accidental deletion protection is desired, this switch could be left out of the command line. However, from time to time, it may be necessary to be temporarily re-added the < | ||
- | ---- | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | Under the **Mount Point** column are the full paths, by drive UUID, needed for the Rsync command line. Also note the " | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | To organize the construction of the Rsync command line, users should consider using a text editor like Windows Note Pad. Copy the source drive on the left and the destination on the right. | ||
- | |||
- | The following is an example of a completed command line that will copy the entire contents of the source drive (**/ | ||
- | |||
- | |||
- | {{ :: | ||
- | |||
- | ---- | ||
- | |||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | < | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | * Getting the **source** (**left**) and **destination** (**right**) in the correct order, in the command line, is **CRUCIAL**. If they’re accidentally **// | ||
- | * The safest option would be to leave the switch < | ||
- | \\ | ||
- | |||
- | ---- | ||
- | |||
- | As previously mentioned, this Rsync operation can be manually run or automated under: **System**, **Scheduled Tasks**. From the line created in notepad, copy and paste the Rsync command line into the **Command** box and select scheduling parameters as desired. | ||
- | |||
- | As shown in this example: | ||
- | This Scheduled Task will run the Rsync command will run every Sunday at 0110AM. | ||
- | |||
- | |||
- | {{ :: | ||
- | |||
- | ---- | ||
- | |||
- | === User Options for Rsync Backup === | ||
- | |||
- | **Automated: | ||
- | As configured above, and if **ENABLED** box is checked, this Scheduled Job will run the Rsync command line once a week, on Sunday, at 01:10AM. After the first run of the command, which may take an extended period to complete, a week or even more would be a good backup interval. Generally speaking, the backup interval should be long enough to allow for the discovery of a data disaster (drive failure, a virus, accidentally deleted files, etc.), with some time to intervene //before// the next automated backup replicates the problem to the 2nd drive.\\ | ||
- | \\ | ||
- | This is also a drawback of using automation; if data loss or corruption is not noticed by the user, those problems may be replicated to the back up drive during the next Rsync event. Longer automated backup intervals, such as two weeks or even a month, allow more time to discover issues and disable replication.\\ | ||
- | \\ | ||
- | **Manual Run:**\\ | ||
- | If the job is **disabled** (the **ENABLED** box is not checked), the job won’t run automatically. However, the job can be run manually, at any time, by highlighting the job under **System**, **Scheduled tasks**, and clicking the **Run** (right arrow) button. This may be the best option for users who do not check their server regularly.\\ | ||
- | \\ | ||
- | **Delete Protection: | ||
- | Removing the < | ||
- | \\ | ||
- | **Keep in mind:**\\ | ||
- | In the event of a failing or failed source data drive, if the job is automated, it is **crucial** that the drive-to-drive Rsync job is turned **OFF**. Similarly, after noting a problem, DO NOT run the rsync job manually. | ||
- | \\ | ||
- | \\ | ||
- | **The Bottom Line:**\\ | ||
- | The additional cost for full data backup using Rsync is the cost of an external drive, or an additional internal drive, of adequate size. For the insurance provided, the additional cost is very reasonable.\\ | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | If errors occur when running the command line, see the following; | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | → [[https:// | ||
- | \\ | ||
- | ---- | ||
- | |||
- | ==== Recovery from a Data Drive Failure - Using an Rsync’ed Backup Drive ==== | ||
- | |||
- | === General: === | ||
- | Again, as a reminder, when the NAS primary drive is failing or has failed, it’s **CRUCIAL** to turn **OFF** an automated drive-to-drive Rsync command line in **Scheduled Tasks**.\\ | ||
- | \\ | ||
- | |||
- | |||
- | === Restoration to the Backup Drive: === | ||
- | The backup Rsync’ed “destination” disk can become the data source for network shares. This involves repointing existing shared folders, from the old drive location, to the backup drive. All additional services layered on top of **Shared Folders**, to include **SMB/CIF** shares and other shared folder services, will follow the shared folder to the new location on the back up drive.\\ | ||
- | \\ | ||
- | |||
- | === Repointing a Shared Folder: === | ||
- | In the following example, the data drive has failed and it’s been determined that it’s not repairable. Under **Storage**, | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | There may be ERROR dialog boxes regarding the failed mount of existing shared folders. With a missing but referenced drive, this is to be expected. When all shares are redirected, these error messages will stop. | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | ---- | ||
- | \\ | ||
- | The actual references to the failed source drive are the Shared Folders assigned to the drive. | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | Since the source drive no longer exists and there’s an //**exact duplicate**// | ||
- | \\ | ||
- | |||
- | Click on the **Documents** line in **Shared Folders**, above, and then click on the **Edit** (pencil) button. | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | < | ||
- | < | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | < | ||
- | Accordingly, | ||
- | < | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | (Remember that //all// contents of the now missing source drive and the destination drive were // | ||
- | \\ | ||
- | Do the same process for all remaining Shared Folders. (In this example, Music was repointed as well, but not shown.) Again, error messages may appear during the process. Acknowledge them (with **OK**) but do not revert, or back out of change confirmations. When all Shared Folders are redirected to the backup drive and saved, error messages will end. | ||
- | ---- | ||
- | |||
- | **In the final result:**\\ | ||
- | \\ | ||
- | With one operation per shared folder, all shared folders can be redirected to the rsync' | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | {{ :: | ||
- | \\ | ||
- | ---- | ||
- | In this case, SMB network shares layered on top of the Shared Folders above. | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | In addition, most simple services that are applied to these shared folders, will follow their shared folders when they are repointed to the backup drive. | ||
- | ---- | ||
- | |||
- | A check of **Storage**, | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | At this point, all shares in this example have been successfully redirected to the backup drive and the server is fully functional again. | ||
- | |||
- | ---- | ||
- | One last operation is needed to completely remove the failed DATA drive. Go to **Storage**, | ||
- | |||
- | {{ :: | ||
- | |||
- | ---- | ||
- | |||
- | **When physically replacing the failed disk:** | ||
- | |||
- | Note that the original rsync command line will no longer valid. | ||
- | Finally, the rsync command line will need to be updated to reflect the new source and new destination drives. | ||
- | |||
- | {{ :: | ||
- | |||
- | ---- | ||
- | |||
- | ===== Second Level Backup – Replication to a Second Host ===== | ||
- | |||
- | {{ : | ||
- | |||
- | The first item to note, is that this scenario can be accomplished using a LAN client, as the second host, and it could be a Windows client. The additional cost would be the price of a second drive of sufficient size (internal or external) to house the second copy of data, attached to a remote host. The Remote Mount Plugin can mount a Windows network share (a user name and password with write access is required) and Rsync can be configured to replicate NAS data to the Windows share.\\ | ||
- | \\ | ||
- | As illustrated above, the second host could be a low cost SBC. This scenario can be designed with a number of desirable features.\\ | ||
- | \\ | ||
- | * First, if backing-up to a second server platform, two fully independent copies of data are possible. | ||
- | * When using an SBC with openmediavault installed: | ||
- | \\ | ||
- | If the primary server fails completely, the second platform can be configured to take over as a backup file server. With all data backed up and resident on the SBC, this data can be made available to the network with SMB shares. | ||
- | \\ | ||
- | * Other than re-homing clients to the shares on the backup device, there’s no recovery time and no “crisis” involved in getting data back on-line. It’s already there. | ||
- | \\ | ||
- | The costs for this level of backup are very reasonable, with the cost of a hard drive of adequate size and an SBC. Good performing SBC’s are a low cost option. For home and small business use cases, older PC platforms or laptops could be configured as a backup server as well.\\ | ||
- | \\ | ||
- | The Practical details for setting up Primary Server to Backup Server share replication, | ||
- | \\ | ||
- | ---- | ||
- | While replication to an independent host is an excellent method of avoiding data loss catastrophes, | ||
- | \\ | ||
- | In the bottom line, if users want to keep their irreplaceable data, an absolute minimum of two full copies is recommended, | ||
- | \\ | ||
- | For further information on Backup concepts and best practices, an excellent explanation of Backup is provided by [[https:// | ||
- | \\ | ||
- | ---- | ||
- | |||
- | ===== Operating System Backup ===== | ||
- | By design, the OMV/Debian operating system installs on its own partition, segregated from data. This makes copying or cloning the openmediavault boot/OS drive an easy process. So, one might ask, why is a clone or a copy of the operating system important? | ||
- | \\ | ||
- | Building openmediavault, | ||
- | \\ | ||
- | As users configure their servers, add services, reconfigure shares, move their data around, tweak access controls, etc., servers tend to become “works in progress”. Configuring a server to the user’s preferences can be an evolution that may take weeks or even months. If a complete server rebuild is required, the customization, | ||
- | \\ | ||
- | There are several ways to duplicate an operating system boot drive, but many can be technically involved; requiring network access to remote servers, bootable utilities and somewhat complex processes.\\ | ||
- | \\ | ||
- | |||
- | Given the low cost of flash media and with sockets mounted on the outside of a PC case, SD-cards and USB thumb-drives lend themselves to cloning and very quick recovery.\\ | ||
- | ---- | ||
- | ==== The Benefits of Maintaining Operating System Backup ==== | ||
- | |||
- | In accordance with [[https:// | ||
- | \\ | ||
- | In all of these cases, having a confirmed working clone of the boot drive will allow users to “drop back” to a known good state. The “FIX” would be as simple as shutting down and booting the server on a known working clone.\\ | ||
- | \\ | ||
- | The advantages of maintaining operating system backup are obvious. Beginners, with very little knowledge of Linux, can work with their servers without fear, which facilitates learning. If a Linux update causes ill effects, it’s possible to drop back and selectively install packages to isolate the exact cause of the problem. If an add-on update doesn’t work (direct installed software, a plugin, Docker, etc.), the user can gracefully back out of the update and leave the older (but working) software package in place.\\ | ||
- | \\ | ||
- | It’s the easiest, quickest, and most effective fix, for resolving problems with openmediavault and the underlying Debian Operating System.\\ | ||
- | \\ | ||
- | **The practical issues of maintaining boot drive clones – when to update and rotate?**\\ | ||
- | \\ | ||
- | 1. Linux Operating System package and security updates are unlikely to have a direct on the operation of the server. | ||
- | \\ | ||
- | 2. Add-on packages that are direct installed on the boot drive, Dockers (Plex, Urbackup, Pi-Hole, etc.), are another matter. | ||
- | \\ | ||
- | 3. If a network share is added, deleted, or any aspect of the NAS is reconfigured that changes the operation of the NAS; the backup would need to be updated. Otherwise, | ||
- | \\ | ||
- | 4. If a cloning mistake is made (let’s respect Murphy’s Law), a 3rd clone could become a “fallback of last resort”. Given that Linux package upgrades and openmediavault sub-version upgrades have little to no effect on network shares or the high level configuration of the NAS, a 3rd clone can be maintained that is updated //only// when the NAS configuration is changed.\\ | ||
- | \\ | ||
- | === A Last Important Note About Backing Up your OS === | ||
- | |||
- | Just as it is in the commercial world, where support for a product may be discontinued, | ||
- | \\ | ||
- | Users may believe that an ISO file, or image, contains all the software needed for a build. In some current build cases, that assumption would be incorrect. Linux distro’s, during the initial build and to finalize the installation, | ||
- | \\ | ||
- | Can it be assumed that those same software repositories and resources will be available on some future date, exactly as they were at the time of a current build? The answer is “**No**”. Distributions of a specific Linux version, complete with specific applications, | ||
- | \\ | ||
- | Therefore, if users have extensively configured builds, are using specialty hardware (such as SBC’s) or are using openmediavault to serve a critical function; it would be wise to backup the boot drive to an image file, or Clone the fully configured working installation to separate media and save one or more copies for future use.\\ | ||
- | \\ | ||
- | ==== Cloning Flash Media ==== | ||
- | |||
- | To avoid issues that can result from dissimilar sizes, it’s best to clone images from/to identical SD-cards or USB thumb-drives. Otherwise, it’s easier to clone if a new drive is slightly larger than the working drive.\\ | ||
- | \\ | ||
- | (And while it’s an intermediate level technique, [[https:// | ||
- | \\ | ||
- | **The Cloning Process for USB thumbdrives and SD-Cards**\\ | ||
- | \\ | ||
- | * Install [[https:// | ||
- | * Format a new SD-Card or USB thumb-drive with [[https:// | ||
- | * Test the new card or USB drive with [[http:// | ||
- | \\ | ||
- | If the device registers errors, or if the capacity is significantly different from what is that’s marked on the label (a fake), return it for a refund or throw it away.\\ | ||
- | \\ | ||
- | **At this point you should consider marking your working SD-card to make sure you don’t mix it up with the blank card. Otherwise, it is possible to read a “blank card” and use the blank image to “overwrite” the working card.**\\ | ||
- | \\ | ||
- | Insert the **working** card and start USBimager\\ | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | < | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | \\ | ||
- | **Note:** Windows will not be able to read the format of the partitions on the working boot drive and offer to format it for you. **DO NOT** format the drive. Close the dialog box with the **X**.\\ | ||
- | \\ | ||
- | * In most instances, USBImager will detect USB thumb-drives and SD-cards, and set the Device drive letter. However, it would be prudent to check the letter Windows assigns to the drive with Windows Explorer. | ||
- | * First click on the **down arrow** (under Write and Read). | ||
- | * If blank, check the boxes for " | ||
- | * Click **Read**. | ||
- | \\ | ||
- | |||
- | {{ :: | ||
- | |||
- | If USBImager is opened on the Desktop, the image file will be deposited on the Desktop. | ||
- | **usbimager-20221209T1455.dd.zst**\\ | ||
- | This format provides the year, month, date and time that the image is taken.\\ | ||
- | If storing the image for future use, renaming it to something like **OMV6-Server1-2022-1209.dd.zst** may be helpful.\\ | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | < | ||
- | If the user/admin is running a business or is in another time sensitive scenario, where the NAS server can not be out of service for an extended period; the server can be booted on the source drive while the clone is being written. Thereafter, the drive swap could be accomplished after-hours or during a low use period. | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | \\ | ||
- | ---- | ||
- | |||
- | The last process uses USBImager to burn the image file and verify it in one pass. | ||
- | |||
- | * Insert the new flash drive and start USBImager. | ||
- | * Select the image file previously created, select the destination flash media drive, and click the **Write** button. | ||
- | |||
- | {{ : | ||
- | |||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | Depending on the speed of flash media being used, the speed of USB port, if compression was used, etc., the write operation can take from 15 minutes up to an hour or more. | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | To be certain of success, test the newly created clone by shutting down the server and booting on the cloned media. | ||
- | |||
- | ---- | ||
- | ===== Add-on’s – Adding Value to Your OMV server ===== | ||
- | |||
- | ==== General ==== | ||
- | |||
- | The [[https:// | ||
- | |||
- | ==== Openmediavault’s Plugins ==== | ||
- | |||
- | Openmediavault has numerous plugin’s. Some are integrated into the base package by openmediavault’s developer Volker Theile. Examples are iSCSItarget, | ||
- | \\ | ||
- | Still more were created by openmediavault plugin developers, such as Remote Mount, the flash-memory plug-in, backup plugins, and more.\\ | ||
- | \\ | ||
- | Many plugins are integrations of third party packages such as SNAPRAID, MergerFS, etc. While questions or issues regarding the **integration of plugin’s**, | ||
- | |||
- | ==== Dockers - General ==== | ||
- | |||
- | While Dockers are an avenue toward adding extensive functionality to openmediavault, | ||
- | |||
- | === So, What is a “Docker”? | ||
- | |||
- | Dockers are a type of Virtual Machine (VM) that share the Linux kernel and memory spaces with the host. A Docker is spawned from a Docker image. The resultant VM equivalent, that’s built from a Docker image, is referred to as a “container”. A container is fully self-sufficient, | ||
- | \\ | ||
- | Dockers are more resource efficient when compared to running a full VM in a hypervisor, due to direct allocation of hardware resources. Typically, VM hypervisors provision fixed blocks of memory and may require access to dedicated hard disk space or block device partitions. Whether these dedicated resources are used by the VM or not, they’re no longer available to the Host operating system or other VM’s. A Docker, on the other hand, uses the needed memory space to run its processes and the host’s hard drive for storage, without wasted resources. Resource management is lean and tight, allowing more Docker containers to run concurrently with much greater efficiency.\\ | ||
- | \\ | ||
- | ---- | ||
- | |||
- | === Installing Docker === | ||
- | |||
- | Installing [[https:// | ||
- | \\ | ||
- | Under **System**, **OMV-Extras**, | ||
- | |||
- | **Before installing Docker:** | ||
- | Take note of the default Docker Storage location. **/ | ||
- | |||
- | * The easiest solution is to change the Docker Storage path to a data drive. If the default path is changed, Downloader output and metadata created by media servers (Plex, Emby and others) will be stored on a data drive by default. | ||
- | * A more advanced solution would be to leave the default storage location in place (var/ | ||
- | \\ | ||
- | |||
- | < | ||
- | {{ : | ||
- | |||
- | An install dialog box will popup and scroll as files are downloaded and installed. At the end, "End of Line" will be displayed. Click the **Close** button.\\ | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | **General Note:**\\ | ||
- | Docker is now installed and it can be controlled from the command line. However, for most users, controlling Docker from the command line may be an daunting task. | ||
- | [[https:// | ||
- | \\ | ||
- | Portainer and Yacht have their individual strengths and weaknesses. | ||
- | \\ | ||
- | ---- | ||
- | |||
- | === Installing Portainer === | ||
- | \\ | ||
- | Under **System**, **OMV-Extras**, | ||
- | |||
- | < | ||
- | |||
- | {{ : | ||
- | |||
- | An install dialog box will popup and scroll as the Portainer image is downloaded and a container is initialized. At the end, "**End of Line**" | ||
- | \\ | ||
- | Click the **Close** button.\\ | ||
- | \\ | ||
- | With a successful install the **Status** line will report; **Up X seconds** (or minutes, etc.)\\ | ||
- | \\ | ||
- | ----\\\ | ||
- | Click on **Open Web**.\\ | ||
- | \\ | ||
- | < | ||
- | < | ||
- | <table width=" | ||
- | <tr> | ||
- | <td colspan=" | ||
- | < | ||
- | </td> | ||
- | </tr> | ||
- | <tr> | ||
- | <td style=" | ||
- | If the portainer web page doesn' | ||
- | </tr> | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | \\ | ||
- | At this point, Portainer is completely unconfigured. The first configuration requirement is setting a **password** for the **admin** user. Take note of the username **admin** and the entered **password**. They will be needed to log into Portainer again.\\ | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | When a password is entered and confirmed, the Portainer page will change to **Quick Setup**.\\ | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | |||
- | {{ :: | ||
- | |||
- | Portainer is now running with a minimal configuration.\\ | ||
- | \\ | ||
- | At this point, on the left hand menu, menu selections for the **Local Environment** can be found. | ||
- | \\ | ||
- | For more information on configuring Dockers in Portainer, portainer.io hosts → [[https:// | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | === Dockers - It’s about choices === | ||
- | |||
- | While there are 100,000+ Dockers, available on the [[https:// | ||
- | \\ | ||
- | ---- | ||
- | |||
- | === Selecting a Docker - Primary Considerations === | ||
- | |||
- | **First: | ||
- | \\ | ||
- | When installing a Docker, for the greatest chance of success, it is suggested that users follow the guidance provided in Guides Section of the openmediavault forum.\\ | ||
- | \\ | ||
- | **Second: | ||
- | \\ | ||
- | Potential Docker users must use Dockers that support their architecture. The three primary architectures supported by openmediavault are **ARMHF** or **ARM64**, **i386(32 bit)**, and **amd64(64 bit)**. In most cases, 32bit Dockers will run on 64bit hardware. While there may be exceptions, i386 and amd64 Docker images may not run on ARM platforms. “**Multi-arch**” (multiple architecture) Docker images are more platform flexible.\\ | ||
- | \\ | ||
- | **Third: | ||
- | \\ | ||
- | To increase the chance of success, when attempting to install a Docker without a guide, look for the more popular Dockers with the highest number of “pulls” on the Docker Hub. (hub.docker.com) There are good reasons why these Dockers are broadly popular – they tend to work.\\ | ||
- | \\ | ||
- | **Forth: | ||
- | \\ | ||
- | In the vast majority of cases, Dockers that fail to work won’t have anything to do with openmediavault or Portainer. Their issues tend to originate from selecting the wrong architecture, | ||
- | \\ | ||
- | Since most Dockers share Network ports with the host (openmediavault), | ||
- | \\ | ||
- | [[https:// | ||
- | \\ | ||
- | {{ : | ||
- | |||
- | ===== When things go wrong ===== | ||
- | |||
- | First take note of any error dialog boxes. On most Windows and Linux machines it’s possible to copy and paste the text out of a dialog box by holding down the left mouse button and dragging the mouse pointer over text, to highlight it. Then use the keys with Ctrl+c (to copy), then click in a Notepad document and use Ctrl+v (to paste). This basic information will be helpful, in searching out the details related to the problem.\\ | ||
- | \\ | ||
- | ==== The First Resource – The Internet ==== | ||
- | |||
- | Users should search the internet first. The solutions for many generic problems can be found with [[https:// | ||
- | \\ | ||
- | While the search function of the openmediavault forum site will produce “hits” on search criteria, it is by no means all inclusive. If OMV is included in search criteria, a Google search may generate more result hits on information found on the openmediavault forum, than the forum’s integrated search function.\\ | ||
- | \\ | ||
- | With information from searches, users should make an effort to address their own issues. This approach tends to be the path to the fastest answers and greatly facilitates the learning process.\\ | ||
- | \\ | ||
- | ==== The Openmediavault Forum ==== | ||
- | → [[https:// | ||
- | \\ | ||
- | **When coming to the forum for help:**\\ | ||
- | \\ | ||
- | First search the forum. In many cases, user problems can be resolved with a few searches and a bit of reading. Second, look at the dates of posts and the version of openmediavault referenced. Posts that are 3 or more years old may not apply to the current openmediavault version.\\ | ||
- | \\ | ||
- | If posting a problem on the forum, start at the forum index , and look for the category that looks to be appropriate for the post. Along with an explanation of the the issue, the openmediavault version, the appropriate logs and command line output, if known, and the hardware platform in use are the absolute minimums required. Realize that, without information, | ||
- | \\ | ||
- | * Ask the right questions. For beginners, this can be deceptively difficult. There’s some “straight forward” guidance on this topic here → [[http:// | ||
- | * While openmediavault’s forum is known for responsiveness, | ||
- | * When looking at answers, try to focus on the information presented, not the perceived tone. Remember that support is provided “**gratis**”, | ||
- | * Be open-minded. The reason why users post on the forum should be because they couldn’t solve a problem on their own. With that in mind, when an experienced forum user replies, taking the time to make a suggestion or requesting more information, | ||
- | * If a forum post or a “How To” fixes your problem, or gets you through a configuration issue, consider giving the author a “Like” or “Thanks”. The gesture is free and it’s an indicator to other users who may have the same problem. In essence, you’d be saying “I agree” or “this worked for me”.\\ | ||
- | * When users are experiencing problems with their data store (a file system issue, a hard drive, array, etc.) the working assumption on the part of experienced forum users and moderators will be that **users have full data backup**. Accordingly, | ||
- | \\ | ||
- | ---- | ||
- | |||
- | ===== Solutions to Common Problems ===== | ||
- | |||
- | Follow this link to the maintained list on the forum. → [[https:// | ||
- | \\ | ||
- | ==== USB RAID ==== | ||
- | \\ | ||
- | **Problem: | ||
- | \\ | ||
- | **N/A:** There is no support for creating USB RAID, in the GUI. There are many reasons for this. While a USB RAID array can be initialized from the command line, it's strongly discouraged.\\ | ||
- | \\ | ||
- | ==== Rsync Drive Copy Errors ==== | ||
- | \\ | ||
- | **Problem: | ||
- | \\ | ||
- | In a small number of instances, the quota service may interfere with an Rsync drive-to-drive copy.\\ | ||
- | \\ | ||
- | **Solution 1:**\\ | ||
- | \\ | ||
- | Turn the quota service off. | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | (In the following examples, substitute the appropriate UUID's for the source and destination drives in the Rsycn command line.) | ||
- | \\ | ||
- | < | ||
- | '''' | ||
- | < | ||
- | '''' | ||
- | \\ | ||
- | Optionally, delete the files < | ||
- | \\ | ||
- | **Solution 2:**\\ | ||
- | \\ | ||
- | Add the following exclude statements to the rsync command line: < | ||
- | |||
- | A full command line example: | ||
- | |||
- | < | ||
- | |||
- | ---- | ||
- | |||
- | ==== USB Power - A Common Raspberry PI problem ==== | ||
- | |||
- | **General: | ||
- | \\ | ||
- | Many problems with R-PI’s, in versions up to the R-PI3.X, are related to under-powering. While the R-PI4 is much improved, depending on the power requirements of connected peripherals, | ||
- | \\ | ||
- | **Do I have a problem? | ||
- | \\ | ||
- | With all peripherals attached that are normally used – use the command '' | ||
- | \\ | ||
- | **What is the problem? | ||
- | \\ | ||
- | Beyond using a power supply with the appropriate current rating for the R-PI model, it should be noted that a USB power source must meet certain voltage specifications “at the socket”. In essence, the output voltage of a USB power supply can’t be increased to compensate for external voltage losses typical when using a long USB cable with small gauge wire.\\ | ||
- | \\ | ||
- | Making matters worse is, models prior to the R-PI4 use a micro USB plug as the power connection. The tiny contacts of a micro USB connection, combined with cables for micro USB that have small gauge wires, drop power supply voltage significantly.\\ | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | **Consider the following chart of voltage losses, versus wire length and gauge**\\ | ||
- | \\ | ||
- | (Note that voltage drops increase as current draw requirements rise.)\\ | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | **Potential Remedies: | ||
- | \\ | ||
- | * Use a power supply that meets at least the minimum recommended current rating for the R-PI model being used. | ||
- | * Use the shortest possible USB cable. Cables that are 1 foot / 30cm or less, made of thick gauge wire are preferred. If a short USB cable is not long enough to place an R-PI in a convenient location, use an AC extension cord rather than a long USB cable. | ||
- | * Avoid using direct connected USB powered hard drives. The additional current load will drop voltage and may stress a weak power supply. A self powered USB hub or a drive dock is preferred. | ||
- | * Avoid leaving peripherals attached, such as a monitor, keyboard or a mouse. Even when they’re not in use, they consume power. | ||
- | |||
- | {{ : | ||
- | |||
- | ===== 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. | ||