Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] df does not return all drives inside the container #59

Closed
MauriceNino opened this issue May 27, 2022 · 4 comments
Closed

[Bug] df does not return all drives inside the container #59

MauriceNino opened this issue May 27, 2022 · 4 comments

Comments

@MauriceNino
Copy link
Owner

MauriceNino commented May 27, 2022

Description of the bug

Drive information is gathered using df, which returns only the root drive / inside the docker container, while it returns all drives on the host.

This should not be the case, because with --privileged, all devices should be available inside the container.

BUT - the device is actually mounted, which can be seen when using ls -la /dev

How to reproduce

Connect to the docker container and run df:

docker container exec -it CONTAINER_NAME /bin/sh -c "df"

And check that it is mounted with:

docker container exec -it CONTAINER_NAME /bin/sh -c "ls -la /dev/DRIVE_NAME"

Additional Context

I have opened a StackOverflow question with a bounty: https://stackoverflow.com/q/72517164/9150652

@MauriceNino
Copy link
Owner Author

MauriceNino commented Jun 8, 2022

If the SO question results in no answers, I will create a temporary solution where users have to mount -v /dev/:/mnt/host/ (or something similar) until this really gets resolved.

MauriceNino added a commit that referenced this issue Jun 8, 2022
there has been a problem with only the main drive being read in the usage statistics, which this
issue should fix

for #59
MauriceNino added a commit that referenced this issue Jun 8, 2022
# [3.1.0](v3.0.0...v3.1.0) (2022-06-08)

### Bug Fixes

* **api:** exclude /etc from mounts ([bb0c2aa](bb0c2aa))
* **api:** get sizes of all drives instead of just the main one ([356cacd](356cacd)), closes [#59](#59)
* **api:** read type and interface speed from host instead of container ([2f0eea4](2f0eea4)), closes [#105](#105)
* **view:** extract label function to widget ([8718f5e](8718f5e))

### Features

* **view:** add percentage to storage widget ([e2cc3fa](e2cc3fa)), closes [#104](#104)
@CyberiumShadow
Copy link

On Raspberry Pi 4, it also doesn't correctly show storage either.

@MauriceNino
Copy link
Owner Author

Hi @CyberiumShadow, thanks for reporting!
Can you post more info in a new issue, please? We already have Raspberry 4's running which show the correct info, so it would be interesting to see the log output, as well as your setup.

@MauriceNino
Copy link
Owner Author

Temporarily fixed with volume mounts. If there is a better solution, I will create a new issue for it.

alan-caio added a commit to alan-caio/healthcare-dshboard-react-node that referenced this issue Jul 28, 2022
# [3.1.0](MauriceNino/dashdot@v3.0.0...v3.1.0) (2022-06-08)

### Bug Fixes

* **api:** exclude /etc from mounts ([bb0c2aa](MauriceNino/dashdot@bb0c2aa))
* **api:** get sizes of all drives instead of just the main one ([356cacd](MauriceNino/dashdot@356cacd)), closes [#59](MauriceNino/dashdot#59)
* **api:** read type and interface speed from host instead of container ([2f0eea4](MauriceNino/dashdot@2f0eea4)), closes [#105](MauriceNino/dashdot#105)
* **view:** extract label function to widget ([8718f5e](MauriceNino/dashdot@8718f5e))

### Features

* **view:** add percentage to storage widget ([e2cc3fa](MauriceNino/dashdot@e2cc3fa)), closes [#104](MauriceNino/dashdot#104)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants