Page 1 of 2

Where are my actual files?

Posted: Tue May 22, 2012 2:52 pm
by crowfan
Hello,

My server had two drives. I set the second drive up with Greyhole and set it to duplicate all files on the second drive.

The second drive died, so I pulled it. To get the server to boot again, I had to pull the OS drive, edit /etc/fstab to comment out the line that added the second drive, and reboot. The server was then working again.

My files used to be located in /var/hda/files but now that location just seems to have shortcuts/aliases. The actual files seem to have been moved to /gh. I assume that stands for Greyhole.

So I have two questions:

-- is this where my actual files are now?
-- is there anything else I need to do now that the second drive is gone?

I'm still a bit of a newb.

Thanks!

[ Post made via iPad ] Image

Re: Where are my actual files?

Posted: Tue May 22, 2012 4:31 pm
by bigfoot65
Follow guidance in the wiki for Greyhole commands. Normally when you remove a drive, you have to do greyhole --gone=/var/hda/files/drive/drivename as root user in terminal.

Then you can do greyhole --fsck for realign things.

http://wiki.amahi.org/index.php/Linux-hda_commands

Re: Where are my actual files?

Posted: Tue May 22, 2012 8:00 pm
by crowfan
Thanks!

I searched before asking but did not find that info. I ran:

greyhole --gone=/var/hda/drives/drive1 [I got this drive path from http://hda Setup > Shares > Storage Pool, it had an exclamation point next to it, and that was the same path list /etc/fstab]

and then

greyhole --fsck

Now I'm just waiting for it to run. How long should it take to start and complete?

Re: Where are my actual files?

Posted: Wed May 23, 2012 4:45 am
by bigfoot65
Depends on how many files are being worked. You can monitor progress via the log using a web app or command line.

Web app:
http://www.amahi.org/apps/greyhole-logmon

Command line:

Code: Select all

tail -f /var/log/greyhole.log
Hope that helps.

Re: Where are my actual files?

Posted: Wed May 23, 2012 4:36 pm
by crowfan
OK, so I used logmon and don't see anything referring to the process. Just a bunch of "Nothing to do...Sleeping...." but it doesn't go back far enough. I'll have to look back further if I can.

Nothing looks different, the files are still not back to /var/hda/files. I also rebooted the server and that didn't do anything.

Maybe I'll re-run fsck later and watch the log.

Re: Where are my actual files?

Posted: Thu May 24, 2012 3:40 am
by ciscoh
i am not sure what you are expecting.

you did not add a drive, right?

you have one drive and you see the "gh" directory and it contains files.

you see the /var/hda/files directory that contains the symlinks........

what do you expect to see when you run fsck?

Re: Where are my actual files?

Posted: Thu May 24, 2012 6:18 am
by crowfan
I guess I was expecting the files to be moved back to /var/hda/files. I guess I figured it would "undo" everything and put it all back where it was before I added the second drive.

In a nutshell, here is what I did: had the server with one drive with all my files; added a second drive with greyhole and set it up so that all files were duplicated on the second drive; second drive dies; server won't boot; I pull the first drive and edit /etc/fstab to comment out the line that refers to the now-dead second drive; server now boots but I notice that the files are no longer stored in /var/hda/files but instead in /gh. That strikes me as strange so I posted my original question.

Sorry if that was unclear. I am still pretty new to Linux/Amahi and was surprised to see my files moved. I was wondering if that's normal/expected and if there's anything else I have to do. I guess I just don't understand everything greyhole is doing.

When I access these shares from other computers now, should I be connecting to the /gh location or still connect to the /var/hda/files location?

Sorry, I know my questions probably don't make full sense to the experienced crowd. :oops:

Re: Where are my actual files?

Posted: Thu May 24, 2012 6:47 am
by ciscoh
dont worry about how you look.....we have all been there and still visit from time to time....:)


the /var/hda/files will only contain symlinks. They link to the file in the "gh" folder.

As you add drives, more copies are created when fsck runs. If the file becomes missing from the "gh" folder, it will restore it from one of the other copies.

you should never connect to the /gh location really.......

Re: Where are my actual files?

Posted: Thu May 24, 2012 7:00 am
by crowfan
OK, so I should continue to connect to the /var/hda/files location from other computers, such as my MacBook, and use that as if the other files are just there.

I assume (and I've been reading a bit more about it) that I can just interact with those locations like I always did and it will still work the same way (i.e., if I add a new file to a folder in /var/hda/files from my laptop, greyhole will do everything behind the scenes to move it and symlink it etc., but I can just interact with it like it's in /var/hda/files).

I'm just nervous because I saw it moved and didn't expect that, and there are important files on here I can't lose.

I am also backing up with Crashplan -- I should have that backup the /gh directory now though, right? Otherwise it's just backing up the symlinks and not the files themselves.

Re: Where are my actual files?

Posted: Thu May 24, 2012 7:47 am
by ciscoh
you should mount the shares locally

http://wiki.amahi.org/index.php/Mount_Shares_Locally

and then point CrashPlan to those shares at /mnt/samba/