Page 1 of 1

Greyhole --stats

Posted: Thu Oct 14, 2010 4:19 pm
by benolding
Am I really this bad at math?

Code: Select all

[root@localhost ~]# greyhole --stats Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/drive1/gh: 229G - 18G = 200G + 0G = 200G /var/hda/files/drives/drive2/gh: 917G - 10G = 860G + 0G = 860G
I feel so sure 917 minus 10 is 907...

Re: Greyhole --stats

Posted: Thu Oct 14, 2010 6:06 pm
by radioz
Its the new math!

Hey it's just a few GB. :)

Re: Greyhole --stats

Posted: Fri Oct 15, 2010 3:34 am
by gboudreau
benolding: If you try the same command now, does it work?
If not, the output of "df -k" would help.

Those numbers are taken from "df" commands.

Total and Used are from this command:

Code: Select all

df -k /var/hda/files/drives/drive2/gh | awk '{print $(NF-4),$(NF-3)}' | tail -1
which should show the 5th and 4th from last columns, which should be the total and used columns.

And the free is from this command, the result of which is cached and reused for 15 seconds before it's refreshed:

Code: Select all

df -k /var/hda/files/drives/drive2/gh 2>&1 | grep '%' | grep -v "^df: .*: No such file or directory$" | awk '{print $(NF),$(NF-2)}'
which should show the mount point, and the 3rd from last column (available).

Re: Greyhole --stats

Posted: Fri Oct 15, 2010 8:06 am
by benolding
Still doesn't work:

Code: Select all

[root@localhost ~]# greyhole --stats Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/drive1/gh: 229G - 18G = 200G + 0G = 200G /var/hda/files/drives/drive2/gh: 917G - 32G = 838G + 0G = 838G [root@localhost ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 117137748 57119240 54068252 52% / tmpfs 254832 0 254832 0% /dev/shm /dev/sdb1 240364732 18627860 209526972 9% /var/hda/files/drives/drive1 /dev/sdc1 961432072 33409124 879184948 4% /var/hda/files/drives/drive2
Don't think it's a caching problem; nothing's going on on the system.

Re: Greyhole --stats

Posted: Fri Oct 15, 2010 8:13 am
by gboudreau
Greyhole reports the correct values (the same as df).
Your problem is what df shows.

Maybe that partition has 5% reserved (for root) on it?

Code: Select all

tune2fs -l /dev/sdc1
Look for "Reserved block count".
5% would be expected for a partition that was formatted by a Linux installer when creating a partition to be used as the root of the OS (/). Maybe that drive was formatted that way, and you didn't touch it since, so it kept using 5%.

The -m parameter of tune2fs allows you to change that value to something smaller if you'd like. See "man tune2fs".
A typical value for data drive would be 1%.

Re: Greyhole --stats

Posted: Fri Oct 15, 2010 8:48 am
by benolding
Wow - thanks! Didn't realize the reserved portion was in that little math equation, and you're right! I had the reserved set way too high.

Code: Select all

[root@localhost ~]# greyhole --stats Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/drive1/gh: 229G - 18G = 209G + 0G = 209G /var/hda/files/drives/drive2/gh: 917G - 32G = 876G + 0G = 876G