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] Incorrect storage usage #108

Closed
Zenderix opened this issue Jun 10, 2022 · 14 comments
Closed

[Bug] Incorrect storage usage #108

Zenderix opened this issue Jun 10, 2022 · 14 comments

Comments

@Zenderix
Copy link

Zenderix commented Jun 10, 2022

Description of the bug

dash. is showing the wrong used storage in the dashboard.
image

df output shows the right used storage
image

it should be more like this, so a lot more than 2.5tb...
image

my docker compose volumes:

  volumes:
    - /etc/os-release:/etc/os-release:ro
    - /proc/1/ns/net:/mnt/host_ns_net:ro
    - /media:/mnt/host_media:ro
    - /storage:/mnt/host_storage
    - /storage/torrents:/mnt/host_torrents
    - /mnt:/mnt/host_mnt:ro
    - 

How to reproduce

No response

Relevant log output

No response

What browsers are you seeing the problem on?

No response

Where is your instance running?

Linux Server

Additional context

No response

@MauriceNino
Copy link
Owner

Hello, thank you for creating an issue! Is the df run inside the container, or outside? Because the mountpoints seem off to me.

@Zenderix
Copy link
Author

Zenderix commented Jun 10, 2022

It's run inside the container. I had some leftovers from trying out things in there, here is the current setup:
image

edit: I figured out that the shown storage should be about right for /storage & my root drive, however my LVM at /storage/torrents is not showing its used storage

@MauriceNino
Copy link
Owner

Can you please run the following command in your host and paste the output?

docker container exec -it dash. /bin/sh -c 'mkdir -p /test-storage && cd /test-storage && echo \'import * as si from "systeminformation";const run = async () => { const [disks, sizes] = await Promise.all([si.diskLayout(), si.fsSize()]); console.log("Disks", disks); console.log("Sizes", sizes);}; run();\' > index.js && echo \'{"name": "test-storage","version": "1.0.0","type": "module","description": "","main": "index.js","scripts": {},"author": "","license": "ISC","dependencies": {"systeminformation": "^5.11.16"}}\' > package.json && npm i && node .'

@Zenderix
Copy link
Author

Can you please run the following command in your host and paste the output?

docker container exec -it dash. /bin/sh -c 'mkdir -p /test-storage && cd /test-storage && echo \'import * as si from "systeminformation";const run = async () => { const [disks, sizes] = await Promise.all([si.diskLayout(), si.fsSize()]); console.log("Disks", disks); console.log("Sizes", sizes);}; run();\' > index.js && echo \'{"name": "test-storage","version": "1.0.0","type": "module","description": "","main": "index.js","scripts": {},"author": "","license": "ISC","dependencies": {"systeminformation": "^5.11.16"}}\' > package.json && npm i && node .'

