Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
remote_mount_plugin_for_omv5 [2021/04/21 11:37] – [Remote Mount For Openmediavault 5] crashtest | remote_mount_plugin_for_omv5 [2022/07/31 17:13] (current) – removed crashtest | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | ||
- | |||
- | {{ : | ||
- | |||
- | ====== Remote Mount For Openmediavault 5 ====== | ||
- | \\ | ||
- | \\ | ||
- | If preferred, this document is available in PDF form at this location → [[https:// | ||
- | \\ | ||
- | \\ | ||
- | [[https:// | ||
- | [[https:// | ||
- | [[https:// | ||
- | [[https:// | ||
- | \\ | ||
- | ===== The Remote Mount Plugin ===== | ||
- | Remote Mount is a plugin that's designed to mount a remote network share, in a manner which makes the resultant file system appear to be local. | ||
- | |||
- | This capability makes makes connections to OMV servers, non-OMV servers, and Client network shares possible. | ||
- | \\ | ||
- | ==== Prerequisites ==== | ||
- | |||
- | * [[https:// | ||
- | * A username and password is required, with a minimum of read access to the remote share. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Uses for Remote Mount ===== | ||
- | |||
- | * Remote Mount is useful for mounting, accessing and replicating network shares, located on another LAN server or a LAN client. | ||
- | * Along with setting up Remote Mount, this document will provide a practical example where Remote Mount and Rsync are used for replicating a network share. | ||
- | * **Remote Mount makes the creation of a full Backup Server relatively easy**, with no command line operations required. | ||
- | ===== Install the Remote Mount Plugin ===== | ||
- | |||
- | < | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | ---- | ||
- | ==== Setting up a Remote Mount ==== | ||
- | |||
- | |||
- | In the example provided, a Single Board Computer (a Raspberry PI 4) is being used to backup a network share on the Primary LAN server. (Where the term “remote” is used, it will be in reference to the Primary server.) | ||
- | \\ | ||
- | \\ | ||
- | As previously noted, to create a Remote Mount' | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | |||
- | In the example following, the Primary (remote) Server is another installation of OMV on the local LAN. The share to be accessed is **Music**. | ||
- | \\ | ||
- | \\ | ||
- | In this specific example, a **username** and **password** was created on the Primary Server to facilitate replicating shares. | ||
- | |||
- | ---- | ||
- | |||
- | **On the Primary server**:\\ | ||
- | \\ | ||
- | Under **Access Rights Management**, | ||
- | \\ | ||
- | \\ | ||
- | The following shows permissions on the Primary server, for the **Music** share: | ||
- | * The user **root**, in the vast majority of cases, with be the **Owner** and will have **Read**, **Write** and **Execute**. | ||
- | * In this example, the **Group users** has **Read**, **Write** and **Execute**. | ||
- | * **Others** means any user that is not **root** or any user that is NOT in the Group **users**. | ||
- | \\ | ||
- | < | ||
- | |||
- | {{ : | ||
- | |||
- | \\ | ||
- | In the above, note that the group **users** have “write” access to the **Music** share. | ||
- | \\ | ||
- | \\ | ||
- | **Important. | ||
- | In the interests of clarity, when mixing ACL's with standard Linux (Posix) permissions; | ||
- | \\ | ||
- | \\ | ||
- | In this very limited use case, the username **backup-r** is being further restricted, by ACL, to “**read only**”. This allows the remaining members of the group **users** to retain the **write** permission. | ||
- | |||
- | ---- | ||
- | |||
- | While off-topic, a few things should be discussed regarding OMV's users and access control: | ||
- | \\ | ||
- | \\ | ||
- | * What is shown as **Extra Options** (above) is **standard Linux permissions**. | ||
- | * When a user is added to OMV, the username is added to the Group “**users**” by default. | ||
- | * For home server use and to keep server permissions simple, **use standard Linux permissions** only. | ||
- | * What is labeled as **User/ | ||
- | * When creating users, do not attempt to create a user that “exactly” matches the name of Linux system users. | ||
- | A list of existing system usernames is provided at the end of this document, under [[https:// | ||
- | |||
- | ---- | ||
- | |||
- | **At the Backup Server: | ||
- | Under **Storage**, | ||
- | \\ | ||
- | * **Mount Type:** Leave at the default\\ | ||
- | |||
- | * **Name:** Name the mount in a way that indicates the share name (**Music**) with an indicator that it's a remote filesystem ( **_R** ), **Music_R**\\ | ||
- | |||
- | * **Server: | ||
- | |||
- | * **Share:** The exact name of the remote share.\\ | ||
- | |||
- | * **Username: | ||
- | |||
- | * **Password: | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | |||
- | < | ||
- | \\ | ||
- | |||
- | Notes:\\ | ||
- | * In other use cases, where a non-OMV NAS server is used (a QNAP or other type of NAS appliance, etc:) | ||
- | * The administrative username and password, used to access the NAS, could be used for Remote Mount. | ||
- | * If a workstation can access a NAS share, in many cases, the workstation login (username and password) could be used. | ||
- | * Workstation network shares, generally, can be accessed with the workstation' | ||
- | |||
- | ---- | ||
- | |||
- | < | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | |||
- | Notes: | ||
- | \\ | ||
- | * The green light under **Mounted** may not, immediately, | ||
- | * If the username or password are incorrect or the user does not have at least read access, or if the share does not exist, an error dialog box will pop up. In such a case, edit the Remote Mount with the correct data and try again. | ||
- | * On a rare occasion, an RPC error dialog box may come up when the mount is saved. | ||
- | |||
- | ---- | ||
- | |||
- | **Confirm the Mount:**\\ | ||
- | \\ | ||
- | Under **Storage**, | ||
- | The remote network share **Music**, on the Primary Server, is now mounted under the local label **Music_R**, | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | \\ | ||
- | For users who are interested only in mounting a remote share, this concludes the installation and configuration of the Remote Mount plugin. | ||
- | \\ | ||
- | {{ : | ||
- | |||
- | ===== Using Remote Mount and Rsync to Replicate a Network Share ===== | ||
- | \\ | ||
- | In conjunction with the active Remote Mount' | ||
- | \\ | ||
- | \\ | ||
- | ==== Create a Local Shared Folder ==== | ||
- | \\ | ||
- | First, it's necessary to create a local repository for files to be imported.\\ | ||
- | Under **Access Rights Management**, | ||
- | \\ | ||
- | \\ | ||
- | Use the pop-down arrow next to the **Device** field and select a local hard drive, or a mount point, to house the shared folder. | ||
- | \\ | ||
- | \\ | ||
- | Based on the shared folder **Name**, the **Path** field will be populated automatically. | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | ---- | ||
- | |||
- | ==== Create a Shared Folder for the Remote Mount ==== | ||
- | \\ | ||
- | Now we'll create a shared folder, for the Remote Mount(ed) network share.\\ | ||
- | \\ | ||
- | * **Name:** For consistency, | ||
- | * **Device:** Using the pop-down arrow, select the remote network share. | ||
- | * **Path:** In this case, **the default entry will have to be altered**. | ||
- | * **Permissions: | ||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | Now we have two shared folders. | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | |||
- | \\ | ||
- | {{ : | ||
- | |||
- | |||
- | ===== Setting up an Rsycn Job ===== | ||
- | \\ | ||
- | |||
- | First note that the job type is **Local**. | ||
- | \\ | ||
- | \\ | ||
- | Note the **Source** is the **remote network share** and the **Destination** is the **local share** on hard drive DATA1. | ||
- | This is known as a “**Pull**”. | ||
- | |||
- | **Note:**\\ | ||
- | While it's possible to “Push” using Remote Mount, when the username and password has write access to the remote share, it's not recommended. | ||
- | \\ | ||
- | \\ | ||
- | In the schedule, this job is set to run on Sundays, at 01:00(AM). | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | |||
- | In the same dialog box, use the right slide bar or keyboard arrow keys to scroll down to the following options. | ||
- | |||
- | ---- | ||
- | \\ | ||
- | |||
- | At the bottom of the dialog box, below, turn the annotated features ON.\\ | ||
- | There is one possible exception. If the local shared folder, on the Backup Server, is on a ZFS pool do not turn on “Preserve Extended Attributes”. | ||
- | \\ | ||
- | \\ | ||
- | In **Extra options**, note the additional commands added:\\ | ||
- | These commands are necessary due to the origin of the files. | ||
- | \\ | ||
- | \\ | ||
- | It's necessary to change ownership (**chown**) to the local root account and the local users group, and to modify access permissions (**chmod**). In this case **--chmod=0775** and **--chown=root: | ||
- | \\ | ||
- | \\ | ||
- | **Owner – root Read/ | ||
- | **Group – users | ||
- | **Others – Read/ | ||
- | \\ | ||
- | \\ | ||
- | See [[https:// | ||
- | |||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | < | ||
- | \\ | ||
- | ---- | ||
- | \\ | ||
- | < | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | < | ||
- | \\ | ||
- | \\ | ||
- | The following is an example of the initial message presented, as the rsync job is compiled: | ||
- | \\ | ||
- | \\ | ||
- | '' | ||
- | \\ | ||
- | '' | ||
- | \\ | ||
- | \\ | ||
- | Depending on the number of files in the remote share, this may take a couple minutes. | ||
- | |||
- | ---- | ||
- | |||
- | Files will begin to scroll by as the job proceeds. | ||
- | \\ | ||
- | \\ | ||
- | Note that there won't be a “progress meter” and if the share to be replicated is large, the first run of the job may take several minutes to several hours. | ||
- | \\ | ||
- | \\ | ||
- | An attempt to manually rerun the job, if a job is running the background, will result in an error. | ||
- | \\ | ||
- | \\ | ||
- | When a dialog box similar to the following is displayed, with “**Done ...**”, | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | |||
- | Notes: | ||
- | \\ | ||
- | |||
- | * After the first replication event is complete, in subsequent jobs, rsync will only transfer new and changed files. | ||
- | * In the Rsync Job's options, with the “**Keep Partially Transferred Files**” switch **ON**, even if a job is interrupted with a reboot or for some another reason, transferred files are not lost. | ||
- | * Turning the **Delete** switch **OFF**, may provide some degree of protection against accidentally deleted files. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Create A Samba Share ===== | ||
- | \\ | ||
- | |||
- | < | ||
- | |||
- | {{ : | ||
- | \\ | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | < | ||
- | |||
- | {{ : | ||
- | |||
- | \\ | ||
- | **Note:**\\ | ||
- | To insure that network behavior is consistent, this share (Music) on the Backup Server, should have the same SMB share settings as those used on the Primary Server. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Creating a Backup Server ===== | ||
- | \\ | ||
- | ** *Disclaimer - Use at your own risk.* **\\ | ||
- | There are many ways to create backup and replicate data. The following method is offered as an easy way to create a Home Backup Server, using OMV, that does not require operations on the Command Line or extensive knowledge. | ||
- | Users and Administrators must make their own decision on, whether or not, this method is appropriate for their use case. | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | |||
- | ==== The Overview ==== | ||
- | |||
- | \\ | ||
- | The previous example laid out the steps to replicate a remote network share onto a Backup Server and then sharing the replicated data to the network VIA a Samba share. | ||
- | \\ | ||
- | \\ | ||
- | In the Getting Started Guide, a reference was made to using Remote Mount and an SBC to create a Backup server. | ||
- | \\ | ||
- | \\ | ||
- | In such a case, with a Backup Server on-line that contains all data as of the last backup, if the Primary Server fails, recovery time is minimal. | ||
- | \\ | ||
- | \\ | ||
- | < | ||
- | |||
- | {{ : | ||
- | |||
- | \\ | ||
- | *After all remote network shares have been replicated and tested, to prevent user confusion, **the SMB service on the Backup Server should be turned off** *. (In this case, that would apply to the R-PI4.) | ||
- | \\ | ||
- | \\ | ||
- | Turning off the SMB service will prevent users from saving files direct to the Backup Server. | ||
- | |||
- | ---- | ||
- | |||
- | ==== Recovering to the Backup Server ==== | ||
- | \\ | ||
- | |||
- | In the event of a Primary Server outage:\\ | ||
- | \\ | ||
- | On the **Backup Server**, **Enable SMB** in the **Settings** tab, under **General settings**, and **Save**. | ||
- | \\ | ||
- | \\ | ||
- | The Backup Server' | ||
- | \\ | ||
- | See [[https:// | ||
- | |||
- | \\ | ||
- | {{ : | ||
- | \\ | ||
- | |||
- | {{ : | ||
- | |||
- | |||
- | ===== Considerations and Suggestions ===== | ||
- | |||
- | \\ | ||
- | If the creation of a Full Backup Server is the goal, the following is a list of considerations and suggested actions to consider: | ||
- | \\ | ||
- | \\ | ||
- | |||
- | * If permissions are used, duplicate all usernames and passwords that are resident on the Primary Server, on the Backup Server. | ||
- | * Check the Primary Server' | ||
- | * The permissions applied in the rsync job **Extra options**, to adjust incoming foreign files permissions, | ||
- | * Before the Backup Server is activated, **all rsync jobs** on the Backup Server should be **disabled**. | ||
- | * Changes involving shares, permissions, | ||
- | * If a user's workstation password is changed, the password for the same username much changed on the Primary Server AND the Backup server to maintain transparent access. | ||
- | * Turning the Delete switch **off**, in rsync jobs, may provide some accidental delete protection. | ||
- | |||
- | ---- | ||
- | |||
- | ==== Use Cases ==== | ||
- | |||
- | === Home Users: === | ||
- | |||
- | For home use, where files are largely static, home admin' | ||
- | \\ | ||
- | \\ | ||
- | In some instances, home admin' | ||
- | \\ | ||
- | \\ | ||
- | === Business Users: === | ||
- | \\ | ||
- | |||
- | In addition to considering local backup on the Primary Server (daily) and replicating to a Backup Server (weekly) business admin' | ||
- | \\ | ||
- | \\ | ||
- | While not for beginners, setting up automated and self purging snapshots is within the capability of a Computer or Linux enthusiast. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Switching to the Backup Server – A Short Check List ===== | ||
- | |||
- | \\ | ||
- | * Log into OMV's GUI, on the **Backup Server**. | ||
- | * Under **Services**, | ||
- | * Under **Services**, | ||
- | * Notify users to use the Backup Server until further notice. | ||
- | * On the **Primary Server**, under **Services**, | ||
- | |||
- | \\ | ||
- | ===== The Bottom Line ===== | ||
- | \\ | ||
- | The Remote Mount Plugin and Openmediavault' | ||
- | {{ : | ||
- | |||
- | ===== Additional Information ===== | ||
- | \\ | ||
- | ==== OMV's Pre-configured and System User Names ==== | ||
- | \\ | ||
- | {{: | ||
- | \\ | ||
- | The user **pi** is a default user on Raspberry PI's only. | ||
- | \\ | ||
- | This list is not all inclusive. It's worth noting that many software packages will install system users to enable a package to interact with the OS. | ||
- | \\ | ||
- | ---- | ||
- | ==== Further Notes on Permission commands ==== | ||
- | \\ | ||
- | **chown** is used to reset ownership and group access on incoming foreign files.\\ | ||
- | In the following, the left hand side of the colon is the “Owner” (**root**). | ||
- | '' | ||
- | \\ | ||
- | **Others**, not part of the command, is any username that is NOT specifically called out as the “owner” or any member of the group “users”.\\ | ||
- | \\ | ||
- | **chmod** is used to define the permissions applied to the Owner, the Group, and others.\\ | ||
- | \\ | ||
- | '' | ||
- | |||
- | On the Primary (remote) server, [[https:// | ||
- | \\ | ||
- | |||
- | |||
- | |||
- | (OMV's standard Linux permissions)\\ | ||
- | **Owner: | ||
- | **Group: | ||
- | **Others: | ||
- | \\ | ||
- | {{ :: | ||
- | \\ | ||
- | ---- | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||