Problems Restoring Greyhole after v6 to v7 Update

parisfam
Posts: 3
Joined: Fri May 30, 2014 8:48 pm

Problems Restoring Greyhole after v6 to v7 Update

Postby parisfam » Fri May 30, 2014 9:09 pm

Hi,

I can't say I'm a newbie, as I've been using Amahi since 2010. But, I'm also not a Linux expert either.

I upgraded my server from Amahi 6 to Amahi 7 last week. I have an external drive rack, which is where all my data resides.

The data sits in 5 drives, each with a gh folder in them. my problem is that no matter what I try to do, I can't get Greyhole to recreate the symlinks in the Amahi shares. I've tried everything relating to Manual Setup of Greyhole AND Reconnecting Greyhole instructions.

I've copied files into the shares, and they convert after issuing the greyhole -fsck command. But the existing files won't get symlinks created.

Going through attempting to pull all the info the wiki says to post, I noticed that the greyhole statistics sho only 1 of my 5 drives connected.

Code: Select all

Greyhole Statistics =================== Storage Pool Total - Used = Free + Trash = Possible /var/hda/files/drives/sda/gh: Offline /var/hda/files/drives/sdb/gh: 907G - 561G = 300G + 155G = 455G /var/hda/files/drives/sdc/gh: Offline /var/hda/files/drives/sdd/gh: Offline /var/hda/files/drives/sde/gh: Offline ========================================== Total: 907G - 561G = 300G + 155G = 455G [root@Amahi drives]# mysql -u root -phda -e "select * from disk_pool_partitions" hda_production ERROR 1146 (42S02) at line 1: Table 'hda_production.disk_pool_partitions' doesn't exist
I'm stuck and desperate. any advice would be helpful.

My versions:

Code: Select all

3.14.4-100.fc19.x86_64 samba-4.0.16-1.fc19.x86_64 amahi-greyhole-0.9.49-2.x86_64
Samba Configuration
http://paste.fedoraproject.org/106100/40150830

Greyhole Configuration
http://paste.fedoraproject.org/106103/08468140

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Problems Restoring Greyhole after v6 to v7 Update

Postby bigfoot65 » Sat May 31, 2014 5:39 am

Did you follow the guidance for installing Greyhole on Amahi 7?
https://wiki.amahi.org/index.php/Amahi_ ... hole_Setup

Just checking to ensure you didn't miss anything. I also noticed you have most of your copies set to 1 which translates to no extra copies (data loss will occur if one of your drive fails). Shares must appear in Amahi 7 as they did in Amahi 6.

I see two obvious things here. The SQL to check for the disk pool partitions won't work on Amahi 7 as that table is not part of the database now, only the greyhole.conf file is used. I do see them in that file.

Next, drives listed as offline indicate the gh folders are not present. You stated they are on all drives. Check to ensure they are there and the correct permissions are set on them. I believe they should be 1st admin user:users, recursive for all files.

Once you have done that, try restarting greyhole. Then to force the symlinks to be created in shares, do this as root user:

Code: Select all

greyhole --replace=/var/hda/files/drives/drivename/gh
Replace drivename with sdc, sdd, etc. You will need to do this for each one.

That should set things straight.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

parisfam
Posts: 3
Joined: Fri May 30, 2014 8:48 pm

Re: Problems Restoring Greyhole after v6 to v7 Update

Postby parisfam » Sat May 31, 2014 7:57 am

bigfoot65 --

Thanks for the quick response. I will recheck everything one more time in terms of installation steps.

I had a major server failure a few years back, and gained religion on off-site backup, so I use Crashplan to backup to the cloud. I decided that avoids the need to backup the largest files locally (most of my server content is media with sizes over 1 GB a piece).

Will post once I have a chance to try again.

parisfam
Posts: 3
Joined: Fri May 30, 2014 8:48 pm

Re: Problems Restoring Greyhole after v6 to v7 Update

Postby parisfam » Mon Jun 02, 2014 7:12 pm

I was finally able to get my HDA up and running, but unfortunately, the recos didn't work at first blush.

I'll post the solution only as a warning to others of WHAT NOT TO DO WHEN STUCK.

After doing what bigfoot65 suggested and not working, I got frustrated. The problem seemed to be with the greyhole database itself (or so I thought). My "fix", I thought, was to reinstall mysql. My only advice here is to resist the temptation. In doing so, I also uninstalled key dependencies -- one of which is the entire amahi package. :shock:

ALl my HDA capabilities vanished, but I could still VNC in to the desktop. Upon realizing this (and knowing I'd need to install again), I decided to not update greyhole with my existing database and instead copy my files out of the gh directories and into consolidated folders. Many of my shares were split between multiple drives, so I needed to get, say, all the Movies files in one folder on one disk. To do that, I used the rsync command, which will merge two folders together, copying the unique contents of the first folder into the second folder. I believe "unique" is driven by filename and timestamp -- the former directory is copied into the latter one:

Example rsync code

Code: Select all

rsync -pr /var/hda/files/drives/sda/gh/pictures /var/hda/files/drives/sdc/
This copies the greyhole files in the pictures directory on drive sda into the a pictures directory residing on sdc, only copying the files not already in sdc/pictures.

That took some time, but I was able to get it all on 1 2TB drive. I think I may have missed some minor files, but I backup using Crashplan, so if in a pinch, I can grab files from there.

I then reinstalled Amahi 7, and initiated a new instance of greyhole from scratch following the posted instructions https://wiki.amahi.org/index.php/Amahi_ ... hole_Setup. I'm copying over files manually, and all seems to be working. :D

Only wanted to share -- I still love the Amahi system. I'm almost certain I did something wrong as it relates to greyhole before uninstalling Amahi 6. I read somewhere when I was thinking of switching Amahi 6 to Ubuntu that some extra steps had to occur before starting. I know for certain I didn't do anything beforehand -- so that might be where my problem was.

Thanks for the help.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Problems Restoring Greyhole after v6 to v7 Update

Postby bigfoot65 » Tue Jun 03, 2014 5:09 am

Sorry my guidance did not help.

It's never a good idea to uninstall a core OS package. There are many dependencies for Amahi that will break it as you found out.

Hopefully you have things sorted out now. A little painful, but working.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: Google [Bot] and 21 guests