MauriceNino / dashdot

A simple, modern server dashboard, primarily used by smaller private servers
https://getdashdot.com/
MIT License
2.67k stars 102 forks source link

[Bug] Storage widget showing strange/unused volumes #218

Closed radiochild577 closed 2 years ago

radiochild577 commented 2 years ago

Description of the bug

RAID volumes only shows correctly when using --privileged, otherwise it duplicates the storage amount and shows each RAID HD as a separate volume and doubles the size. Not a big deal as I can use the --privileged flag to fix this, but would rather not use that unless it's the only way for RAID storage to show correctly in the widget.

Also, in the last few releases my storage widget has started showing an excess amount of mounted volumes (nbd0 SSD through nbd15 SSD, all with 0.0 B size). It never did this previously until a few versions ago, can't remember which one it started on. I've tried all the various ways in the docs to filter these out but can't find a way that works. Would it be possible to add a filter by size so I can filter out anything less than a byte?

How to reproduce

No response

Relevant log output

No response

Info output of dashdot cli

docker exec dashdot yarn cli info
yarn run v1.22.19
$ node dist/apps/cli/main.js info
INFO
=========
Yarn: 1.22.19
Node: v18.6.0
Dash: 4.3.3

Cwd: /app
Hash: b83389f8890239fc36b479ccb8a2d6cfb44dd15c
In Docker: true
In Podman: false
In Docker (env): true
Done in 2.81s.

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Where is your instance running?

Linux Server

Additional context

No response

MauriceNino commented 2 years ago

Hey thanks for the issue! Can you please post the output of the following command:

docker exec CONTAINER yarn cli raw-data --storage

If you have time, it would help if you could post the output for both, with the --privileged flag and without it.

radiochild577 commented 2 years ago

With --privileged:

Output ``` docker exec dashdot yarn cli raw-data --storage yarn run v1.22.19 $ node dist/apps/cli/main.js raw-data --storage Disk Layout: [ { device: '/dev/sda', type: 'HD', name: 'WDC WD30EFRX-68E', vendor: 'Western Digital', size: 3000592982016, bytesPerSector: null, totalCylinders: null, totalHeads: null, totalSectors: null, totalTracks: null, tracksPerCylinder: null, sectorsPerTrack: null, firmwareRevision: '0A82', serialNum: '', interfaceType: 'SATA', smartStatus: 'unknown', temperature: null }, { device: '/dev/sdb', type: 'HD', name: 'WDC WD30EFRX-68E', vendor: 'Western Digital', size: 3000592982016, bytesPerSector: null, totalCylinders: null, totalHeads: null, totalSectors: null, totalTracks: null, tracksPerCylinder: null, sectorsPerTrack: null, firmwareRevision: '0A82', serialNum: '', interfaceType: 'SATA', smartStatus: 'unknown', temperature: null } ] FS Size: [ { fs: 'overlay', type: 'overlay', size: 2950040084480, used: 957712490496, available: 1977325387776, use: 32.63, mount: '/' }, { fs: '/dev/md0', type: 'ext4', size: 2950040084480, used: 957712490496, available: 1977325387776, use: 32.63, mount: '/etc/resolv.conf' } ] Block Devices: [ { name: 'nbd0', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd1', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd10', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd11', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd12', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd13', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd14', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd15', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd2', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd3', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd4', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd5', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd6', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd7', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd8', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd9', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda', type: 'disk', fsType: '', mount: '', size: 3000592982016, physical: 'HDD', uuid: '', label: '', model: 'WDC WD30EFRX-68E', serial: '', removable: false, protocol: 'sata', group: undefined }, { name: 'sdb', type: 'disk', fsType: '', mount: '', size: 3000592982016, physical: 'HDD', uuid: '', label: '', model: 'WDC WD30EFRX-68E', serial: '', removable: false, protocol: 'sata', group: undefined }, { name: 'sda1', type: 'part', fsType: 'ext4', mount: '', size: 298844160, physical: '', uuid: '51d5e887-ee3e-4a53-afa6-8825e0a942ce', label: 'UTOSDISK', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda2', type: 'part', fsType: 'linux_raid_member', mount: '', size: 2047868928, physical: '', uuid: '99bb51de-9f94-23d8-98af-dd3c3dfa2217', label: 'TNAS:UTOSCORE-X86-S64', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda3', type: 'part', fsType: 'linux_raid_member', mount: '', size: 1024458752, physical: '', uuid: '20ee92ac-d018-83b3-0377-9b7c3f682281', label: 'TNAS-E529:UTOSSWAP-X86-S64', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda4', type: 'part', fsType: 'linux_raid_member', mount: '', size: 2997220278272, physical: '', uuid: 'd5803b4d-d12f-8d50-3bf1-2ba0683b19d2', label: 'TerraMaster:UTOSUSER-X86-S64', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb1', type: 'part', fsType: 'ext4', mount: '', size: 298844160, physical: '', uuid: 'd5b528e7-9f9f-4cb4-8e63-ae13e5d70ac6', label: 'UTOSDISK', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb2', type: 'part', fsType: 'linux_raid_member', mount: '', size: 2047868928, physical: '', uuid: '99bb51de-9f94-23d8-98af-dd3c3dfa2217', label: 'TNAS:UTOSCORE-X86-S64', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb3', type: 'part', fsType: 'linux_raid_member', mount: '', size: 1024458752, physical: '', uuid: '20ee92ac-d018-83b3-0377-9b7c3f682281', label: 'TNAS-E529:UTOSSWAP-X86-S64', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb4', type: 'part', fsType: 'linux_raid_member', mount: '', size: 2997220278272, physical: '', uuid: 'd5803b4d-d12f-8d50-3bf1-2ba0683b19d2', label: 'TerraMaster:UTOSUSER-X86-S64', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'md0', type: 'raid1', fsType: 'ext4', mount: '/etc/hosts', size: 2997086060544, physical: '', uuid: '66dcec59-d3a9-4698-93ca-d0e0e0a26f0e', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'md8', type: 'raid1', fsType: 'swap', mount: '[SWAP]', size: 1023868928, physical: '', uuid: '1dfe078c-6a89-4f08-80de-2be047ff0fb8', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'md9', type: 'raid1', fsType: 'ext4', mount: '', size: 2046820352, physical: '', uuid: 'fc916935-eaf3-4db0-86a6-296763c1a901', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined } ] Done in 1.52s. ```
radiochild577 commented 2 years ago

