Skip to content

Commit

Permalink
fix: mergerfs disappear (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed May 28, 2024
1 parent 812f351 commit be79fe0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions server/util/diskUsageUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const diskUsage: Readonly<Record<SupportedPlatform, (timeout: number) =>
linux: (timeout) =>
spawnAsync(
'df',
['-T'],
['--exclude-type=devtmpfs', '--exclude-type=squashfs', '--exclude-type=tmpfs', '--exclude-type=overlay'],
{
timeout: timeout,
},
Expand All @@ -73,9 +73,8 @@ export const diskUsage: Readonly<Record<SupportedPlatform, (timeout: number) =>
.split('\n')
.slice(1)
.map((disk) => disk.split(/\s+/))
.filter((disk) => filterMountPoint(disk[6]))
.filter((disk) => !['devtmpfs', 'squashfs', 'tmpfs', 'overlay'].includes(disk[1]))
.map(([_dev, _fs, size, used, avail, _pcent, target]) => {
.filter((disk) => filterMountPoint(disk[5]))
.map(([_dev, size, used, avail, _pcent, target]) => {
return {
size: Number.parseInt(size, 10) * 1024,
used: Number.parseInt(used, 10) * 1024,
Expand Down

0 comments on commit be79fe0

Please sign in to comment.