Running OMV on a (mostly) read-only filesystem

  • Hi there,


    I'm trying to build an embedded NAS device using OMV, and need to protect the microSD card from corruption during power-off, which CANNOT be done cleanly, based on the environment it is being deployed in.


    The idea is to configure the system for accessing single usb mass storage device, which will only ever be read from, and never written to. The configuration will stay as-is for as long as the device is deployed (indefinitely), to periodically access the read-only data on the usb drive, i.e. power up, grab data, power down (not clean, simply cut power).


    So, /var/run and /var/log will be set up as tmpfs (not concerned about holding onto logs). All partitions will have 'noatime' enabled (to disable any writing after reads), and swapping will be disabled (don't need it anyhow, plenty of ram available).


    Ideally, after the initial configuration, I would like to mount the root filesystem as readonly, which should fully protect the microSD card. However, is this possible when running OMV, if we don't need to change the configuration? Is there some other functionality that causes OMV to write to the root filesystem, e.g. caches or logs, and can I also point them to tmpfs or /dev/shm? If I wasn't able to run OVM on a fully read-only filesystem, perhaps there is a way to minimize writes so when they happen, they are expected (e.g. say if we did want to allow configuration changes, we would make sure the configuration write was complete before cutting the power.)


    Any insight would be appreciated!

    • Offizieller Beitrag

    The flashmemory plugin does most of this for you. Check it out. Although, I don't think you will ever get to a read only root filesystem (will probably break something in OMV).


    In OMV 3.x (debian Jessie based), you might me able to use overlayfs to overlay a read only root filesystem with a writeable filesystem. This would keep track of changes without ever changing the root. Never tried anything like that though.


    You could also install Debian then OMV using lvm. Just keep a snapshot and revert back to the snapshot after every reboot.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    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!

Jetzt mitmachen!

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