Greyhole --stats

benolding
Posts: 19
Joined: Wed Oct 06, 2010 11:35 am

Greyhole --stats

Postby benolding » Thu Oct 14, 2010 4:19 pm

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...

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Greyhole --stats

Postby radioz » Thu Oct 14, 2010 6:06 pm

Its the new math!

Hey it's just a few GB. :)

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole --stats

Postby gboudreau » Fri Oct 15, 2010 3:34 am

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).
- Guillaume Boudreau

benolding
Posts: 19
Joined: Wed Oct 06, 2010 11:35 am

Re: Greyhole --stats

Postby benolding » Fri Oct 15, 2010 8:06 am

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.

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole --stats

Postby gboudreau » Fri Oct 15, 2010 8:13 am

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%.
- Guillaume Boudreau

benolding
Posts: 19
Joined: Wed Oct 06, 2010 11:35 am

Re: Greyhole --stats

Postby benolding » Fri Oct 15, 2010 8:48 am

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

Who is online

Users browsing this forum: No registered users and 9 guests