[SOLVED] DiskSpace column shows incorrect values

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

[SOLVED] DiskSpace column shows incorrect values

Post by NginUS »

I'm working on sorting through various issues on a fresh install, & this is the first I've been unable to resolve on my own.
I'm using Zoneminder version 1.32.3-xenial on Linux Mint 18.3 (Xenial).

I deleted the default storage entry & added another local device in its place via the WebUI.
When I do df -h it shows this one to have 60M in use of 218G total, which is accurate. However on the ZoneMinder web interface under 'Options>Storage' it shows 11.72GB of 229.1GB for this line item, which is incorrect.

That storage is an external USB3 drive with a single MS-DOS partition formatted as ext4, mounted via UUID in fstab to /mnt/foo, containing 2 subdirectories to provide the final /mnt/foo/subdir/ZM path that's defined for that 'Storage' line item.

For the sake of reference, I've added another s3fs 'Storage' line item, which properly displays there being 0B of 256TB in use.

For the sake of completeness, local is set to 'Deep', while S3 is set to 'Medium'- don't know if that matters.

Not sure how to proceed, help is welcome.

Thanks,
-N


EDIT:
I think I might have found something relevant. My file manager 'Dolphin' had a large 'Trash' percentage allocated to that drive, which was where the 11GB was. I don't know why the 'df' was able to not count it, while the ZoneMinder UI did. I found it by looking at that path in Filelight, which showed me where that space was in use.

Anyhow, I emptied the trash & set it to <1MB for the future. Now Filelight confirms the trash is indeed empty, & there's 0B in use.

A problem remains though that the ZoneMinder Web UI still shows there being 11GB in use there. I tried doing 'sudo systemctl restart zoneminder.service', but it didn't make a difference.

Still stuck.. :-(
Last edited by NginUS on Tue Feb 19, 2019 12:57 am, edited 1 time in total.
User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: DiskSpace column shows incorrect values

Post by kitkat »

11 GB out of 218 GB is about 5%, which is coincidentally the default amount of reserved space for ext2/3/4 file systems.

You can change the value using tune2fs -m X /dev/sdYZ where X is the percentage of reserved space desired (e.g. 1, 0.5, etc.) and YZ is the partition identifier (e.g. 'c1' for /dev/sdc1).
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

Re: DiskSpace column shows incorrect values

Post by NginUS »

kitkat wrote: Mon Feb 18, 2019 3:04 pm 11 GB out of 218 GB is about 5%, which is coincidentally the default amount of reserved space for ext2/3/4 file systems.
I had never heard of that, thanks so much!
For future reference these are the relevant commands (No need to dismount first):

Display reserved blocks:

Code: Select all

sudo tune2fs -l /dev/sdxX
Reduce reserved blocks to zero:

Code: Select all

sudo tune2fs -m 0 /dev/sdxX
Post Reply