[MCOL-2273] getSystemDisk showing incorrect root usage and reporting incorrect alarm Created: 2019-04-03  Updated: 2023-10-26  Resolved: 2019-05-21

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.1.7
Fix Version/s: 1.1.0, 1.2.4

Type: Bug Priority: Minor
Reporter: David Hill (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2019-04, 2019-05

 Description   

Customer asked about a Minor Alarm reported on disk usage, when disk usage was at 4%.
Install is on a root install.

Issue was that ServerMonitor is getting the /root disk usage incorrectly.

Alarm:

AlarmID = 6
Brief Description = DISK_USAGE_LOW
Alarm Severity = MINOR
Time Issued = Tue Apr 2 14:37:37 2019
Reporting Module = pm1
Reporting Process = ServerMonitor
Reported Device = /

unix disk usage

root@ip-10-59-10-117 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 100G 3.8G 97G 4% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 26M 16G 1% /dev/shm
tmpfs 16G 33M 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/mapper/23437383037613530 1.6T 1.2T 299G 81% /usr/local/mariadb
tmpfs 3.1G 0 3.1G 0% /run/user/0

ServerMonitor calulation

mcsadmin> getsystemdisk
getsystemdisk Tue Apr 2 19:29:58 2019

System Disk Usage per Module
Module 'pm1' Disk Usage (in 1K blocks)

Mount Point Total Blocks Used Blocks Usage %
----------------------------- ------------ ------------ -------
/ 1651258452 1254582844 76



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2019-04-03 ]

Someone coded free blocks to use statvfs f_bfree instead of f_bavail. The discrepancy between the two is typically 5% but can be a lot larger on FSs such as XFS.

Comment by Andrew Hutchings (Inactive) [ 2019-05-02 ]

For QA:

Disk reporting functions such as "mcsadmin getsystemdisk" will likely show an increased disk usage. This is because the "free" blocks on a disk are not necessarily usable. We now use the "available" blocks instead. This will be especially true on filesystems such as XFS.

Comment by Daniel Lee (Inactive) [ 2019-05-21 ]

Closed per posted test results.

Generated at Thu Feb 08 02:35:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.