• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write to usb Drive from container
Sorry to again bother you with this topic.
I encountered a strange problem with the memory on the netPi.
I use a program that periodicly saves data to a usb stick by using the runtime privileged /dev/sda1 settings and on start mounting the container on to tmp/mydrive.
If i save to the usb stick the storage space usage percentage in the control panel grows over time and stays even when stopping the container. The storage space usage drops back to the start when removing the container. Meanwhile neither the image size nor the files inside the container checked with # du -a change, except on the mounted device, where the data is saved, which when removed and cleared does not change the storage space percentage.
By running the exact same program on the RPI3 with:
docker run -t -i --privileged -v /dev/sda1:/dev/sda1 imagename
the size does not grow on my system.
Is there some way to see the size of a running or stopped container, like the size displayed by docker ps -s?
Hello Sebastian,

I know where this effect is coming from.

Please do the following. In the netPI web GUI of Docker you can click to your container and you can click then as next also to a link named "!Log". If you click it you see the log file generated by Docker of all the console outputs your container has ever done.

So if your container is doing an "echo" command for example you will see it in the log file. So if you have a container now that does many many outputs for debug purposes the log file grows and grows and grows and fills the main SD memory. In the current firmware version or lower we do not limit the log file. The log file will be deleted only at the time the container is restarted.

In the next version of netPI software we will be inserting a limit of 1 MByte in future for a log file per container and then it starts as a cyclic buffer overwriting the old values. But until we have the new version ready, the only chance you have is to disable of console outputs of your container. Then there is no logging and no SD memory card filling.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

Thank you for the answer. This will fix my problem, will just remove unnescessary prints.

Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] Portainer does not start container Steres 3 201 October-16th-2018, 06:54 PM
Last Post: Armin@netPI
  [SOLVED] USB Serial device mapping into Container hannes 12 583 August-27th-2018, 04:50 PM
Last Post: Armin@netPI
  using of a USB memory stick inside a container for share Michael_d 2 112 March-3rd-2018, 06:19 PM
Last Post: Michael_d
  Container IP address - Network Options kimsmyth 2 163 January-30th-2018, 11:04 AM
Last Post: kimsmyth

Forum Jump:

Users browsing this thread: 1 Guest(s)