Openhab 2.5.0 docker container spins up all my hdds

  • Platform information:
    • Hardware: Standard x86-64 CPU (Intel)/16GB/Several SSD/HDDs
    • OS: debian 9.5, openHAB is running in a Docker container, standard openHAB image 2.5.0
    • Java Runtime Environment: from Docker container
    • openHAB version: 2.5.0

I recently discovered that my hard drives are always active and are not spinning down anymore.
I tried to investigate further: I manually spun down all my hard drives with hdparm -y /dev/sd* and as soon as I restart the docker container, all my hard drives spun up again.
I tried to check the disks access with inotifywatch, but I was not able to find any event on the hard drives:

inotifywatch -v -e access -e modify -r /media/hdd1to
Establishing watches...
Setting up watch(es) on /media/hdd1to
OK, /media/hdd1to is now being watched.
Total of 279 watches.
Finished establishing watches, now collecting statistics.
^CNo events occurred.

In my openHAB docker-compose file, all the volumes that I use are either on an ssd, or in a ramdisk, no volume is using a hard disk.

    container_name: openhab
    image: 'openhab/openhab:2.5.0'
    restart: always
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - ./openHAB/volumes/addons:/openhab/addons
      - ./openHAB/volumes/conf:/openhab/conf
      - ./openHAB/volumes/userdata:/openhab/userdata
      - /media/ramdisk/OpenhabLogs:/openhab/userdata/logs
      - ./openHAB/volumes/socat/socat-ttyNET0.conf:/etc/supervisor/conf.d/socat-ttyNET0.conf
      - ./openHAB/volumes/socat/socat-ttyNET1.conf:/etc/supervisor/conf.d/socat-ttyNET1.conf
      - ./openHAB/volumes/socat/socat-ttyNET2.conf:/etc/supervisor/conf.d/socat-ttyNET2.conf
      - domotique
      - multimedia_multimedia
      - "8080:8080"
      - "5555:5555"
      - "5007:5007"
      - "8101:8101"
      USER_ID: "472"
      GROUP_ID: "472"
      CRYPTO_POLICY: "unlimited"
    mem_limit: 2048M

How can I find why my disks are spinning up when I use openhab, and why they do not spin down anymore when the openHAB container is active?

This is controlled by Docker, not the container. You need to go ask on a Docker forum. You’re unlikely to find anyone here who can answer.

One thing to keep in mind is that the files inside the container are stored in /var/lib/docker/containers. Any writes done inside the container that are not to mounted volumes will get made to there. Maybe that folder is on an HDD?

The containers are stored on the SSD.
I am running 21 docker containers on this machine and I only have this behaviour with openhab. That’s very stange! I am facing this since openHAB 2.5.0. With openHAB 2.4 I did not have this issue.
I will however try to ask on a Docker forum.

All of that is abstracted away from the container. That’s part of the whole point. Except for /var/lib/docker/containers the only thing the container can see is what you pass into it as a volume. The container shouldn’t be able to even be aware of your HDDs let alone cause them to spin even if it wanted to, unless you somehow pass the HDDs into the container, which you are not doing.

It has to be a Docker issue.