Page 1 of 2

Problem With --going Command

Posted: Mon Aug 23, 2010 2:49 am
by bradwebber
Firstly, let me congratulate everyone involved with the Amahi project on a fantastic piece of software.

I have 4 HDDs installed in my server; one HDD is used by the OS and the other three have been pooled together using greyhole. I am wanting to replace one of the HDDs in the pool with a bigger HDD. From what I have read elsewhere in the forums, in order to do this I first need to move files off the drive I am replacing using the --going command. I have tried running the following command:

Code: Select all

greyhole --going /var/hda/files/drives/sdb1/gh
but I get this message:

Code: Select all

Directory /var/hda/files/drives/sdb1/gh is not one of your defined storage pool directories. Please use one of the following with the --going option: /var/hda/files/drives/sdb1/gh /var/hda/files/drives/sdc1/gh /var/hda/files/drives/sdd1/gh
I have also tried the --going command using sdc1 but got the same message.

I was hoping someone could give me a hand in getting this sorted.

Cheers,
Brad

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 4:24 am
by gboudreau
Edit /usr/bin/greyhole in a text editor.

Look for this line:

Code: Select all

if (!array_search($options['dir'], $storage_pool_directories)) {
change it into this:

Code: Select all

if (array_search($options['dir'], $storage_pool_directories) === FALSE) {

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 5:01 am
by bradwebber
Hi gboudreau, thanks very much for the quick reply.

I made the change to greyhole in /usr/bin as you suggested. The line now looks like this:

Code: Select all

if (array_search($options['dir'], $storage_pool_directories) == FALSE) {
I tried running the --going command again but ran into the same issue. I rebooted my server just in case but that hasn't helped either.

Thanks again.

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 5:32 am
by gboudreau
=== FALSE, not == FALSE.

It would be a better idea to copy-paste the line I gave above, than doing the change manually.

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 5:59 am
by bradwebber
Arrgghh, my apologies for the screw up. I have (correctly, this time) updated the line in greyhole as per your instructions and the --going command is now working correctly.

Thanks very much for your prompt replies and your help, I really appreciate it.

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 6:15 am
by gboudreau
This fix will be included in the new release of Greyhole.

Thanks for the bug report.

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 6:34 am
by bradwebber
Hi Guillaume,

Just to follow up on this: I ran the --going command and it appeared to run successfully. It completed very quickly though; there is about 160GB of data on the drive I want to replace.

When I logged back into the Amahi dashboard and looked at the storage (partitions) the sdb1 drive still showed that it contains the 160GB of data. In other words it doesn't look like any data has actually been moved off that drive. The other drives in the pool do not appear to contain any additional data either.

I have confirmed that the sfck has completed; the log file indicates greyhole is currently sleeping.

Do I need to take any additional steps to move the data from the drive?

Please let me know if i can provide any additional information or logs, I am more than happy to send them through if they will help.

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 6:55 am
by gboudreau
--going will only move the files that are only on sdb1, and not anywhere else.
Do you have any shares for which you have Uses pool enabled, with 0 extra copies?

You can confirm that --going did what it should have by verifying that all the files found on sdb1/gh/* are now somewhere else
(sdc1/gh/* or sdd1/gh/*)

You can check that the fsck that just ran didn't use sdb1 as the target drive for additional copies of files that needed extra copies.
i.e. if videos/file1 was on sdb1 and sdc1, then fsck should have said:
Missing file copies. Expected 2, got 1. Will create more copies using ...sdc1/gh/videos/files
And just below that, you should see that a copy was created on sdd1.

You can gzip and upload your greyhole.log if you'd like to confirm what you find with the instructions above: http://pub.pommepause.com

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 7:41 am
by bradwebber
Yeah, all of my shares at the moment are set up with 0 copies.

I took a look in the gh folders on the other drives but it doesn't look like the files have been copied across.

I have uploaded a copy of my log file to the link in your previous post.

I am going to have to call it a night, it starting to get pretty late down here. I will jump back on the forums tomorrow after work to see if there is anything I can do to assist.

Thanks again for all your help!

Re: Problem With --going Command

Posted: Mon Aug 23, 2010 9:32 am
by gboudreau
There was indeed a problem with --going.
I was able to reproduce it, and then fix it locally.

Try this:
- If you're using x86_64 (you can check by using the "uname -i" command):

Code: Select all

rpm -Uvh http://greyhole.pommepause.com/releases/hda-greyhole-0.6.23-1.x86_64.rpm
If not:

Code: Select all

rpm -Uvh http://greyhole.pommepause.com/releases/hda-greyhole-0.6.23-1.i386.rpm
- Go in the Amahi Dashboard, and de-select and re-select the sdb1 drive from the Storage Pool page.
-

Code: Select all

greyhole --fsck
- Wait for fsck to finish (look in greyhole.log; wait for it to start sleeping)

Then retry your --going command.