WithOUT --privileged:

Output ``` docker exec dashdot yarn cli raw-data --storage yarn run v1.22.19 $ node dist/apps/cli/main.js raw-data --storage Disk Layout: [ { device: '/dev/sda', type: 'HD', name: 'WDC WD30EFRX-68E', vendor: 'Western Digital', size: 3000592982016, bytesPerSector: null, totalCylinders: null, totalHeads: null, totalSectors: null, totalTracks: null, tracksPerCylinder: null, sectorsPerTrack: null, firmwareRevision: '0A82', serialNum: '', interfaceType: 'SATA', smartStatus: 'unknown', temperature: null }, { device: '/dev/sdb', type: 'HD', name: 'WDC WD30EFRX-68E', vendor: 'Western Digital', size: 3000592982016, bytesPerSector: null, totalCylinders: null, totalHeads: null, totalSectors: null, totalTracks: null, tracksPerCylinder: null, sectorsPerTrack: null, firmwareRevision: '0A82', serialNum: '', interfaceType: 'SATA', smartStatus: 'unknown', temperature: null } ] FS Size: [ { fs: 'overlay', type: 'overlay', size: 2950040084480, used: 957714149376, available: 1977323728896, use: 32.63, mount: '/' }, { fs: '/dev/md0', type: 'ext4', size: 2950040084480, used: 957714149376, available: 1977323728896, use: 32.63, mount: '/etc/resolv.conf' } ] Block Devices: [ { name: 'nbd0', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd1', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd10', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd11', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd12', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd13', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd14', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd15', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd2', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd3', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd4', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd5', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd6', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd7', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd8', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'nbd9', type: 'disk', fsType: '', mount: '', size: 0, physical: 'SSD', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda', type: 'disk', fsType: '', mount: '', size: 3000592982016, physical: 'HDD', uuid: '', label: '', model: 'WDC WD30EFRX-68E', serial: '', removable: false, protocol: 'sata', group: undefined }, { name: 'sdb', type: 'disk', fsType: '', mount: '', size: 3000592982016, physical: 'HDD', uuid: '', label: '', model: 'WDC WD30EFRX-68E', serial: '', removable: false, protocol: 'sata', group: undefined }, { name: 'sda1', type: 'part', fsType: '', mount: '', size: 298844160, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda2', type: 'part', fsType: '', mount: '', size: 2047868928, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda3', type: 'part', fsType: '', mount: '', size: 1024458752, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sda4', type: 'part', fsType: '', mount: '', size: 2997220278272, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb1', type: 'part', fsType: '', mount: '', size: 298844160, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb2', type: 'part', fsType: '', mount: '', size: 2047868928, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb3', type: 'part', fsType: '', mount: '', size: 1024458752, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'sdb4', type: 'part', fsType: '', mount: '', size: 2997220278272, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'md0', type: 'raid1', fsType: '', mount: '/etc/hosts', size: 2997086060544, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'md8', type: 'raid1', fsType: '', mount: '[SWAP]', size: 1023868928, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined }, { name: 'md9', type: 'raid1', fsType: '', mount: '', size: 2046820352, physical: '', uuid: '', label: '', model: '', serial: '', removable: false, protocol: '', group: undefined } ] Done in 1.16s.
MauriceNino commented 2 years ago

Thanks for the output. Unfortunately, after looking at the output I have to say that there is no way of determining RAID information without the --privileged flag as it seems. You will have to stick with it, if you need it.

I have fixed your problem with the weird 0 size drives, though. They will be gone with the next release.

MauriceNino commented 2 years ago

:tada: This issue has been resolved in version 4.3.5

Please check the changelog for more details.

radiochild577 commented 2 years ago

No worries I suspected that might be the case. Just happy to not see 15 random mounts anymore. Thanks for the quick reply and fix!