Posts by DaveOB

    HA !! got it ( I think ) !

    Can anyone confirm my thinking / logic on this ?

    When the power to the Pi restored at around 02h00, the Pi had no internet connection ( fiber routers were off ), and the Pi must have defaulted it's internal time to 00h00

    So the process that is logged as 00h00, actually ran at 02h00 real time.

    The process logged at 03h00 actually ran at 05h00 real time.

    When the routers were powered on ( around 05h30 ), the Pi got internet connection, and updated its own internal time from internet time, and the next cron / scheduled job ran at 06h00

    Mystery - Real Brain Teaser - I am Totally stumped !

    OMV5 in Pi4 2gb

    nginx in Docker

    local php script running on Nginx

    I have a php script that is run every 20 minutes.

    The php script logs an entry in a .log file ( on the external USB HD connected to the Pi ) , using php code :

    $extData = fopen($cronLogFile, "a");
    fwrite($extData,date("y-m-d H:i:s")." --- process started" . $LE);  // log entry with current server date and time

    In addition, the OMV > System > Scheduled Jobs has the Cron task, and 'Send Command output via email' is enabled.

    The Scheduled Job command is :

    docker exec nginx php /config/www/XXXdata/exdgo.php

    Early hours we were having a scheduled power outage - 00h00 to 02h00.

    So we turned off the fiber & network routers, and UPS ( battery dying ) 10 minutes before the power goes off.

    Power does go off, which means no power to the Pi from 00h00 to 02h00. This I am 100% certain of.

    The network router and fiber routers were off until we got up and turned them on at 05h30

    Mystery :

    The log file, created by the php script on the HD, has logs that say the code ran at the 20 minute intervals :

    I also got emails from the Scheduled Jobs ('Send Command output via email') with the same times.

    emails all arrived after the power to the network and fibre routers was restored at 05h30

    So 2 mysteries here :

    Does Cron ( Scheduled Jobs ) run multiple times after power is restored ?

    Power was certainly off until 02h00, but it appears to have run at the 20 minute intervals.

    Why would the 'Scheduled Jobs' NOT run from after 03h00, missing a 3 hour block - would there be some sort of buffer that was full caused by the 10 notifications ( from 00h00 to 03h00 ) that were waiting for internet connection to send out the notifications ?

    Is your printer in another network? What netmask are you using?


    different networks are 192.168.1... for my work PCs, 192.168.2... kids PC, 192.168.9... printers ( common usage )

    the firewall on the mikrotik router blocks all comms between 192.168.1... and 192.168.2...

    FTP problem .. hours wasted and still no solution ..

    Trying to get Lexmark ( mx310dn ) to scan documents to an FTP folder.

    FTP folder is located in a shared folder, on Pi ext. drive, OMV5

    I have FTP enabled in OMV5

    steps so far :

    OMV5 created User : 'lexmark' with a password.

    Access Right - User - Lexmark - Groups include users, adm, sudo, ssh, sambashare

    Shared Folders - 'www' : privileges - 'lexmark' read/write

    Shared Folders - 'www' : ACL - 'lexmark' read/write

    I can connect to the FTP folder from my PC using Filezilla ( same User / Pass as created for the printer ).

    I use the browser based interface on my laptop to adjust settings on the printer.

    I can print to the printer from my PC.

    In the printer settings, I create a FTP profile :

    to my Pi IP

    login lexmark


    path '/www/www/scan/'

    The shortcut to scan to FTP on the printer control panel is '#3'

    If I connect with same details from PC using filezilla, connects without problems.

    Trying to scan to the ftp address, it scans, creates a 1kb pdf 'file' in the shared folder ( can't be opened ), and then the printer reports 'Connection Error' and prints out an error report.

    Error report simply says :

    Scan to FTP Server Failed

    Details :

    FTP Server

    Connection failure : -12

    Connection error

    Server Response:


    My Pi and laptop are on 192.168.1.. domain and my printer is 192.168.9..

    Both networks connected to a Mikrotik router.

    Mikrotik firewall is set for direct connection between Pi and Printer

    Any insight appreciated


    Looks like that solved it. No clue what you told me to do, but it worked :)

    Thanks again.


    If you still see the filesystem in the output, post

    omv-confdbadm read --prettify conf.system.filesystem.mountpoint

    I logged in using Putty and ran the commands from your first post. This is what I got ( I still see the extHD1 at the end ) :

    then I ran :

    omv-confdbadm read --prettify conf.system.filesystem.mountpoint

    and got this :

    I had another hard drive connected to my Pi as a temporary drive.

    After removing it, I keep seeing it appear in the logs.

    Have checked Disks, File Systems and Shared Folders, and it is not listed there.

    But it must be somewhere, as log entries are being created every 30 seconds

    May 20 06:54:10 OMVpi2 monit[888]: Filesystem '/srv/dev-disk-by-label-extHD1' not mounted
    May 20 06:54:10 OMVpi2 monit[888]: 'filesystem_srv_dev-disk-by-label-extHD1' unable to read filesystem '/srv/dev-disk-by-label-extHD1' state
    May 20 06:54:10 OMVpi2 monit[888]: 'filesystem_srv_dev-disk-by-label-extHD1' trying to restart
    May 20 06:54:10 OMVpi2 monit[888]: 'mountpoint_srv_dev-disk-by-label-extHD1' status failed (1) -- mountpoint: /srv/dev-disk-by-label-extHD1: No such file or directory
    May 20 06:54:40 OMVpi2 monit[888]: Filesystem '/srv/dev-disk-by-label-extHD1' not mounted
    May 20 06:54:40 OMVpi2 monit[888]: 'filesystem_srv_dev-disk-by-label-extHD1' unable to read filesystem '/srv/dev-disk-by-label-extHD1' state
    May 20 06:54:40 OMVpi2 monit[888]: 'filesystem_srv_dev-disk-by-label-extHD1' trying to restart
    May 20 06:54:40 OMVpi2 monit[888]: 'mountpoint_srv_dev-disk-by-label-extHD1' status failed (1) -- mountpoint: /srv/dev-disk-by-label-extHD1: No such file or directory


    Looking for a way to backup / copy a load of files from my OMV5 external USB drive to my Google Drive.

    Something that not rocket science - beginner - lower intermediate level.

    Preferably free :)

    Is rsync suitable for this application ?

    I have Portainer, so I assume running in a docker container would be the better option ? with a browser based users interface ?

    Any guides to set this up ?

    Hi all

    Running OMV 5.5.16-1 on a Pi4

    Wanting to access movies from the Pi USB Drive.

    DVD player is connected wired cat5 to hub, Mikrotik router assigns static IP and the DVD Player appears in the Mikrotik DHCP Server Leases list as correct.

    On the DVD screen, I can 'change device' and I can see the shared folders on my PC and my Laptop.

    I can't see any device for the Pi USB drive.

    In OMV, I have 'Shared Folders' which include folder 'Plex_media'. That folder on the drive contains folders for movies, music, photos tv

    In OMV, SMB, Shares, I have 'Plex_media' listed as a Shared Folder.

    But the DVD Player is not seeing the Pi USB Drive.

    Do I need to create a 'DVD' User on OMV ?

    extra info :

    I can connect to the Plex_media folder from my PC / Laptop using a Mapped Network Drive

    The DVD player does not have any settings / options to set a username / password in the network settings.

    Edit: Sorry, misread. It goes over LAN if possible.

    I think that is not true. The idea of Home users is that they don't have to pay anything if you already have a plex pass. You may verify that in Plex forums.

    Sorry, when I said "Home Owner Account" i should have been more specific, and said the Plex Pass Account.

    I guess each family needs to evaluate the $40 per year for a single Plex Pass, or for each family member device paying the once-off $5 'per device' cost.

    As you pointed out, only the Home account owner can add / delete content from the shared library, so maybe it is better for each family member to have their own Plex account, and share their libraries with each other.

    It has nothing to do with OMV or shared folders.

    Thanks. so I don't need to give access to the Plex folders on the home NAS.

    So if I invite a family member/s ( each with their own Plex account ) as a Home User, and they want to access media that is stored on the NAS, would that stream go out via the internet ( use bandwidth ), or would the Home User view the media over the same based network ?

    Only con that I see with each member having their own account, is that each user then has to pay for the device/s that they use ( android phones or tablets ), whereas with the Managed User setup, they all piggyback off the Home Owner account for using remote devices.

    Hi all

    Just installed Plex on Pi4 / OMV5 as a docker container - followed TechoDad's video.

    I can connect from my desktop pc to Plex thru my web browser using the Plex IP address and port ( :32400 ), and happy with the results.

    What's the best way to share the content with other family members ( wife & kids ) on the same home network ?

    Should they each have their own free Plex account / login ?

    Do I need to add Privileges for each user to the shared folders ?

    The folders that I have shared on my OMV are :


    Would be ideal if each family member could add movies / downloads to the family folder, and maybe also have their own folder for stuff only they would watch.

    Do I create a sub-folder for each family member on the NAS so they can store downloads that can be accessed by other family members ?

    try docker exec nginx php /config/www/EXDdata/exdgo.php in scheduled tasks

    both of these options work. I assume that your suggestion ( the second line ) is more secure or stable.

    sudo docker exec -u root nginx php /config/www/EXDdata/exdgo.php
    docker exec nginx php /config/www/EXDdata/exdgo.php

    I am guessing that the OMV Scheduled Tasks are automatically run 'sudo' and that use 'root' is not required in the command as the Scheduled Task dialog already contains the 'root' as the user

    Thank You sincerely for your assistance Morlan. I would not have got this working without your input and guidance. Much appreciated.

    Should the php file be run as root?

    i have no idea ( subject unknown to me )

    I did try changing 'root' to 'pi' and the message was simply 'error occurred' and the details show :

    Error #0:
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export SHELL=/bin/sh; sudo --shell --non-interactive --user=pi -- docker exec nginx sudo -u pi php /config/www/www/EXDdata/exdgo.php 2>&1' with exit code '1': Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/nginx/json: dial unix /var/run/docker.sock: connect: permission denied in /usr/share/openmediavault/engined/rpc/
    Stack trace:
    #0 /usr/share/php/openmediavault/rpc/ Engined\Rpc\Cron->Engined\Rpc\{closure}('/tmp/bgstatuszG...', '/tmp/bgoutputz4...')
    #1 /usr/share/openmediavault/engined/rpc/ OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
    #2 [internal function]: Engined\Rpc\Cron->execute(Array, Array)
    #3 /usr/share/php/openmediavault/rpc/ call_user_func_array(Array, Array)
    #4 /usr/share/php/openmediavault/rpc/ OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
    #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)
    #6 {main}

    Oh sorry:

    docker exec nginx sudo -u root php /config/www/www/EXDdata/exdgo.php

    still results in an error :

    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- docker exec nginx sudo -u root php /config/www/www/EXDdata/exdgo.php 2>&1' with exit code '126': OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"sudo\": executable file not found in $PATH": unknown

    You could either add cron to the docker container via a container mod.

    Or you could run it via schedule jobs in omv. With this method you need pass the command with docker exec. For example create a scheduled job as root: docker exec sudo -u abc php /config/www/myscript.php

    set the Command in the OMV Scheduled Tasks :

    docker exec sudo -u root php /config/www/www/EXDdata/exdgo.php

    Got this error :

    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- docker exec sudo -u root php /config/www/www/EXDdata/exdgo.php 2>&1' with exit code '1': Error: No such container: sudo