You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hello, I'm using the homepage dashboard on a docker container in WSL2, and on his repo he uses your package to identify disks and their sizes (among other things, but this is where I'm having a problem), and when mounting my disks through the docker compose yml and expecting them to return on his API usually only one of them returns, and it's random too, not sure how or why, that's what I'm trying to figure it out.
To Reproduce
Steps to reproduce the behavior:
In a WSL2 instance with Ubuntu (22.04.3), create a docker-compose similar to this:
version: "3.3"
services:
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
environment:
PUID: 1000
PGID: 1000
ports:
- 3000:3000
volumes:
# My windows volumes, I have three disks, so I map them as followed:
- /mnt/c:/mnt/c
- /mnt/d:/mnt/d
- /mnt/e:/mnt/e
- /config/location:/app/config # Make sure your local config directory exists
restart: always
And now, after running docker compose up -d (or just up) check the config location, there should be a widgets.yml, you can place there the mount points that were specified in the compose file, like so:
Restart the homepage container and now there should be your 3 disks at the top, showing the wrong information.
2. code snippet:
This is where his API processes the requests from the front-end, his code
3. start app / code:
You can run his code locally, but the problem here is just the container while in a WSL2 instance
4. See output/error '....'
No errors just incorrect return.
Current Output
I'll be adding the npx systeminformation info and some extra context down below.
Expected behavior
Expected that the package returned all mount points.
Environment (please complete the following information):
As you can see, when running fsSize(), only one of the disks that were mounted on my docker container returns.
And if you want to you can use the API directly, by doing something like this: http://localhost:3000/api/widgets/resources?type=disk&target=/disks/e
The text was updated successfully, but these errors were encountered:
Hey, I was having similar issue where the fsSize wouldn't return the expected mountpoints. It also was seemingly random as sometimes it will correct points, while other times it wouldn't. So I decided to investigate and found the culprit to be this if statement right here https://github.com/sebhildebrandt/systeminformation/blob/master/lib/filesystem.js#L99.
Because the order of lines from df command isn't as reliable, if you end up in a situation where a same type and fs but different mount point, it would be filtered out here.
Random order can be observed in these screenshots taken before and after rerunning container
My desired mount point /mnt/root/home was missing from the fsSize output in first scenario but was present in second.
Please lemme know if you want me to PR a fix by removing the said check or by adding a mount point equality as well.
Crec0
added a commit
to Crec0/docker
that referenced
this issue
Mar 4, 2024
Describe the bug
Hello, I'm using the homepage dashboard on a docker container in WSL2, and on his repo he uses your package to identify disks and their sizes (among other things, but this is where I'm having a problem), and when mounting my disks through the docker compose yml and expecting them to return on his API usually only one of them returns, and it's random too, not sure how or why, that's what I'm trying to figure it out.
To Reproduce
Steps to reproduce the behavior:
And now, after running
docker compose up -d
(or just up) check the config location, there should be awidgets.yml
, you can place there the mount points that were specified in the compose file, like so:Restart the homepage container and now there should be your 3 disks at the top, showing the wrong information.
2. code snippet:
This is where his API processes the requests from the front-end, his code
3. start app / code:
You can run his code locally, but the problem here is just the container while in a WSL2 instance
4. See output/error '....'
No errors just incorrect return.
Current Output
I'll be adding the
npx systeminformation info
and some extra context down below.Expected behavior
Expected that the package returned all mount points.
Environment (please complete the following information):
CPU: i5-11400
RAM: 8GB 3200
GPU: 4060Ti 8GB
Disks: 2 SSDs, 1 HDD
To get all needed environment information, please run the following command:
Additional context
I created just a small snippet with the following code, so I can return the disks, like he does on his API.
As you can see, when running
fsSize()
, only one of the disks that were mounted on my docker container returns.And if you want to you can use the API directly, by doing something like this:
http://localhost:3000/api/widgets/resources?type=disk&target=/disks/e
The text was updated successfully, but these errors were encountered: