Page 1 of 1

Problem balancing drives

Posted: Sat May 28, 2011 12:42 am
by t0bbe
I had greyhole nicely working with two 2TB drives. Now I added another two 2TB drives.
I am trying to balance the data between them with the "greyhole -l" option, but it gives me a lot of errors in the greyhole.log. And the drives are still very unevenly filled.
First of all I get a lot of:

Code: Select all

May 26 11:12:33 7 balance: Moving this file wouldn't help balancing available space. Skipping.
That I don't really understand why it says it wouldn't help moving the file.
Of more concern is the PHP warnings I get:

Code: Select all

May 26 11:11:03 7 balance: Working on file: The.Shawshank.Redemption.1994.720p.x264/The.Shawshank.Redemption.1994.720p.x264.mkv (4.37GB) May 26 11:11:03 7 balance: Drives with available space: /var/hda/files/drives/drive4/gh (1.38TB avail) - /var/hda/files/drives/drive2/gh (1.18TB avail) - /var/hda/files/gh (1,017GB avail) May 26 11:11:03 7 balance: Target drive: /var/hda/files/drives/drive4/gh (1.38TB available) May 26 11:11:03 7 balance: Moving file copy... May 26 11:11:03 4 balance: PHP Warning [2]: rename(/var/hda/files/gh/Movies/The.Shawshank.Redemption.1994.720p.x264/The.Shawshank.Redemption.1994.720p.x264.mkv): failed to open stream: Value too large for defined data type in /usr/bin/greyhole on line 3481 May 26 11:11:03 4 balance: PHP Warning [2]: rename(/var/hda/files/gh/Movies/The.Shawshank.Redemption.1994.720p.x264/The.Shawshank.Redemption.1994.720p.x264.mkv,/var/hda/files/drives/drive4/gh/Movies/The.Shawshank.Redemption.1994.720p.x264/.The.Shawshank.Redemption.1994.720p.x264.mkv.6ca75): Value too large for defined data type in /usr/bin/greyhole on line 3481 May 26 11:11:03 4 balance: Failed file copy. Skipping.
Everything else seems to work fine, I can access the shares, and the "greyhole --fsck" doesn't return any errors.

Re: Problem balancing drives

Posted: Sat May 28, 2011 2:43 am
by gboudreau
Try the latest version: http://forums.amahi.org/viewtopic.php?f ... 863#p14863
Then retry balancing.
It's the first time I see those PHP warnings, but maybe the latest version will work better for this.

Re: Problem balancing drives

Posted: Sun Jun 05, 2011 2:17 am
by t0bbe
Thanks again for all the help!

I have now updated greyhole, samba, converted to MySQL, re-installed the RPM, all per your instructions, and everything is back working. That is, back to working just the way it was working before.
I still have the problem with the unbalanced drives, and still have the same messages in the greyhole log:

Code: Select all

May 26 11:11:03 7 balance: Working on file: The.Shawshank.Redemption.1994.720p.x264/The.Shawshank.Redemption.1994.720p.x264.mkv (4.37GB) May 26 11:11:03 7 balance: Drives with available space: /var/hda/files/drives/drive4/gh (1.38TB avail) - /var/hda/files/drives/drive2/gh (1.18TB avail) - /var/hda/files/gh (1,017GB avail) May 26 11:11:03 7 balance: Target drive: /var/hda/files/drives/drive4/gh (1.38TB available) May 26 11:11:03 7 balance: Moving file copy... May 26 11:11:03 4 balance: PHP Warning [2]: rename(/var/hda/files/gh/Movies/The.Shawshank.Redemption.1994.720p.x264/The.Shawshank.Redemption.1994.720p.x264.mkv): failed to open stream: Value too large for defined data type in /usr/bin/greyhole on line 3481 May 26 11:11:03 4 balance: PHP Warning [2]: rename(/var/hda/files/gh/Movies/The.Shawshank.Redemption.1994.720p.x264/The.Shawshank.Redemption.1994.720p.x264.mkv,/var/hda/files/drives/drive4/gh/Movies/The.Shawshank.Redemption.1994.720p.x264/.The.Shawshank.Redemption.1994.720p.x264.mkv.6ca75): Value too large for defined data type in /usr/bin/greyhole on line 3481 May 26 11:11:03 4 balance: Failed file copy. Skipping.

Code: Select all

May 26 11:12:33 7 balance: Moving this file wouldn't help balancing available space. Skipping.
I guess that as I add new data it will be filling up the drive with the most space, so it is kind of acceptable and working the way it is now, but it would be nice to get the drives better balanced.

The message "Value too large for defined data type in /usr/bin/greyhole on linte 3481", could it be that the path to the file is too long?

Re: Problem balancing drives

Posted: Sun Jun 05, 2011 9:30 am
by gboudreau
No, the path length is fine. Anything below 255 characters will be fine.

That error message is probably caused by trying to rename (move) a file that is above 2GB on a 32-bit system. You're on 32-bit, right? ("uname -i" would return i386 on 32-bit, and x86_64 on 64-bit).

Also, do you have files below 2GB, but bigger than 10MB ? If so, were they (are they) moved on --balance ?

Re: Problem balancing drives

Posted: Sun Jun 05, 2011 11:41 am
by t0bbe
Ok, that makes sense. Yes I'm on a 32-bit system.

And it seems to be the larger files that throw the error. The only files that were moved to the new drives during the --balance operation are all under 2GB.
Yes, files over 10MB but under 2GB were moved.

Any way around that?
I can't go to 64-bit unfortunately... :(

Re: Problem balancing drives

Posted: Sun Jun 05, 2011 12:19 pm
by gboudreau
You can track the issue here: https://github.com/gboudreau/Greyhole/issues/18
0.9.8 should attempt to fix this. Attempt because I'm unable to reproduce it, so I'll just try another way I know of to move the files, and hope it works (I'm pretty sure it will; it did resolve other similar issues on 32-bit).

Re: Problem balancing drives

Posted: Sun Jun 05, 2011 12:23 pm
by gboudreau

Code: Select all

rpm -Uvh http://www.greyhole.net/releases/hda-greyhole-0.9.8-1.`uname -i`.rpm

Re: Problem balancing drives

Posted: Tue Jun 07, 2011 10:37 am
by t0bbe
Great!
The drives are perfectly balanced, no errors in the greyhole log!

Thanks a million, it's great to see the amazing help and support you get here on the forum!