Posts by BitHoarder

    Just found this post as I'm setting up NUT on my system too


    I have my UPS plugged into my pfSense firewall because it is always on, but the NAS (& other devices) are not - so the firewall is the NUT Master


    I know it's not as easy as we would like, but I think all that is required here is to effectively duplicate the "remote monitoring" section of the current UPS plugin to allow editing of upsmon.conf & start / enabling nut-monitor.service


    As @DMG mentioned, nut.conf needs the mode changing and upsmon.conf just needs the line:


    MONITOR su700@server.example.com 1 upsmon secretpass slave


    So, the fields needed are UPSName, Remote Server Name, Username & Password... the number of PSUs (1) and mode (slave) can (I would presume) be hardcoded...


    or just leave a text box for users to type into :)


    I have done this on my OMV4 installation (by just editing the config files) and it works fine.

    Careful here - don't sync a VM's time AND use NTP - the timeslicing that the hypervisor does will always fight NTP.


    IMHO, forget ESXi timesync (I presume via VMTools?) and just use NTP.... and (thinking it through a little more), don't overprovision your VMs too much otherwise the timeslicing / timesync issue gets worse :)

    Just a quick note about Syncthing...


    I don't know if you use Synthing-GTK or the Syncthing WebGUI, but I found that it took a while to understand how it worked - including crazy things like the "hidden" .stversions folder that can become huge if you have file versioning enabled...


    So, I have it running at home with 3x laptops, 2x PC a Raspberry Pi and my OMV NAS... I just started slowly


    But... that's a separate subject and not about this thread ;)

    OK... so my findings so far...


    (Again, I am happy for anyone else to correct me here... :) )


    So, I'm currently presuming that I need a specific user to SSH from one OMV NAS to the other, so I have created a specific "rsync mirroring" user for this.


    I then need to generate the private / public keys, which are stored in that user's home folder... so it took me a minute to understand that OMV doesn't have a "/home" folder by default, so I needed to setup a shared folder to locate the "/home" folder, then enable home folders under Access Rights Management -> User -> Settings.


    OK, so at this point I use the terminal and SSH from each OMV to the other which adds the "other" OMV to the ~/.ssh/known_hosts file


    Then I created the private / public keys (on both OMV) using ssh-keygen and copied the public key (.pub) to the "rsync mirroring" user on the "other" OMV using ssh-copy-id


    Testing, I can SSH from each OMV to the other without using a password now... that means that a password does not need to be sent over the internet.


    It also means that the SSH tunnel is working through the pfsense firewall, including NAT, etc.


    Now, the part that I'm stuck at, is rsync... or more specifically, OMV's implementation of rsync


    OMV has 2x abilities with rsync: "jobs" and "server"


    "Jobs" are simply scheduled rsync commands - but they run as root
    "Server" is an rsync daemon, which requires a module to be configured (which can only rsync an entire shared folder) - and these can run as different users, but only using the rsync protocol, not over SSH (as far as I understand)


    :/


    So... I think that I need a "job" that runs as the "rsync mirroring" user, not root. ?(


    And this is where I have reached (so far...)


    I'm wondering whether I need to create a Scheduled Job (under the System menu tree, NOT an Rsync job) which can run as the "rsync mirroring" user... and then that does the actual rsync... :huh:


    Seems a bit weird, hence I'm not sure I'm going about this the correct way... but I do not want my data being transferred via the root user...


    I'll report back what I find...

    If you can wait a little longer for a proper response, I can probably help you here... as I'm looking to backup my OMV NAS through my pfsense firewall to a RasPi running OMV at another physical location... so quite similar to your setup :)


    But the hardware only arrived this week, so I've not proved this at all :)


    My planned layout will be:


    OMV (on a PC) --> pfsense --> Internet --> OMV (on a Ras Pi2)


    This is using OMV 2.2.11 with pfsense 2.3.2


    My plan is to either use the rsync daemon (preferred) or perhaps the syncthing plugin (I'm not sure about Syncthing's encryption - yet).


    Both OMV devices will have the fail2ban plugin enabled on SSH & Apache - and if needed - on the rsync daemon port


    rsync is my preferred first choice because it's a Linux standard tool... so even if OMV stops working, I could continue with the base OS tools.


    Both syncthing and rsync will only transfer the changes in files - so (for example) if you edited the meta data on a 40MB photo, it would only transfer the metadata (~kB), not the entire photo again (~MB)


    To be clear here - my use is a one-way mirror (see the arrows above)... so again, rsync works well here, but if you wanted a 2-way sync, then you would need to carefully think about how that would work... or use Syncthing (that handles 2-way updates)


    Either way - I think that the transfer should be over an SSH tunnel between the sites, initiated by OMV, passing through the firewall and terminating at the other OMV.


    So, as I understand your situation your pfsense box at home would need to have a firewall rule to allow the SSH connection "IN" to your NAS. I'm presuming that you don't allow SSH to the firewall from the internet, but even so, you might want to consider using NAT to change the port from the standard SSH one (22) to another one... ie 2222 (a bad example)


    So, in pfsense, you would need to go to Firewall->NAT->Port Forward and allow 2222 on your WAN interface to SSH on your NAS.


    Now, that's as far as I know (so far).


    I'm expecting that I will need to generate SSH keys so that both NAS can connect to each other over SSH without using a password and then rsync can communicate through the SSH tunnel (ie using the default port 873)


    That's the part that I have not reached yet... :)


    If anyone else has a better solution, I'm all ears...

    What does your

    Code
    /etc/network/interfaces

    file contain?


    I seem to recall that (with raspbian) you need to disable power saving for the raspberry pi usb wifi adapter.


    Could that be the issue? (I have not installed OMV on a Pi to know if that is still an issue...)

    So, as I understand it, you have the raspi connected to "the internet" (a home xDSL router?) and then you want the same raspi to be a WAP?


    Is this so that you can access OMV from both internally and externally?
    Are you trying to route all wifi through the raspi?
    Do you also have another device providing wifi - or is the raspi going to be the only WAP?


    I suspect that any packets arriving at the raspi don't know which interface to return by (because they are bridged), hence losing your connection - ie standard networking issue, rather than a "raspi" or "omv" issue...


    Hmm... personally, I would keep both ports on separate subnets - so the wlan0 could be 192.168.2.0/24 and the eth0 would remain 192.168.1.0/24 and then just route internet connections to the xDSL router (or whatever is the next hop).


    My raspi3 (just running owncloud) has a single connection to the home network (which permits internal access) and my firewall is setup to allow incoming traffic to the pi (which permits external access).

    Wow.


    I can tell you that my work's bin has things like 2.5" 20GB PATA laptop drives... not 2TB HGST SATA drives! I agree with the others here... you need to start an ebay shop!


    On a slightly serious note, as a dumpster diver myself, those drives will have probably had a hard life, so I would recommend that you don't RAID0 anything, RAID1 at the least, but preferably RAID6 everything because (IMHO), you'll be swapping out drives for a while until you've sifted the worst out of your collection.


    I agree with Eryan:

    Get rid of the USB install


    If you're planning to use this as a Myth backend, be aware of the old Mythweb and the new Myth WebFrontend that they have - just in case it conflicts with the OMV web GUI - and the myriad other web GUIs from the OMV plugins :)


    Personally, I use another device as my Myth backend, then rsync the data from that to my OMV NAS periodically, but that's just because of they way I've built my systems over time.

    In general, some hardware (ie the network interface) may be doing some powersaving, which could result in the symptoms that you are seeing.


    Perhaps try to see if there is a pattern to when the device is losing connectivity - ie perhaps run a continuous ping from another device, or try to SSH in every 12 hours, then 6 hours, etc, etc.. just to get an idea of whether the NAS fails after a period of inactivity.


    Other thoughts are that your hardware is failing... especially if your NAS was working reliably and you now have reliability issues.


    Perhaps the PSU, OMV OS disk, or (less likely) RAM - I had a home-built NAS (old PC parts that were laying around) and the PSU was failing causing all sorts of bizarre faults.

    I read their 2015 reliability review (https://www.backblaze.com/blog…rive-reliability-q4-2015/) - which was in Feb this year - and that's why I bought Seagate drives to replace my (full, not failed) WD Green drives.


    It's interesting to see this year's review shows that there are more Seagate failures, but reviewing last year's review shows a breakdown of failure rates per drive capacity.


    It's also interesting to read about how they detect future failures with some specific SMART stats (of which, one of my WD Green's is showing "impending doom" :) )


    There's nothing better than a large company like that producing those real world stats...

    Just out of curiosity, have you tried putting OMV to sleep / wakeup via a different mechanism - just to rule out a problem with the motherboard.


    I'm using the Autoshutdown & wakealarm plugins on my setup, and they work perfectly...


    I'm a little confused by these comments..

    The system wakes up, but it does not boot back online. The system becomes completely unresponsive and I have to pull the plug of the server to hard-reset it.


    Then I check other plugins and none work


    I've not connected a monitor because I can't reproduce the error myself, it happens randomly


    So, are you saying that the web interface is working, but the rest of the NAS is dead?


    That sounds more like an issue with the HDDs not spinning back up... perhaps a test with something like hdparm -C /dev/sdX??

    Just to add...


    I've just noticed that the recent OMV updates have bumped SyncThing to v0.13.0... this is not compatible with v0.12.* so make sure that your end device uses the same major version as the NAS.


    I currently have a couple of laptops that can't sync with the NAS at the moment, but it's not an issue as they sync with each other too, so there's minimal chance of data loss (so far... ;) )