-bash: syntax error near unexpected token `('

@MauriceNino
Copy link
Owner

Doesn't work on bash as it seems...

Try this instead:

docker container exec -it dash. /bin/sh -c 'git clone https://github.com/MauriceNino/disk-info /disk-info && cd /disk-info && npm i && node .'

@Zenderix
Copy link
Author

Doesn't work on bash as it seems...

Try this instead:

docker container exec -it dash. /bin/sh -c 'git clone https://github.com/MauriceNino/disk-info /disk-info && cd /disk-info && npm i && node .'

/bin/sh: git: not found

ungute gschicht xD

@MauriceNino
Copy link
Owner

damn git is already installed in the dev version - last try haha:

docker container exec -it dashdot_dev_dash_1 /bin/sh -c 'apk add git && git clone https://github.com/MauriceNino/disk-info /disk-info && cd /disk-info && npm i && node .'

@Zenderix
Copy link
Author

damn git is already installed in the dev version - last try haha:

docker container exec -it dashdot_dev_dash_1 /bin/sh -c 'apk add git && git clone https://github.com/MauriceNino/disk-info /disk-info && cd /disk-info && npm i && node .'

Disks [
{
device: '/dev/sda',
type: 'HD',
name: 'ST1000LM024 HN-M',
vendor: 'Seagate',
size: 1000204886016,
bytesPerSector: null,
totalCylinders: null,
totalHeads: null,
totalSectors: null,
totalTracks: null,
tracksPerCylinder: null,
sectorsPerTrack: null,
firmwareRevision: '0001',
serialNum: '',
interfaceType: 'SATA',
smartStatus: 'unknown',
temperature: null
},
{
device: '/dev/sdb',
type: 'HD',
name: 'EARS-00Y5B1 ',
vendor: 'WDC WD10',
size: 1000204886016,
bytesPerSector: null,
totalCylinders: null,
totalHeads: null,
totalSectors: null,
totalTracks: null,
tracksPerCylinder: null,
sectorsPerTrack: null,
firmwareRevision: '0327',
serialNum: '',
interfaceType: 'USB',
smartStatus: 'unknown',
temperature: null
},
{
device: '/dev/sdc',
type: 'HD',
name: 'EZEX-08WN4A0 ',
vendor: 'WDC WD10',
size: 1000204886016,
bytesPerSector: null,
totalCylinders: null,
totalHeads: null,
totalSectors: null,
totalTracks: null,
tracksPerCylinder: null,
sectorsPerTrack: null,
firmwareRevision: '0327',
serialNum: '',
interfaceType: 'USB',
smartStatus: 'unknown',
temperature: null
},
{
device: '/dev/sdd',
type: 'HD',
name: '000-1H4168 ',
vendor: 'ST4000VN',
size: 4000787030016,
bytesPerSector: null,
totalCylinders: null,
totalHeads: null,
totalSectors: null,
totalTracks: null,
tracksPerCylinder: null,
sectorsPerTrack: null,
firmwareRevision: '0327',
serialNum: '',
interfaceType: 'USB',
smartStatus: 'unknown',
temperature: null
}
]
Sizes [
{
fs: 'overlay',
type: 'overlay',
size: 527295578112,
used: 44320841728,
available: 456114413568,
use: 8.86,
mount: '/'
},
{
fs: '/dev/sda2',
type: 'ext4',
size: 527295578112,
used: 44320841728,
available: 456114413568,
use: 8.86,
mount: '/mnt/host_media'
},
{
fs: '/dev/sdd1',
type: 'ext4',
size: 3936818806784,
used: 2702606073856,
available: 1034156703744,
use: 72.32,
mount: '/mnt/host_storage'
},
{
fs: '/dev/mapper/torrents-torrents',
type: 'ext4',
size: 1967854387200,
used: 1662309072896,
available: 205508231168,
use: 89,
mount: '/mnt/host_storage/torrents'
}
]

wouldn't be any fun if it was easy :P

@MauriceNino
Copy link
Owner

Can you try pulling the latest dev image and running that instead of prod? (docker image pull mauricenino/dashdot:dev)

@Zenderix
Copy link
Author

Can you try pulling the latest dev image and running that instead of prod? (docker image pull mauricenino/dashdot:dev)

seems to work perfectly now!

image

Besten Dank!

@MauriceNino
Copy link
Owner

Kein Problem ;)

New main release will be published tomorrow, if you want to switch back from dev, btw.

@Zenderix
Copy link
Author

Kein Problem ;)

New main release will be published tomorrow, if you want to switch back from dev, btw.

If I don't forget I'll change back tomorrow.

Sent something your way, danke nochmals aus der Steiermark :)

@MauriceNino
Copy link
Owner

Thank you, much appreciated :)

MauriceNino added a commit that referenced this issue Jun 12, 2022
# [3.2.0](v3.1.3...v3.2.0) (2022-06-12)

### Bug Fixes

* **api:** calculate network speed in relation to time diff ([55ec6b2](55ec6b2))
* **api:** match any mounts that are present at /mnt/host_* ([810e5a6](810e5a6)), closes [#108](#108)

### Features

* **view:** show error widget when static data cant be loaded ([89d9fcc](89d9fcc))
@MauriceNino
Copy link
Owner

🎉 This issue has been resolved in version 3.2.0

Please check the changelog for more details.

alan-caio added a commit to alan-caio/healthcare-dshboard-react-node that referenced this issue Jul 28, 2022
# [3.2.0](MauriceNino/dashdot@v3.1.3...v3.2.0) (2022-06-12)

### Bug Fixes

* **api:** calculate network speed in relation to time diff ([55ec6b2](MauriceNino/dashdot@55ec6b2))
* **api:** match any mounts that are present at /mnt/host_* ([810e5a6](MauriceNino/dashdot@810e5a6)), closes [#108](MauriceNino/dashdot#108)

### Features

* **view:** show error widget when static data cant be loaded ([89d9fcc](MauriceNino/dashdot@89d9fcc))
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