Author Topic: Incorrect free space displayed for the pooled drives  (Read 4039 times)

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Incorrect free space displayed for the pooled drives
« on: March 19, 2013, 02:25:28 am »
Hi there,

I've realized that, in the Flexraid WebUI, the free space for my 3 drives is given wrong. If I do df -h I see the following:

/dev/sdc1           1,8T  1,7T  4,0G 100% /home/patrick/flexraid_drives/HD_01
/dev/sdd1           1,8T  1,7T   11G 100% /home/patrick/flexraid_drives/HD_02
/dev/sdb1           1,8T  1,7T   12G 100% /home/patrick/flexraid_drives/HD_03
FlexRAIDFS      5,4T  5,1T   27G 100% /home/patrick/FLEXRAID_POOL

But flexraid reports de following:

HD       -> Used      Free
HD_03 -> 1,69T     105GB
HD_02 -> 1,69T     103,94GN
HD_01 -> 1,7T       97,1GB

However, as you cann see, the total free space is right, df shows it correctly, also the file manager.

Related with that, I have an issue, that I tried to copy a file over 14GB to the Pool, and it failed with some error about split or so. I would expect that such a transfer would be aborted immediately, because it can't fit in any of the drives. Could that be related to the WebUI reporting wrong numbers or is it just the way it works?

Thanks!
« Last Edit: March 19, 2013, 02:53:10 am by PatrickVogeli »

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #1 on: March 21, 2013, 09:34:23 am »
Any help on this one? I'd really like to know if it's a known issue or not, and if there's a fixed or, at least, a fixed planned.

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #2 on: March 21, 2013, 12:16:41 pm »
The FlexRAID numbers make sense to me.

How do reason that  "1,8T - 1,7T =  4,0G"?

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #3 on: March 21, 2013, 12:27:19 pm »
Well, my fault here, df -h is not really a very exact command, as it doesn't show decimals, and when working with TB, they are quite important.

Let's try showing megabytes:

df -m:
/dev/sdd1        1877791 1771357     11048 100% /flexraid_drives/HD_02
/dev/sdb1        1877793 1770639     11768 100% /flexraid_drives/HD_03
/dev/sdc1        1877792 1778356      4050 100% /flexraid_drives/HD_01
FlexRAIDFS       5633375 5320351     26865 100% /media/FlexRAID_POOL

As you can see, there are aprox. 11.000 megabytes free in 2 HDs, and 4.000 on another one, so that's 11GB on 2 HDs and 4GB on another one.

In case it helps, here's the output in kilobytes

df -k:
/dev/sdd1      1922857360 1813868944  11312868 100% /flexraid_drives/HD_02
/dev/sdb1      1922859824 1813133736  12050416 100% /flexraid_drives/HD_03
/dev/sdc1      1922858352 1821036524   4146228 100% /flexraid_drives/HD_01
FlexRAIDFS     5768575536 5448039204  27509512 100% /media/FlexRAID_POOL

Thanks!

Offline helinus

  • Newbie
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #4 on: March 24, 2013, 03:52:41 am »
df is calculating free space wrong.

df for /dev/sdd1 is reporting you have used 1 771 357 out of 1 877 791 megabytes. This equals 106 434 megabytes free, not 11 048.
« Last Edit: March 24, 2013, 03:59:31 am by helinus »

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #5 on: March 24, 2013, 09:51:46 am »
Helinus, you were indeed right, the free space on the HDDs is 100GB or close. However, there's a problem with those numbers: they are not accessible for writing data and are reserved. Apparently, when a filesystem is created, about 5% is reserved for the superuser to write logs and stuff like that. In a 2TB disck, that's 100GB, which is obviously too much space, specially in a data only HDD.

More info here: http://askubuntu.com/questions/79981/df-h-shows-incorrect-free-space

As I see it, it is a FlexRAID bug, as that space can't be displayed as free, as it is not accessible to write data, not even for the root user. DF does it fine. Since I am only storing files and no system stuff is in those Hard drives, I have set that reserved space to 0,05%, using tune2fs -m 0.05 /dev/sdb1, then repeated for sdc1 and sdd1. But even then, FlexRAID will display wrong free space, even only wrong by a small number.

Brahim: any input after these new findings?


Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #6 on: March 28, 2013, 04:29:43 am »
I hate that, but: BUMP! Brahim, any words on my new findings?

Thanks!

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #7 on: March 28, 2013, 09:44:36 am »
What new findings?
It is working as designed.  :P

What another program (df in this case) reports is irrelevant to FlexRAID.
Other programs are free to do whatever interpretation of the free space and whatnot, but that is of no concern to FlexRAID.

What FlexRAID reports to you is what matters.

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #8 on: March 28, 2013, 11:11:31 am »
Well, sorry to say I don't think that way. I, as a user, CAN'T write to that space. It's not something I can bypass, it's a limitation/feature of EXT filesystems.

So, no matter what,  I think that FlexRAiD must respect that. Space is NOT free, is not writable and should not be treated as it was.

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #9 on: April 03, 2013, 02:43:01 am »
It would be easier to discuss this if I got faster answers  ;D

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #10 on: April 03, 2013, 04:00:08 am »
It would be easier to discuss this if I got faster answers  ;D
???
No change will be made. It is reporting as designed.
A reserved space is just that: a served space. It does not mean it is not free.

Offline PatrickVogeli

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Incorrect free space displayed for the pooled drives
« Reply #11 on: April 03, 2013, 04:16:44 am »
I don't know how to explain it, because I don't think you fully understand the issue. I run Flexraid under my user, and it runs fine. However, no matter what I do, my user CAN'T access that free space, You don't have the right to do so. DF knows it, gnome knows it and every other file explorer under linux knows that AND respects it.

On the other side, you just choose to ignore this issue, and say that your application is the correct one.

To me it's a case of everybody does it wrong but me.