Beiträge von vecnar

    Great post! Are you aware of OMV 4 being EOL though?

    Thank you for your post and sorry for late reply, i didn't get notification about your post for some reason.


    It is running fine for me now and i will look at upgrade if something drastically stops working. Too many scripts for different things are scheduled and i spent too much time on setting up omv4 and many dockers. I have backup in place and spare hardware in case original fails.

    Hello,


    Finally managed to configure macvlan on rockpro64 with OMV version 4.1.28-1. Thought to share my document notes for anyone having problems setting up macvlan on rockpro64 or in general.


    Brief

    lan interface: eth0

    lan network 192.168.2.0/24

    ip range used by dockers: 192.168.2.225 - 192.168.2.254


    Below are setup steps in different stages from my notes during setup. It involves:

    • creating subinterface (called mac0) to be used for communicating with host and defining part of the network address that will be used by dockers so that host would know how to route packets
    • creating macvlan docker network
    • host routing table changes if not using CIDR e.g. 192.168.2.224/27 for 192.168.2.0/24 lan

    Information sources

    Below are the links to information that helped me to set it up and some important points.

    ·         General information on how omv generates configs.

    o   Omv generates configs of necessary os config files when doing any changes, it stores the necessary information in other files

    ·         debian uses /etc/network/interfaces file where interface settings are defined, it is generated by omv scripts/helper-functions

    ·         Omv forum post about editing or creating new script for your custom network interface settings

    o   Customize /etc/network/interfaces the OMV way [>= 1.11]

    ·         Below forum is the one that pointed to creating corrects routes, the last one, bottom one and an additional link to source of information

    o   https://stackoverflow.com/ques…20host%20and%20containers.

    o   https://blog.oddbit.com/post/2…-docker-macvlan-networks/

    ·         Post regarding promiscuous mode on eth0 on rockpro64 after each boot, tested and it pings no problem mac0 ip whereas before it would do 1 every 20 secconds or so

    o   https://www.reddit.com/r/OpenM…/omv5_pihole_setup_guide/

    ·         Below is a good post about promiscious load on cpu, in a switched network is not existent

    o   https://serverfault.com/questi…us-mode-add-to-the-server


    Creating sub interface (virtual network interface) mac0

    1.       Define mac0 interface within omv or edit /etc/network/interfaces file in other linux distros

    a.       nano /usr/share/openmediavault/mkconf/interfaces.d/macvlan0



    2.       Make file executable and generate /etc/network/interfaces file

    a.       chmod +x /usr/share/openmediavault/mkconf/interfaces.d/macvlan0

    b.       omv-mkconf interfaces


    3.       Test if it can be brought up and down, make sure to do “if down” first and confirm that ip link or ip add doesn't have mac0 entry

    a.       ifdown mac0

    b.       ifup mac0

    c.        reboot OS if all is good or just try to restart networking service


    4.       Make sure correct route exists

    a.       ip route

    Creating macvlan docker network

    1.       Create docker network that has limited ip range so that host would know which interface to use to route packets, use online cidr calculators

    a.       use “aux address” to make sure they are not used in docker network

    b.       docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 --ip-range 192.168.2.224/27 --aux-address 'host=192.168.2.244' --aux-address 'NAS=192.168.2.245' -o parent=eth0 homeLan


    2.       Test communication, try pinging from within docker host and other devices on network

    a.       docker run --name alpine --net=homeLan --ip=192.168.2.241 -itd alpine /bin/sh

    b.       docker exec -it alpine /bin/sh

    Troubleshooting / packet capture

    1.       To troubleshoot network communication, you may need to use tcpdump, just open a separate ssh shell and ping on one and monitor output on the other

    a.       Define interface e.g. eth0 or mac0 and add not to monitor ssh port and define what ip to monitor or not to monitor

    b.       tcpdump -e -i eth0 port not 22 and host 192.168.2.241

    Hello,


    I am on OMV version 4.1.28-1 running on rockpro64 so not sure if it is the same but i have tried to setup macvlan over a year ago with no success. Only recently i came across this article https://collabnix.com/2-minute…orking-a-beginners-guide/ which helped me to start getting a bit more information but OMV not preserving the changes. So below is not a working solution but the steps that i tried and hopefully clever guys will be able to find a way to overcome this.


    I had no problems creating macvlan network but i wasn't able to get any network communication until i created ip link

    Code
    ip link add mac0 link eth0 type macvlan mode bridge

    This only allowed other devices on the network to talk to container but for host to talk to container you need to give ip address to device mac0.

    Code
    ip addr add 192.168.2.244/24 dev mac0
    ifconfig mac0 up
    service networking restart

    Below are all commands that helped me to test connectivity and establish connection between host and container and other devices on lan.

    Code
    docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 -o parent=eth0 homeLan
    ip link add mac0 link eth0 type macvlan mode bridge
    ip addr add 192.168.2.244/24 dev mac0
    ifconfig mac0 up
    service networking restart
    docker run --name alpine --net=homeLan --ip=192.168.2.241 -itd alpine /bin/sh
    docker exec -it alpine /bin/sh



    Now the bad part about it where i am stuck, every time your restart OMV and possibly do some changes on website, ip link and dev mac0 disappears so i had to perform below commands again and many times OMV would crash.

    Code
    ip link add mac0 link eth0 type macvlan mode bridge
    ip addr add 192.168.2.244/24 dev mac0
    ifconfig mac0 up
    service networking restart

    I am not sure why it crashed as i disabled syslog service to preserve sd card wear.

    Hi,
    I am using letsencrypt docker for fail2ban and nginx with self signed cert but below should assist you with checking logs and giving an idea. I would first try to restart the docker and check the logs.
    https://hub.docker.com/r/linuxserver/letsencrypt

    Code
    Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under /config/log/letsencrypt to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from letsencrypt in those circumstances.

    https://certbot.eff.org/docs/u…new#renewing-certificates


    Code
    certbot renew

    Hello,



    Problem:


    When I do any privilege changes in Access rights management -> Group -> privileges button, save and hit apply and yes button I get 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; systemctl restart 'sharedfolders-LIVE_ROOT.mount' 2>&1' with exit code '1': Job for sharedfolders-LIVE_ROOT.mount failed. See "systemctl status sharedfolders-LIVE_ROOT.mount" and "journalctl -xe" for details.”


    Below is part of output from journalctl -xe


    Code
    -- Unit sharedfolders-LIVE_ROOT.mount has begun shutting down.
    Jul 23 23:41:19 mynas systemd[1]: sharedfolders-LIVE_ROOT.mount: Mount process exited, code=exited status=32
    Jul 23 23:41:19 mynas systemd[1]: Failed unmounting Mount shared folder LIVE_ROOT to /sharedfolders/LIVE_ROOT.
    -- Subject: Unit sharedfolders-LIVE_ROOT.mount has finished shutting down


    Below is syslog part of it:


    Code
    Jul 24 00:34:11 mynas systemd[1]: Unmounting /sharedfolders/LIVE_ROOT/cctv...
    Jul 24 00:34:11 mynas systemd[1]: sharedfolders-LIVE_ROOT-cctv.mount: Mount process exited, code=exited status=32
    Jul 24 00:34:11 mynas systemd[1]: Failed unmounting /sharedfolders/LIVE_ROOT/cctv.
    Jul 24 00:34:11 mynas systemd[1]: Unmounting Mount shared folder LIVE_ROOT to /sharedfolders/LIVE_ROOT...
    Jul 24 00:34:11 mynas systemd[1]: sharedfolders-LIVE_ROOT.mount: Mount process exited, code=exited status=32
    Jul 24 00:34:11 mynas systemd[1]: Failed unmounting Mount shared folder LIVE_ROOT to /sharedfolders/LIVE_ROOT.


    What resolves it:


    To overcome the above error I have to stop nfs-server service and unmount /sharedfolders/cctv/ which is mounted from /srv/dev-disk-by-label-Live/hikvision.img. Apply privilege changes and mount image and restart nfs server services.


    Config and things I noticed:


    Shared folder pointing to root.


    I created shared folder LIVE_ROOT with path “/” to use it for rsnaphshot as backup source as otherwise there would be many rsnapshot jobs, as many as I have shared folders.


    Because I pointed the Path to the share as “/” when I execute “df” the main mounting point for the partition changes from /srv/dev-disk-by-label-Live to /sharedfolders/LIVE_ROOT but I still can access files from /srv/dev-disk-by-label-Live


    Code
    /dev/sdb13844640564 1043107984 280151619628% /sharedfolders/LIVE_ROOT
    /dev/sda13844640564939583816 290504036425% /srv/dev-disk-by-label-Backup


    Image mounted for Hikvision ip camera


    My Hikvision ip camera only works with nfs and doesn’t work with large hard drives. I tried user quotas and other suggestions but I only found one thing to work and it was to create a fixed size disk image with dd and mount it to shared folder that I also created nfs and samba shares for.


    I mount image after omv entries for Hikvision ip camera. Below is fstab file



    Code
    root@mynas:~# cat /etc/fstab
    
    
    LABEL=boot /boot/efi vfat defaults,sync 0 0
    # >>> [openmediavault]
    /dev/disk/by-label/Backup /srv/dev-disk-by-label-Backup ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
    /dev/disk/by-label/Live /srv/dev-disk-by-label-Live ext4 defaults,nofail,user_xattr,jqfmt=vfsv0,acl 0 2
    /srv/dev-disk-by-label-Live/cctv /export/cctv none bind,nofail 0 0
    # <<< [openmediavault]
    /srv/dev-disk-by-label-Live/hikvision.img /sharedfolders/cctv ext4 loop 0 0


    Questions:


    How to manage mounting points of image file to prevent any conflicts with services or omv mount and unmount jobs?


    Thanks in advance

    Check the links in the link. I tested and found no relevant performance differences. But this was a special use case (NodeJS) and maybe 'worst case' as well. With 4GB simply don't think about the architecture any more.

    I will stick with arm64 as i spent a lot of time configuring it, it is unfortunately not possible to export config and import in another image.

    Nope, it was about Plex Media Server which was available only in armhf architecture 2 years ago when ayufan wrote his recommendations. Choosing armhf has another real advantage: smaller memory footprint. An arm64 userland simply wastes more memory.

    I read the posts and I saw that arm64 uses 663Mb Vs 363 Mb armhf but I think nobody identified if performance is better in arm64 or armhf, I could have missed something.
    My board has 4 GB and I started configuring arm64, is it worth going back to armhf in my case?
    I will try to run quiet a few dockers, tvheadened, jackett, radarr, sonarr, deluge, some type of Kodi, letsencrypt, airsonic, possibly nextcloud.


    Edit: I just looked online and saw your benchmarks https://github.com/ThomasKaise…ch/blob/master/Results.md
    And arm64 4.4 has slightly higher scores throughout than armhf 4.4. just not sure how much ram each docker consumes and is it worth going back to armhf.

    As far as i understood the advantage to use armhf is that there are more software packages developed to run on it.
    I read that post on pine64, thank you for pointing it out. I didn't have the same issues with 0.7.9-1067-arm64, i had different problems and i do not think i tried armhf image. I believe the difference between that person setup and mine is boot device, emmc vs microsd and image version/type.
    I will give a try to both images to see if rtl2838 tv card works on it, i am not using it a lot but i would like to have it working.

    Tkaiser pointed out directly above that the new and different error @vecnar now experienced will be fixed only on beta images and also that 0.8 will be released soon. 0.8.0rc16 will most probably be the next stable version. Test matrix can be found here https://docs.google.com/spread…ApAyBBfc_BGv2A/edit#gid=0 and if you want to contribute then Pine64 IRC is the place to be.
    @Nefertiti the problem with 'beta releases' is that stuff is supposed to break without any reason since ayufan generates those releases without testing. They are only there to collect feedback and this is something experienced users are needed for willing to give constructive feedback where it belongs to (not here in OMV forum). So when using beta images you are simply on your own if stuff doesn't work as expected


    @vecnar I hope you are aware that you're reporting different issues. If not even a PCIe link between SoC and your new SATA HBA can be established then this is something different than the SATA HBA not being able to establish SATA links with disks.

    I tried latest release 0.8.0rc16 and couldn't reproduce the problem so fingers crossed it will be stable soon. Now usb dvb-t tuner is not working in docker where it was working in stable release, but this is not for this thread or this forum.
    Thank you for pointing out where the problem is now.
    Looking at the release notes ayufan suggests using armhf for openmediavault. But i saw somewhere that openmediavault stable was pointing out to arm64 image, which one should i choose?


    @Nefertiti Thank you for taking the case off and making pictures, it is not a nice case to remove the top cover from, too many screws. Nice connector for sata power cables. I hope fan controller doesn't restrict airflow too much.
    I am not going to put more than 2 hdds for now but i measured load with socket power meter and 2 3.5 hard drives with board consume 30 watts on startup.
    I would like to have stable release but i will try current release for short time and document all the setup process.
    I attached photos of fan speed controller and space limit between hdds and fan.

    I am using this card Marvell 9235 https://www.amazon.com/gp/product/B00AZ9T41M/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 with 2 X 3.5 X10tb and 2 X 2.5 each 2 and 5 TB with original power supply 12v 5A https://store.pine64.org/?prod…64-12v-5a-us-power-supply and 2 of this cable witch give you 12 and 5 Volts connected together at the white plug for more than 6 months no issues https://store.pine64.org/?prod…able-for-dual-sata-drives.Everything fit inside this https://store.pine64.org/?prod…64-12v-5a-us-power-supply.
    The first Marvell card died after 15 days, subsequently got it replaced by Amazon, going strong since then.

    Thank you for sharing the information and i am glad it works well for you.
    How do you power all 4 hard drives, I assume 2 with power cables that feed from the board but what about the other 2?
    What image do you use and what media do you boot from?
    What errors did you get when your sata card failed, same as per below?


    Code
    rockchip-pcie f8000000.pcie: PCIe link training gen1 imeout!
    rockchip-pcie: probe of f8000000.pcie failed with error -110


    I am booting from microsd and using https://github.com/ayufan-rock…4-0.7.9-1067-arm64.img.xz
    I currently have marvel 88se9215 4 port sata card but it is pcie 1x (1.0 version) with low throughput.
    Everything is in pine64 case https://wiki.pine64.org/index.php/NASCase with the fan. I had everything stock but gave up on trying to make fan spinning at the same speed but not too fast constantly with any software so i took an old zalman fan speed controller and fed it from power plug that hard drives feed from and glued speed adjuster at the back.
    I definitely think sata cables with 90 degree angle on one side should be supplied to be attached on the hard drives side as clearance between fan is very small. I think same applies for sata power connectors.

    I got new card and it was working well for a few days but then same problems. It seems to be not a hardware but software not giving enough time for hardware to be initialized. There are some kernel patches going around but i haven't installed any of them as i do not know how to nor do i know if they fix my problem as now it is harder to reproduce and i do not want to go with unstable release of something that should be a stable NAS.
    I will try to wait and get a rough reproducible steps and try latest release but this will only tell me one thing that i will have to wait until stable will be available with that version.

    Well, then you did not follow the advice to delete /etc/network/interfaces.d/eth0 as suggested. If the file is still there it has not been deleted. And now you have conflicting settings and things might not work as expected again...

    I did not have access to monitor/TV with HDMI input at that time so I tried to do things from a few lines of script.
    I was disconnected right away from SSH session when I executed below command
    rm -r /etc/network/interfaces.d/* so i assumed it was removed and just added reboot command.
    Could it be that I was not able to execute omv-firstaid option one and this was the reason why it was not fixed after deleting eth0?
    The above is just to list what I tried and not to contradict anyone's comments. It is working for me now, thank you for your help

    @vecnar you could try to delete /etc/network/interfaces.d/eth0 and then use omv-firstaid. It looks like this on your install (please see how I access my RockPro64 -- by name and not by number since I'm a human being and don't need to remember silly IP addresses):

    Apologies to everyone for not getting back on Friday, i am not sure why i am not getting notifications by email if someone replies to the thread (found setting in account settings>notifications) and i forgot to add calendar reminder.


    I tried deleting interface in webui, and deleting all from /etc/network/interface.d/ by executing "rm -r /etc/network/interfaces.d/*" and rebooting, it didn't work. I still had eth0 in /etc/network/interface.d/ directory after reboot.
    But after a few restarts and power offs as i was messing with sata card, now i am able to set ip address in webui. So not sure why it wasn't working before.
    I am not able to run omv-firstaid command as per my first post.
    Omv still gets ip address from dhcp server, so it can be accessed using both ip addresses and they both point to same mac address but name resolution resolves to static ip address configured, which is good.


    I am leaning towards static ip addresses, just past habit and for different reasons. The biggest one is power outage, router/firewall may take longer to boot than computer devices and static ip address gives you guarantee to connect to device especially if you are connecting from somewhere else and you need port forwarding. I am not sure if linux dhcp client tries to resend dhcp request every x minutes but from past experience when i needed to connected to device as soon as possible after power outage static ip always worked.


    I do not have problems with boot time but i tried removing it to see if it sets only 1 ip address but it is not, it sets secondary to ip address received from dhcp server.

    Hello,



    My rockpro64 with omv is getting ip address from dhcp server (internet provider modem). When i change ip in webui and click apply I get below error.


    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; systemctl start 'networking' 2>&1' with exit code '1': Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

    Below is output of "systemctl status networking.service"


    I was reading forums and one suggestion was to use omv-firstaid but when pressing enter on option no:1 I am getting bellow error. I am fine launching any other options.


    Code
    ERROR: dialog-like terminated due to an error: the dialog-like program exited with status 3 (which was passed to it as the DIALOG_ERROR environment variable). Sometimes, the reason is simply that dialog was given a height or width parameter that is too big for the terminal in use. Its output, with leading and trailing whitespace stripped, was:
    
    
    Error: Expected at least 5 tokens for --menu, have 4.
    Use --help to list options.

    Looking online I found that the issue was fixed in February release but I would like to stick with latest stable release which is 0.7.9 dated Jul 26, 2018.
    https://github.com/ayufan-rock64/linux-build/issues/306


    Code
    root@rockpro64:~# uname -a
    
    
    Linux rockpro64 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 GNU/Linux

    I tried below commands from ssh which I placed in file and made it executable, launched it but no changes.



    Bash
    #!/bin/bash
    ip addr flush dev eth0
    /etc/init.d/networking restart


    Is it possible to fix ip address change from webui in any manual way until stable release of rockpro64 will appear and i could use omv-firstaid?


    Thank you in advance for any advice

    No idea what this means but your issue is clearly hardware related (see the dmesg messages, the drive's controller is physically not available).

    Sorry if i was not clear about atx power supply testing. The issue arises when i plugin dc adapter in the socket with 240 volts and rockpro64 starts itself automatically, i do not need to press anything. I was using atx power supply to power hard drives only, but i wanted to simulate the same behavior as the other dc adapter. I am sure i am not troubleshooting it correctly that is why i am looking for some guidance steps to follow in order to findout where the actual problem is and how to resolve it.


    So does it mean sata controller is an issue that resolves itself after a few restarts under omv? It is strange that armbian doesn't have this problem and detects it. I am not familiar with arm and linux so not sure if they use the same bios like before boot process or armbian and omv use different approaches or versions.


    Do you know if anyone is using rockpro64 wih 2 x 3.5 inch drives and psu 12v 5A successfully and if yes what sata controller card?

    Have you also replaced/checked the SATA power cables? Your symptoms sound like a voltage drop on the 5V rail (SATA power cable). Some drives are fine here with as low as 4.4V, some start to have problems already at 4.75V (see this example/list but please keep in mind that there it's about 2.5" drives not comparable to your WD RED -- I don't know how sensitive they are to voltage drops since we don't use WD)

    Hello tkaiser,


    I tried posting below with a few screenshots and a log file but it was waited to be approved by moderator so i will try to put screenshots in plain text and upload full log if you need it.


    I used atx power supply sata power cables and not the ones that are attached to sbc. The only downside is that i can't power both power supplies at the same time and the issue most likely to happen when power supplies first get power from ac.
    I had it off since last night and had armbian sd card inserted. I plugged in power today and armbian recognized both drives please see dmesg output below.


    Code
    ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
    ata1.00: ATA-10 WDC "serial number", 82.00A82, max UDMA/133
    ata1.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
    ata1.00: configured for udma/133
    ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
    ata2.00: ATA-10 WDC "serial number", 82.00A82, max UDMA/133
    ata2.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
    ata2.00: configured for udma/133

    After that i powered it off, replaced sd card with omv powered it on, both hard drives were not recognized. See below dmesg errors. I issued reboot from cli but it didn't recognize hard drives, only after second "reboot" command from cli they came back.



    Code
    [    7.461809] ata2: SATA link down (SStatus 1 SControl 300)
    [    7.476399] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
    [    7.483279] ata2: irq_stat 0x00000040, connection status changed
    [    7.489419] ata2: SError: { CommWake DevExch }
    [    7.495414] ata2: hard resetting link
    [    7.501306] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
    [    7.507682] ata1: irq_stat 0x00000040, connection status changed
    [    7.513909] ata1: SError: { CommWake DevExch }
    [    7.520018] ata1: limiting SATA link speed to 1.5 Gbps
    [    7.525319] ata1: hard resetting link

    Let me know if you would like to see full dmesg output from omv.


    Could you advise the best troubleshooting plan in this situation? Every time i take hard drive cage out i move all the cables so there are too many variables in play.



    Thank you for your time

    Have you also replaced/checked the SATA power cables? Your symptoms sound like a voltage drop on the 5V rail (SATA power cable). Some drives are fine here with as low as 4.4V, some start to have problems already at 4.75V (see this example/list but please keep in mind that there it's about 2.5" drives not comparable to your WD RED -- I don't know how sensitive they are to voltage drops since we don't use WD)

    Hello tkaiser,
    I used atx power supply sata power cables and not the ones that are attached to sbc. The only downside is that i can't power both power supplies at the same time and the issue most likely to happen when power supplies first get power from ac.
    I had it off since last night and had armbian sd card inserted. I plugged in power today and armbian recognized both drives please see screenshot attached. After that i powered it off, replaced sd card with omv powered it on, both hard drives were not recognized. See screenshot of dmesg and full dmesg output from omv. I issued reboot from cli but it didn't recognize hard drives, only after second reboot command from cli they came back.
    Could you advise the best troubleshooting plan in this situation? Every time i take hard drive cage out i move all the cables so there are too many variables in play.
    Thank you for your time