New approach for Raspberry Pi OMV images

  • New OMV image for Raspberry Pi 2, 3 and 4!

    Important:

    • This image is not compatible with single core Raspberries (A, B, A+, B+, Zero, Zero W) since they're too slow anyway and their CPU architecture is not supported any more (it's not based on Raspbian any longer but on upstream Debian 'armhf' branch which supports ARMv6 architecture not any longer)
    • For satisfying results burn it only with Etcher (no need to decompress, Etcher will verify burning process and save you from some common SD card troubles). It's strongly recommended to always test your SD card with either F3 or H2testw first to check for counterfeit/broken cards.
    • On first boot OMV installation will be finished. This requires your RPi being connected to network/Internet and might take between 30 and 60 minutes (depends solely on the random write speed of your SD card). After installation is finalized the Raspberry will reboot automatically and can then be used. Be patient please and in doubt watch the green led for activity.
    • Flashmemory plugin is enabled and monitoring is disabled to reduce wear on SD card (for reasons see here)
    • A quick guide to do initial Wi-Fi setup has been added to the end of the thread.
    • RPi 3+ users please read here at the end of the thread.
    • RPi 4 users are not affected by the inferior NAS performance of former RPi iterations. The RPi 4 is in fact the first Raspberry Pi suitable for a NAS


    While this image uses upstream Debian repositories it is configured to fetch kernel/bootloader directly from official archive.raspberrypi.org repositories and also some proprietary binaries to deal with VideoCore IV (eg. vcgencmd, raspivid and others).


    Not so important (but still worth a read!):

    • This image does some 'health logging' in /var/log/raspihealth.log. On every shutdown there will be a single line logged that is either a timestamp plus a single zero (0) or a timestamp plus a bunch of digits. If the most left of these digits are a 1 instead of 0 your Raspberry either overheats or is powered insufficiently or both. If you run in instabilities please always check this first
    • There's /usr/local/sbin/raspimon included. This tool executed via SSH as 'sudo raspimon' reports real CPU clockspeeds by asking the firmware and also reports throttling, under-voltage and as a result the firmware doing 'frequency capping' (reducing all clockspeeds to save you from underpowering hassles negatively impacting performance). For a more detailed explanation please see here.
    • If you experience troubles you can always execute in a terminal 'sudo armbianmonitor -u' which will try to upload debug info to an online pasteboard service (RPi 3 B+ example here). It's a great idea to check the output yourself and at least to provide the URL if you ask for help in the forum.
    • The image resizes the rootfs automagically to ~7.3GB on first boot and creates a 3rd partition using the remaining space of the SD card you need to initialize manually if you want to use it for OMV shares ('mkfs.ext4|mkfs.btrfs /dev/mmcblk0p3')
    • While this OMV image looks like Armbian it's not (no support from Armbian team or in Armbian forum). We only chose the proven way to use Armbian's build system to generate OMV images for ARM boards now for Raspberries too (technically inclined people should look at the bottom of this post what is different)

    Please always keep in mind that on cheap single board computers like Raspberries the most common problem sources aren't software related but powering and/or SD card troubles. Please always check this first before reporting problems (see above for under-voltage detection, how to ensure to write OMV to SD card properly and if you report problems how to provide a debug log!)


    Technical details (nerd stuff!):

    • The rootfs of this image has been created fully automated by Armbian's build system on 12-Jun-2017 for a different ARMv7 device (fully automated means debootstrapped from scratch so no one ever logged in so far)
    • It has then been combined with an RPi image skeleton based on pi64 project and contains both a 64-bit 4.11 mainline kernel (inactive by intention) and latest official RPi 4.9.80 as the active 32-bit kernel (since this kernel variant will be updated through an apt repo so security fixes that require kernel updates aren't an issue). If you're adventurous you can transform this image into something that runs true 64-bit ARMv8 software on an RPi 3 (don't ask for support, better check out pi64 instead)
    • Since this OMV image has been created by Armbian's build system it contains a lot of Armbian utilities. Most of these aren't supported and must not be used. Only exception: 'sudo armbianmonitor -u' to provide a debug log.
    • /etc/update-motd.d/10-header has been changed to output the RPi model at login: BOARD_NAME="$(/usr/bin/awk -F" " '{print $1$2" "$3}' </proc/device-tree/model)"
    • Two more Armbian specific login hints below /etc/update-motd.d/ have been removed
    • /etc/apt/sources.list.d/armbian.list has been removed so you won't receive any Armbian updates
    • /etc/armbian-release has been manually adjusted to mark this image being unsupported and made for Raspberries
    • /etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service renamed to reflect the fact that it's tty1S0 on Raspberries
    • /etc/hostname has been set manually to 'raspberrypi'
    • /etc/rsyslog.d/raspberrypi.conf included to filter out some annoying log messages
    • /etc/fstab is the standard Raspbian one (you might want to change / mount options to 'defaults,noatime,nodiratime,commit=600,errors=remount-ro' to reduce SD card wear out if you can ensure that your RPi is powered appropriately)
    • timezone is set automatically on first boot via tzupdate (not yet reflected in OMV UI)
    • Minor RPi specific logging/monitoring improvements
    • Everything else is from an Armbian armhf userland made for a ASUS Tinkerboard with some Raspberry specific additions below /lib/modules/ and /lib/firmware/
    • The changes are contained/documented in a repository
  • How to interpret /var/log/raspihealth.log?


    This log gets written every time the Raspberry Pi shuts down. It contains a timestamp and then either a single zero (everything ok), 19 zeroes ('0000000000000000000' --> still everything ok) or a mix of 1 and 0 (problems occured).


    The meaning of these bits as follows:


    Code
    1110000000000000010
    |||             |||_ under-voltage
    |||             ||_ currently throttled
    |||             |_ arm frequency capped
    |||_ under-voltage has occurred since last reboot
    ||_ throttling has occurred since last reboot
    |_ arm frequency capped has occurred since last reboot

    On Raspberries starting with model A+ and B+ there's under-voltage detection circuitry implemented triggering an alert via a GPIO pin toggled when the firmware detects input voltage dropping below 4.65V. If the under-voltage lasts longer the firmware decides to do 'frequency capping' (reducing clockspeeds of CPU cores, GPU/VPU and DRAM, also support voltages will be lowered).


    The reason is always the same: Insufficient PSU (cheap charger or a good one showing aging effects in the meantime) or insufficient cabling (99% of all USB cables suffer from this since they've tiny power wires with a resistance way too high). If this happens then you risk instabilities and when frequency capping occurs your Raspi performs way lower than it could. Run 'sudo raspimon' if in doubt.


    The other issue is thermal throttling / overheating. If this happens consider applying a heatsink. In tiny enclosures it might even be necessary to add a fan (or choose a better enclosure with some vents). Run 'sudo raspimon' if in doubt.

  • And a quick elaboration on how raspimon can be used to detect powering problems. In the following I used two different cables between my 5V/2A PSU and my Raspberry. The first is a a Micro USB cable I bought in a set with very low resistance (search for 20AWG on amazon.com for example), the second is an average Micro USB cable I found in the drawer.


    I used a somewhat heavy benchmark that is able to generate a lot of heat and consumption: cpuminer (the great thing with cpuminer is the benchmark mode so you really see when your Raspberry starts to behave strange either by frequency capping as below or if it starts to overheat. Since then the displayed khash/sec rates get lower).


    Test with the good 20AWG rated cable: I get 4.6 khash/s on average, the CPU cores clock with real 1200 MHz and the Vcore voltage gets increased to 1.325V. No under-voltage and frequency cap happened:



    Now repeating the test this time using the 'average' Micro USB cable. Now I get only 2.4 khash/s on average, the CPU cores stay at 600 MHz all the time (while /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq is telling you at the same time the CPU would run at 1200 MHz! Raspberries cheat on you when powering goes wrong) and the Vcore voltage also remains at 1.2V all the time. That's the result of the 'firmware' detecting huge voltage drops and therefore lowering clockspeeds and voltage everywhere:



    The funny (or sad) part here is that you need tools like raspimon to get a clue what's going on since cpufreq drivers report wrong numbers while in reality the firmware chose to clock everything down to the minimum. If you operate your Raspberry with a connected display that's the yellow lightning bolt appearing in the upper right of the screen. But most OMV installations will run headless and the lightning bolt is just the equivalent to actual under-voltage happening. With raspimon and /var/log/raspihealth.log we have also the ability to detect these situations when they happened in the past between last reboot and now.

  • And a final one to close this chapter: With regard to overheating / thermal problems raspimon can also help since unfortunately on RPi 2 and 3 /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq is again not telling the truth once throttling occurs: On both RPi 2 and 3 the highest allowed clock speed will be shown under load (900 MHz by default on RPi 2, 1200 MHz on RPi 3) while in reality the real clockspeed is already lower once the throttling treshold is exceeded (80°C by default).


    I let cpuminer ran a few minutes and the 4.6 khash/s turned into just 3 khash/s after 5 minutes since the Pi got hotter and hotter and therefore the firmware lowered the real clockspeed constantly once the 80°C have been exceeded:

  • And another small update, this time wrt Wi-Fi. Since we're running an Armbian userland we can make also use of some Armbian functionality. Since I have a few wireless IoT sensors here (OPi Zero and NanoPi Air) I wanted to setup an own 'IoT Wi-Fi' truly separated from my normal Wi-Fi.


    One single step needed on a RPi 3: 'sudo armbian-config' --> Hotspot --> NAT (you could also choose 'Bridge' instead but I wanted NAT by intention)


    Everything else happens in the background (installing and setting up dnsmasq and routing/filtering) and afterwards there's a new wireless network called 'ARMBIAN' with default passphrase '12345678' on channel 5 available (you need to change this immediately in /etc/hostapd.conf of course).



    On my RPi 2 I tested the same with two dual-band/dual-antenna Wi-Fi sticks. The cheap one based on Ralink RT5572 worked out of the box (driver and firmware included), the more expensive one featuring RTL8812AU (802.11ac) needed an out of tree driver I chose to install via DKMS:

    Please note that for powerful wireless dongles you need a stable 5V/2A power source that does not suffer from voltage drops and on a RPi 2 you have to define 'max_usb_current=1' in /boot/config.txt to allow 1200mA available at the USB ports and not just the default 600mA (all USB ports share this limit!)

    • Offizieller Beitrag

    @tkaiser, as always, great work. Thanks for doing this even though I know you are not a fan of the RPi. I'll buy you a beer sometime :)


    Just tested the new image and it works (and upgrades) fine. I didn't run into any issues. Uploading to sourceforge now.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • Thanks for doing this even though I know you are not a fan of the RPi

    Raspberries are great devices for certain use cases (just not NAS/OMV ;) ) but since we were able to identify/develop a lot of useful OMV/ARM tweaks the last months and we could rely on an automated build by using Armbian it was not that much of an effort to make this useable on Raspberries too.


    To be honest: most of my time spent on this RPi image was related to under-voltage detection/reporting since this is something almost every RPi user is affected from but nobody notices especially on headless Raspberries (since the 'firmware' does such a great job hiding the problem). So I hope awareness is slowly rising and people check /var/log/raspihealth.log and raspimon output if running in troubles or their setup performing extremely poor.


    Anyway: abandoning Raspbian and switching to true Debian should help with support issues (avoiding dependency issues) and using the same base as with all other ARM boards should help also with performance (as already said: not that important on Raspberries since here the main bottleneck is the single USB2 bottleneck between SoC and the outside and everything having to share bandwidth)


    I downloaded the archive from SF, uncompressed it and can confirm MD5 hash of uncompressed image is correct: 4adfa95b7bfbf08049176df358abc4ac :)


    And a final note: The RPi image will install three packages from https://archive.raspberrypi.org/debian/ on first boot: raspberrypi-bootloader, libraspberrypi-bin and raspberrypi-kernel. This is a lot of stress for the SD card and might take some time so there's some patience needed until the RPi reboots and can be used afterwards. If users try this with really crappy, broken or counterfeit SD cards most probably OMV won't start after the reboot since filesystem is already corrupted. This will save these users a lot of time they would otherwise waste with installing OMV again and again. Just to keep in mind for support questions: if it doesn't work at all then most probably it's the SD card that needs to be replaced (some recommendations).

  • Hey,
    I can confirm RPi 2 is ok with this new image.
    After 1st automatic reboot, date/time set up with the OMV webgui, then system update with "update management" menu, success. Rename the machine raspberrypi > newname + domain.lan
    Changing root password with : passwd root
    Reboot.


    But :
    1. where is /dev/mmcblk0p3 ? "fdisk -l" showing those 3 partitions on sdcard... no problem. But webgui doesn't showing, so there's no way to use it as storage.
    2. previous webgui size was smaller, it was easiest to read more informations on the webpage (not very important ;p only my opinion !)

    • Offizieller Beitrag

    previous webgui size was smaller, it was easiest to read more informations on the webpage

    It is a new theme. There is a way to switch to the old theme - read

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

    Einmal editiert, zuletzt von ryecoaaron ()

  • where is /dev/mmcblk0p3

    Quoting the readme.txt on Sourceforge download page: 'A third partition for data use will be automatically resized on first boot but you have to format it manually with the fs of your choice!' and quoting first post above:

    • The image resizes the rootfs automagically to ~3.7GB on first boot and creates a 3rd partition using the remaining space of the SD card you need to initialize manually if you want to use it for OMV shares ('mkfs.ext4|mkfs.btrfs /dev/mmcblk0p3')

    So yes, it requires manual interaction and a decision: not using remaining space is a valid option since it increases longevity of your SD card. A lot of users fear SD cards wearing out too fast and this is one of the strategies to fight this.


    Since we're talking about running this image now with at least kernel 4.9 using btrfs (with transparent file compression) is possible so I thought it would be a better idea to encourage users to think what to do with the 3rd partition. Eg. mounting it as /var/log with btrfs and compress-force=zlib logfiles 40GB in size will fit easily on a 4 GB partition.


    Out of curiousity: Can you please provide output from 'sudo armbianmonitor -u' please after checking the debug info yourself (stuff like IP addresses should already be somewhat obfuscated).

  • About partitions :
    with ssh, as root :
    mkfs.ext4 /dev/mmcblk0p3
    reboot


    If you want to check :
    Tuned /etc/fstab (before using 3rd partition) as described on the documentation, final result (after adding 3rd part°) is :


    # cat /etc/fstab
    proc /proc proc defaults 0 0
    /dev/mmcblk0p1 /boot vfat defaults 0 2
    /dev/mmcblk0p2 / ext4 defaults,noatime,nodiratime 0 1
    #/var/swap none swap sw 0 0
    tmpfs /tmp tmpfs defaults 0 0
    # >>> [openmediavault]
    /dev/disk/by-id/mmc-SD16G_0xda76ad94-part3 /srv/dev-disk-by-id-mmc-SD16G_0xda76ad94-part3 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,discard,acl 0 2
    # <<< [openmediavault]


    ~# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/root 3.6G 1.5G 1.9G 44% /
    devtmpfs 481M 0 481M 0% /dev
    tmpfs 486M 0 486M 0% /dev/shm
    tmpfs 486M 6.9M 479M 2% /run
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 486M 0 486M 0% /sys/fs/cgroup
    tmpfs 486M 0 486M 0% /tmp
    /dev/mmcblk0p1 63M 26M 37M 41% /boot
    folder2ram 486M 3.7M 482M 1% /var/log
    folder2ram 486M 0 486M 0% /var/tmp
    folder2ram 486M 416K 486M 1% /var/lib/openmediavault/rrd
    folder2ram 486M 1.2M 485M 1% /var/spool
    folder2ram 486M 9.8M 476M 3% /var/lib/rrdcached
    folder2ram 486M 8.0K 486M 1% /var/lib/monit
    folder2ram 486M 4.0K 486M 1% /var/lib/php5
    folder2ram 486M 0 486M 0% /var/lib/netatalk/CNID
    tmpfs 98M 0 98M 0% /run/user/0
    /dev/mmcblk0p3 11G 41M 9.9G 1% /srv/dev-disk-by-id-mmc-SD16G_0xda76ad94-part3

  • command "armbianmonitor -u" result
    http://sprunge.us/WWVd

    Thank you!


    For you and other users/mods wanting to understand how to deal with this debug output: The first thing I always do is searching for '### Installed packages:' at the bottom of the log. This lists all installed OMV packages, below starting with '### Current sysinfo:' the avg-cpu values shows what the CPU has done since last reboot (unusual high %iowait values always indicate a problem, eg. an SD card dying) and further below there's swap/memory information and finally last 250 lines of most recent dmesg output.


    If we scroll in the other direction starting from '### Installed packages:' we get IRQ affinity (not worth a look on Raspberries since most IRQs will be spent on the single USB2 port anyway), then there's 'df -h' output as well as /proc/partitions and some information that usually should help nailing down most problems pretty fast. Normally only the bottom part of this log is interesting. A logrotate rule is configured so to get really old info one has to check archived logs: /var/log/armhwinfo.log.*

  • massive thanks from me. The new image/approach is really great and working well.

    You're welcome and many thanks for you continually reporting issues (even 'cosmetic' ones) since this helped improving user experience with the new RPi OMV image a lot.



    when can you do the same for my crappy Banana Pi M2U?

    Never. Same with any other more recent Banana crap like the 'Raspberry Pi 3 killer' (LOL!) called 'M2 Berry'. References:

    I've never had to deal again with a SBC vendor behaving that ignorant/stupid (they even refuse to fix security or instability issues they get for free from community as pull requests on github which would take them just seconds, that's just INSANE!). Will never waste time with any of their boards again since they proofed that they're not able or willing to improve. They still fail the same way they failed 2.5 years ago but in the meantime they even improved in failing and now behave just like brain damaged retards also deleting/censoring posts in their own forum that could help their users and them to understand issues. It's a shame.


    BTW: NAS performance of these Banana thingies is higher than Raspberry's but still crappy even with 'native SATA': https://forum.armbian.com/inde…findComment&comment=34192

  • hahaha. I know. The banana pi people are a joke. Totally poor support and generally incompetent.


    The community is ok though. I have managed to update the kernel to 3.10.107, fix the memory issues causing instability and have installed OMV. It seems to be running OK but i'm not prepared to use it instead of my RPi.


    I bought the banana pi from Aliexpress so it was cheap. Tried to return it but BPI people (vendor on Aliexpress) refused to accept the return but that's another story.


    I think my next purchase will be a Rock64. They look good as a low cost NAS (USB3 + Gbit network).


    All the best and thanks again.

  • The banana pi people are a joke. Totally poor support and generally incompetent.


    The community is ok though.

    http://forum.banana-pi.org/t/b…-bpi-m2u-sd-emmc-img/3306


    If the 'jata' account belongs to you then I tried to help you over there in the past already (me being the Charles guy -- as soon as the 'sinovoip team bpi' guy realized that 'charles' is 'tkaiser' he started to immediately ban my account as usual and deleted over 50 of my posts, see the beginning of the comment thread where @jata seems to talk to himself).


    I also helped @facat to solve the instability problems and so on. @Tido and me didn't gave up on this weird company for over two years fighting against their ignorance/stupidity but since the Banana CEO officially announced they're happy with behaving like brain damaged retards it's ok now. No one can help them.

  • To define a use case, one would have to define what a NAS is. In my opinion (and those of who defined the acronym) the traditional NAS is Network Attached Storage

    Exactly. NAS is Network Attached Storage by definition. Using a Raspberry for this is also defined as ISNAS (Insanely Slow Network Attached Storage). That's the point: Raspberries are bottlenecked by their single USB2 connection to the outside and everything having to share bandwidth. If you've already lying a RPi around of course you can make a dog slow NAS out of it. But if you're thinking about buying an inexpensive and energy efficient ARM device to be used as NAS NEVER choose a Raspberry since it's always the worst choice possible.


    A lot of performance numbers can be found over at Armbian forum where the journey started to provide new, performant, stable and unified OMV images for ARM devices: https://forum.armbian.com/inde…ges-for-sbc-with-armbian/


    Even a $7 Orange Pi Zero or a $10 NanoPi NEO is able to outperform any Raspberry Pi. But as already said: If the device is already there just use it as (very slow) NAS. But don't think about Raspberries if you want to buy something new to be used with OMV.


    BTW: Raspberries are really great due to the large community around. Even Raspberry Pi used as DAS (Directly Attached Storage) for other vintage hardware is possible in the meantime: http://www.geocities.jp/kugimoto0715/rascsi/


    That being said and still speaking about 'vintage': Raspberry Pi featuring only Fast Ethernet (sharing bandwidth with all other USB devices!) is stepping back two decades ago if it's about performance. See below for some anecdotical stuff when Fast Ethernet was 'new' back then.


    But it's 2017 now. When we want to use energy efficient and inexpensive NAS devices these days there are a lot of options. Gigabit Ethernet SBC start at around $15-$20 w/o shipping/VAT/customs (NanoPi NEO 2 or Orange Pi PC 2), we can choose ARM boards that perform just like x86 NAS when we want to rely on USB3 (starting at $25 in ROCK64's case again w/o shipping/VAT/customs) and with reliable storage connections and same high NAS performance we're talking about 50 bucks (see ESPRESSOBin which will soon be fully supported by OMV).


    TL;DR: Using a RPi 2 or 3 as OMV device is ok if you neither care about performance nor reliability. In the meantime there are a lot of other energy efficient and inexpensive ARM devices around that are way more suitable for OMV. But if you want your Raspberry Pi serving as NAS please feel welcomed, use our latest OMV image and check both /var/log/raspihealth.log and /usr/sbin/raspimon output if problems occur or you think your RPi behaves too slow.

  • Small performance update: From time to time some people try to convince me that using DietPi is the way to go at least with Raspberries since 'diet, lightweight, fast, optimized, $insert-your-favourite-marketing-BS-here'. Since my work with ARM devices the last years was concentrated on low-level stuff like optimized settings (both consumption and performance), kernel (again settings and security) and security in general and I see not a single of these aspects covered by DietPi I'm somewhat skeptical.


    The results of my DietPi tests in the past weren't that great (tried it first on an Orange Pi PC and there DietPi performance was disastrous due to stupid thermal/dvfs settings) but since someone told me DietPi would be magic also for NAS use cases and I had my RPi 3 running today to test through other stuff I simply tried it out.


    This time only installing Samba since I found no 'convenient' way to install Netatalk within DietPi (the whole purpose of this distro is to guide clueless people with menu driven tools so I didn't want to mess with 'apt install' or anything else everyone able to read is able to execute). Default settings used with both DietPi and OMV. Also same SD card, same 2.5" HDD in same enclosure, same RPi 3 with same PSU and USB cable.


    DietPi first (based on Raspbian, ARMv6 packages, obviously no tweaks like IO optimized ondemand cpufreq governor settings, no IO scheduler class/priority tweaking, most probably also no IO scheduler optimizations):

    Now OMV (based on Armbian, ARMv7 packages, Armbian tunables set and the additional tweaks we developed within the last 4 months over there:(

    As expected settings matter. I also tried quickly 'Lightweight justice for your Odroid' (WTF? Justice?) that means DietPi for ODROID-XU4, again wasted a few minutes with DietPi's countless reboots and nag screens, let Samba install and fired up a quick LanTest. Pulled the plug when seeing 53MB/s sequential write. No thanks, I think I'll still prefer distros/images that take care of kernel and settings and will stay away from marketing BS like 'diet', 'lightweight' and so on... settings matter. It's really that easy.

Jetzt mitmachen!

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