remote mount a windows share problems if host is down

  • hi,


    in omv3 i just used remote mount to mount the data partition on my pc to get rsync working to "backup" my users folder.
    runs good, only "problem" if my windows host was down (on workingtime) i got sometimes a massage in omv web gui that some communication error happens - that was just because the remote mount wasn't available - but all other stuff worked - so it was ok for me ;)


    on omv5 its simular - but - i can't access File System or Shared Folders in webgui (and with the last, i can't change settings to any other plugin that need access to shared folders) until my wndows pc is startet. All Settings that are done will work, like FTP or SMB but i can't for example add a new SMB share.


    soo;
    is there a way to setup remotemount that way, it will mount my pc share if it is online, and dismount it if the pc goes offline?
    or
    anyway to use rsync to sync my users folder with remote setting of rsync?
    or
    a other backup that runs on omv and is able to pull my files from the windows pc?


    thx


    €dit: my way to do the job
    get rid of old Remote Mount if not needed anymore

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    Einmal editiert, zuletzt von draddy ()

    • Offizieller Beitrag

    Using autofs this is possible. But I am not sure if you should do it. It means that you make your client computers into servers. i dobt that is what you want.


    I do exactly what you require, only between a bunch of Linux servers and using NFS. However autofs also supports SMB. I have never tried autofs using SMB.


    How I have done it:


    Each of my OMV NAS has a NFS share. nas0.local has the shared folder nas0 shared using NFS. nas1.local share nas1. And so on. This is set up in OMV using the GUI as normal.


    Outside the OMV GUI, using the command line, I have setup autofs to make each of my OMV NAS mount all the other OMV NAS NFS shares as /srv/nfs/nas#.


    If a NAS is not available, has been rebooted perhaps, or is turned off, then it is automatically unmounted. If the NAS later becomes available and some server tries to access it, it is automatically mounted.


    Works great.


    However I don't use this system to backup my client computers. Instead I run scripts on the clients. These scripts are located on the remote server that is the backup destination but are run on the client. That way I can only run backup scripts if the server I backup to is available.


    I have written about my nfs autofs setup elsewhere here. Here for instance:


    remote mount plugin with offline drives

  • have you try what happens if you setup a rsync using one of your shares and the host is offline?


    can you access the omv web gui shared folder section and thinks like that?


    get me right, without that issue (like it was on omv3) I wouldn't care about it ;)



    and, don't know, you can maybe test it with windows smb share as well? (don't know your setup ;))


    but thx for that!

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    • Offizieller Beitrag

    It will fail. Not write to the mountpoint. No danger of "shadow filled" mountpoints.


    I don't create the mountpoints, only the base for the mountpoints. Autofs creates the mount points and mount them if they remote server is available. Almost automagical. Don't ask me how it is possible, but if this was not the case, autofs would be pretty useless.


    If the remote server is down the mountpoint is not there.


    I created /srv/nfs


    Autofs creates and mounts /srv/nfs/nas# if it is available.

  • my case is just a pull from the windows share - and write to one of the internal omv disks.


    current setup:


    Remotemount to windows share lets call "PCDATA"
    Shared Folder "PCDATA" will use that Remotemount
    Shared Folder "BackupPC" on 2nd OMV Disk
    Rsync check every 2 hours if something new in PCDATA and copy it to "BackupPC"


    so, can i set a shared folder to that autofs entries to use it with rsync? and what will happend if the pc is offline ^^

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    • Offizieller Beitrag

    Sure, it is possible to setup autofs to do exactly what you want. Can you do it? I don't know... I know I don't want to. I use nfs instead. And I do exactly what you describe and it works fine. Only I use Linux and not windows.


    I suggest that you instead let the windows box do the heavy lifting instead. Run the script on the windows computer and do a push instead. That way you don't even need to setup a share on the windows computer. It can stay a client and not be made into a server.


    Either run the script automatically or manually.


    Another option is to store the script on the remote server. If the local server (or computer) can access and run the script then, obviously, the remote server is running.

  • sure it would be possible and maybe "easyer" to push from windows to linux - but my intention is that the most work is on the nas - not the client - the network trafik and access to my datadrive will not interrupet me if i'm playing a game ;)


    will look at the weekend - i only need to ping the pc - mount the share, start rsync - when rsnyc is done - unmount the share - that should not be a big thing - but maybe someone have that already done ... ;)


    like i say in a other post, don't like to research the wheel every time i construckt a car ;)

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • done



    credentialsFile in /etc/ call it what ever you want to

    Code
    username=windowsUser
    password=windowsPasswort
    domain=pcNetworkName


    one Problem left:
    I can't remove the Remote Mount to my windows pc. Removed Rsync Jobs that used the PC, removed all Shared Folders that point to the Mount, but can't delete the Remote Mount entry - also cant Remove the File System entry.
    @ryecoaaron can you support me on that? thx ;)


    used umount -l /srv/.... so in File Systems it looks like "not mounted" also a ls to the /srv/ of that drive is empty - but still can't remove it.

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    2 Mal editiert, zuletzt von draddy ()

    • Offizieller Beitrag

    can you support me on that?

    Why can't you remove it? Are you getting an error? Need more info.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Not sure what you did. You will probably have to uninstall the plugin and then maybe you can delete the filesystem from the Filesystems tab. If not, you will have to manually remove the entry from the mntent section of /etc/openmediavault/config.xml

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • here you will see a screenshot of both, remotemount and file systems - all buttons disabled only "add" or "create" are activ


    OMG - find the trick :D


    at the end of the Remote Mount page is a littl refresh button - after hitting that little bastard the buttons edit delete and so on came up - so maybe it is possible to run that action atomated if the page is refreched by browser or just jumped into it with the menu?


    sometimes are the little things can drive you crazy - isn't it? :thumbup:

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    Einmal editiert, zuletzt von draddy ()

    • Offizieller Beitrag

    at the end of the Remote Mount page is a littl refresh button - after hitting that little bastard the buttons edit delete and so on came up - so maybe it is possible to run that action atomated if the page is refreched by browser or just jumped into it with the menu?

    Refreshing the page should do that. No idea why it didn't.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!