Docker on SD card

  • I have OMV5 running on a Raspberry Pi now.
    So I'm wondering about whether I should leave the docker storage location as default (/var/lib/docker) or should move it to an external disk.
    Storage shouldn't be an issue as I will bind all bigger amounts of data created by any containers to an external disk.
    I'm just wondering if there are a lot of writes to the sd card by portainer etc., so that it will noticeably decrease its lifetime?

  • Before doing this, you might want to put a delay to startup your docker by 30 seconds.


    Afterwards, you can move your contents to your usb drive. I created a share and dump the data into /sharedfolders/<your shared folder name>/docker…other-location-on-ubuntu/

    I followed these instructions here. However, before this, you might want to go to OMV portal, go to System -> OMV-Extras, remove /var/lib/docker in "Docker Storage" so it will reference the /etc/docker/daemon.json file.

  • Thanks for the tips.
    Well I would have the possibility to move docker to an external SSD.
    I just don't know if this makes things any better.
    I read that over USB there is no TRIM available...
    So if this just going to decrease the lifetime of my SSD I'd rather have it on my SD card, this way I could also backup everything in one go.
    I want to use my HDD for data only so that it is able to spin down when not in use.

  • The wear leveling on a SSD is much better than on a SD card. This means that it is perfectly fine to use a SSD for dockers with metadata databases and so on. This is a perfect use of a SSD both for longevity and for performance reasons But if you do the same with a SD card the SD card can be expected to fail soon.

    One way to improve the longevity of the SD card could be to overprovision. For instance only use 8GB of a 64GB or 128GB SD card. Then even the simple wear leveling on the SD card could be expected to help with the life of the SD card.

    StarTech has a number of USB enclosures that support TRIM:…s/?filter_TRIMSUPPORT=Yes

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • Will you share, please?

    I'm using this enclosure, simply because it was the cheapest (notice the 20% discount code right now [German Amazon]).
    Basically any enclosure that has the Jms578 chipset will work, maybe there are other chips too idk.
    And they are quite a bit cheaper then the StarTech ones :D
    Although thanks for the info @Adoby
    Yes performance is why I wanted to use the SSD in the first place.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!