Posts by DaveOB

    First, OMV 5 is EOL and you should upgrade.

    yes. waiting for a Pi400 to arrive which will get OMV6 installed. Once that is running, it will replace the OMV5 Pi4 ( which will also be upgraded after a while to ensure no issues with the OMV6 Pi400



    (don't use it).

    is that a 'your case' fact, or a suggestion that it should not be used ?


    If not clamAV, are there other / alternate / better AV addins that are recommended ?

    And if NOT using any AV, is that safe ? Are the files on an OMV NAS somehow better protected / safer ?

    Can anyone please explain how antivirus works on OMV5 running on a rPi4B ?


    Using OMV5 mainly as a NAS with an external HD on the Pi.


    I have AVG Internet Security on my home networked win PCs, and that monitors files, web pages and eMails constantly.


    Is there something similar for OMV ?

    I have seen mention of clamAV.

    Should this be an addin, or run in Docker ?

    Does it run automatically, or does it need to be manually run on a regular basis ?

    Ant other options ?

    Not sure where you are located or what your budget is but the Odroid C4 is pretty easy to get and a decent price

    at the a$$ end of the African continent, nothing is 'easy' or 'cheap' :) :)

    We are very limited in choice, and importing is extremely expensive - postal service is notoriously unreliable ( the workers have lots of nice things at home ) and couriers are costly.

    ryecoaaron - Thank You.

    Yes, I had seen the install guides. I was just stumped trying to find info about a Debian image for this device.


    It appears that it's very much a 'hit or miss' exercise that requires trying multiple different setups / images, and a risk of bricking the device.


    So that doesn't make the 'cheap and available' aspect of it so 'cheap' - brick one device and the cost saving is neutralised.

    Pi 4's are not available at the moment.

    Looking to convert a TV box to a small OMV6 NAS for storing folders / files that are used only occasionally.

    Will not have a k/board or screen - will access over LAN from my PC.


    I can get this box, but not sure now to determine if it will run OMV ?


    TV Box

    Amlogic S905W4 CPU

    2 Gb RAM

    16 Gb Internal

    Android 9

    4x ARM Cortex A53 @ 1200 Ghz


    I see a list here :
    https://github.com/armbian/community


    but not sure which of those ( if any ) are for this board.

    I also see different Releases and different Variants listed for each Image. Which would be the correct one to use ?


    I am working on the assumption that I should change the preinstalled TV box OS with a 'blank' linux / bedian / ubuntu OS, and then load OMV ?

    Hi all

    Currently have a Pi4B running OMV5 with Containers for duplicati, nginx and Portainer. 1 USB hard drive.


    Primary use of the system is for duplicati backups of LAN network PCs to the external drive, and for a php script to be run as a scheduled task every 20 minutes ( processes data and ftp uploads to an online ftp server )

    Currently all working perfectly.


    My concern is the severe increase of power cuts in our local power grid, increased lightening storms as summer is here ( southern hemisphere ) and the potential risk that the Pi could be affected.


    Pi prices have increased, and most suppliers in our country have no stock.


    Can I use an old Laptop to run OMV ?
    What's the procedure - do I download the OMV image to a flash drive / CD and make that bootable ?

    Would the version of Debian in the OMV image have support for the laptop hardware ( audio / video / network, etc ) ?


    I can pick up a used netbook or laptop at a decent price at the local stores, but want to make sure it will work before spending cash.

    eventually found out that to be able to see the win10 shared folder in the uBuntu virtualbox, I had to open the win10 'Windows Features' and enable 'SMB', followed by a restart.


    After that I was able to use PiShrink to reduce the image size, write back to a blank 16gb SD card, insert in the Pi, and it self-expanded when used.


    Pi Shrink process


    Here's the process that I used. I hope it helps someone.


    I have a Windows PC ( laptop ) and needed to shrink the size of my 32Gb disk image file ( SD card for OMV on Pi4 ).


    It is a known fact that not all SD cards of equal 'size' are actually the same identical size, so an img file of one card may not fit on another card.


    This solution allows you to shrink the size of the primary partition in the SD card image file, and it will automatically expand itself to whatever size card you write the img file back on to.


    So, in my case, the 32 Gb SD card is shrunk to 7 Gb.


    When written to a 16 Gb SD card and loaded in the Pi, the partition automatically expands to fill the 16 Gb.



    On my win10 PC : Installed VirtualBox


    downloaded ubuntu-22.10-desktop-amd64.iso iso disk image from here :

    Download Ubuntu Desktop | Download | Ubuntu
    Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.
    www.ubuntu.com


    Created D:\PiBackup and made it a Shared folder


    Download and install win32diskImager


    use win32diskImager to copy the existing active SD card to D:\PiBackup as an image .img file


    Started VirtualBox

    Add a New machine

    Type : Linux

    Version : Ubuntu (64 bit)

    Set Memory to around 6000Mb ( win host system has 16gb RAM )

    Create a Virtual Disk

    File Location : make sure location has free disk space

    File Size 45 Gb ( enough space for the ubuntu / Pi OS and also the SD card disk image )

    Network : changed NAT to Bridged -- otherwise I couldn't see the shared folders to transfer the files to and from Linux.

    In Win10, I also had to open 'Windows Features' and enable 'SMB' - required a restart of windows


    Start the Virtual Machine

    It will start and begin the installation of Linux from the iso disk image

    Long wait while installation happens


    on my PC, I have a network shared folder : D:\PiBackup


    Save the following script lines to a txt file and save or copy in to the shared ( Documents ) folder.



    <start of code to copy>


    Install pishrink ( if not already installed )

    ----------------

    wget https://raw.githubusercontent.…Shrink/master/pishrink.sh

    chmod +x pishrink.sh

    sudo mv pishrink.sh /usr/local/bin



    Run pishrink to shrink the img file :

    -------------------------------------

    sudo pishrink.sh 20180316_octopi_DaveOB.img ( change 20180316_octopi_DaveOB to the name that you saved the SD image from the SD to the PC )


    <end of code to copy>


    When Linux installation is complete, click on Restart

    Wait for the Linux desktop


    Once loaded, we need to copy the txt file and the SD img file from the win10 shared folder to the Linux machine :

    On The uBuntu desktop - on the left, go to Files

    Other Locations

    Windows Network

    Workgroup

    Dave_Laptop ( that's my laptops name on the network - yours would be different )

    Login with your windows username and windows login password

    Documents ( or whatever you named the folder that you shared in Windows )


    You should now see the txt and the img files.


    Right Click on the txt file and Click on Copy.

    Then change location, on the left panel, to the Linux 'Downloads' folder.

    Right Click and Paste


    You should now have a copy of the txt file in the Linux Downloads folder.

    Do the same process for the img file


    NOTE : the 32Gb image file does take quite a while to copy. watch the progress bar that appears on top of the 'files' icon on the left panel. Wait for it to complete. Mine took a good 40 minutes to copy.


    during the next stage, i did get an error message : user not in sudoers file

    What it means is that your user name is not yet permitted to execute sudo ( admin level ) commands.

    To prevent this, you can add your username to the sudoers file :

    How can I add a user as a new sudoer using the command line?
    After I add a user using adduser, I can't see it via System > Administration > Users and Groups unless I log out and then log in again. Is that normal? Also,…
    askubuntu.com


    I added : vboxuser ALL=(ALL) ALL



    Next, you need to download and install the PiShrink app ( once off operation ).


    Right Click on the txt file and open it in the default text reader / notepad

    Find the line that starts with 'wget', highlight the line, right click and Copy.

    Click on the File icon to display the file manager again.

    Right Click on the blank area below the txt and img files, and select 'Open in Terminal'

    The terminal will open ( looks like a DOS prompt Cmd screen )

    Right Click and Paste

    The wget line will be pasted - hit Enter to execute the line.

    Repeat this for each of the other 2 lines from the txt file.


    Once done, you're ready to shrink the img file.


    from the txt file, highlight and copy the line

    sudo pishrink.sh 20180316_octopi_DaveOB.img ( change the '20180316_octopi_DaveOB' to the file name of your img file )

    Press enter to execute the script.


    Once it is done, close the Terminal window and refresh ( F5 ) the file manager window.

    Right Click on the img file, properties, and you should see the new size of the img file.

    Close the properties window.


    Last thing is to copy the smaller img file back to your windows folder.

    If you want to keep the original file, you can rename the smaller img file before copying it back.

    Right Click on the file and Copy

    On the left panel, go to the shared Documents folder, right Click and Paste.

    Give it time to complete the copy process.


    After you use Win32DiskImager to write the img file to your new SD card and insert in to the Pi and boot up, give it additional time for the first run, as it has to then expand the primary partition to fill the disk.


    Done.

    Looking for a way to clone or duplicate the OS / boot SD card to a smaller SD card.


    I have a Pi4 with the OS on a 32Gb SD card, and USB Hard Drive for my data folders.


    I need to make a copy / clone of the boot SD card to a 16Gb SD card.


    My 'end goal' is to have a usable SD card that can be inserted in to a new (replacement) Pi4 and be able to boot and run within minutes.


    I have looked at Win32DiskImager and have copied an image of the SD card to my Win10 PC.

    I have not been able to get VirtualBox with uBuntu to see any shared folders on my win PC, so not able to use pishrink


    Is there another simple way to do this ?


    I do also have an older unused Pi B+. Could I have ubuntu / linux installed on that, insert the current Pi4-OMV5 SD card (32gb) and also a blank 16Gb ( fat32) SD card in the USB slots, and use the terminal window to copy from 'A' to 'B' ?


    Or is there a simpler way (OMV5) to copy the running SD card (32Gb) on the Pi4 while it's in the Pi4 and the blank 16Gb SD card in a USB slot ?

    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 :


    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
    fclose($extData);


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


    The Scheduled Job command is :

    Code
    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?

    netmask 255.255.255.0


    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 192.168.1.136

    login lexmark

    password

    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 192.168.1.136

    Connection failure : -12

    Connection error

    Server Response:

    N/A


    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

    THANK YOU MACOM


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


    Thanks again.

    Regards

    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 :


    Code
    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


    Code
    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