Greyhole stuck in a loop?

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Greyhole stuck in a loop?

Postby vegaramos1 » Tue Jan 28, 2014 3:28 pm

Apologies for the long winded explanation, but I need to give a little background before I start with my issue:

I am currently migrating from Amahi on FC14 to Amahi 7. I am moving to a new machine, which does not have a optical drive, so I installed fedora 19 first before I installed Amahi. My old server was an old Dell laptop with 3 external USB drives (2x2TB and 1x500GB). I was using Greyhole to keep at least one duplicate of my most important files (namely Document, Pictures, Music, Home video's, and some Movies). Since my new server will not be using the 500GB drive, I removed it using greyhole and insured that the data was moved to the other drives, so that I would have 2 copies of each file (as per my pool directive).

My new server has 4 drive bays and will be stocked with 4x2 TB internal drives. As of right now, Drive 1 will not be part of the Greyhole pool, Drives 2,3,4 will be part of the Greyhole pool. I took one of my new drives (let's call it DRIVE 2) and using a drive enclosure and rsync, I copied all of the data from one of the external drives and put it into drive bay 2. I followed the instructions for installing Greyhole on Amahi 7, added DRIVE 2 to the pool and set the shares that I wanted to keep to 1 copy (since there was only one drive in the pool). I ran an fsck, and everything was found as expected. I left Greyhole alone for several days to make sure I didn't have any issues with it....none were found.

Now I'm trying to add a third drive (let's call it DRIVE 3) to the new server which used to be a WD external drive which I removed from it's enclosure. I formatted it as ext4, and again using an external enclosure and rsync, I copied all the data from the last remaining external drive on my old server to the DRIVE 3. I install it onto the server, using hda-diskmount it is mounted, update greyhole.conf to add DRIVE 3 to the the pool, and now I update the number of copies per share to 2. I run fsck once again and initially all there was an issue with greyhole not recognizing that DRIVE 3 was part of the pool. I tried restarting the greyhole service but to no avail. Eventually, I reboot the server and am happy to see that greyhole now recognized that DRIVE 3 is part of the pool. I run fsck again and watch greyhole do it's thing. After all was said and done I didn't see any issues.......


....until I tried moving a file to the share. It seems greyhole keeps copying the same file over and over again as if stuck in a loop. I keep seeing the following in the logs

Code: Select all

Jan 28 15:46:42 6 write: Now working on task ID 132422: write DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Looking for ignore match between DVDs/02 PS3 Movies and .*/_UNPACK_.* Jan 28 15:46:42 6 write: File changed: DVDs/02 PS3 Movies/Monsters University.mp4 - 1.42GB Jan 28 15:46:42 7 write: Will use source file: /var/hda/files/drives/drive3/gh/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Loading metafiles for DVDs/02 PS3 Movies/Monsters University.mp4 ... Jan 28 15:46:42 7 write: Got 2 metadata files. Jan 28 15:46:42 7 write: Will remove copy at /var/hda/files/drives/drive2/gh/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Moved copy from /var/hda/files/drives/drive2/gh/DVDs/02 PS3 Movies/Monsters University.mp4 to trash: /var/hda/files/drives/drive2/gh/.gh_tra$ Jan 28 15:46:42 7 write: Drives with available space: /var/hda/files/drives/drive2/gh (347GB avail) - /var/hda/files/drives/drive3/gh (340GB avail) Jan 28 15:46:42 7 write: Saving 2 metadata files for DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Saving metadata in /var/hda/files/drives/drive2/gh/.gh_metastore/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Saving metadata in /var/hda/files/drives/drive3/gh/.gh_metastore/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Copying 1.42GB file to /var/hda/files/drives/drive3/gh/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: (using rename) Jan 28 15:46:42 7 write: Creating symlink in share pointing to the above file copy. Jan 28 15:46:42 7 write: Saving 2 metadata files for DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:42 7 write: Saving metadata in /var/hda/files/drives/drive2/gh/.gh_metastore/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:43 7 write: Saving metadata in /var/hda/files/drives/drive3/gh/.gh_metastore/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:46:43 7 write: Copying 1.42GB file to /var/hda/files/drives/drive2/gh/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:47:07 7 write: Copy created at 60.7 MBps. Jan 28 15:47:07 7 write: Saving 2 metadata files for DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:47:07 7 write: Saving metadata in /var/hda/files/drives/drive2/gh/.gh_metastore/DVDs/02 PS3 Movies/Monsters University.mp4 Jan 28 15:47:07 7 write: Saving metadata in /var/hda/files/drives/drive3/gh/.gh_metastore/DVDs/02 PS3 Movies/Monsters University.mp4
It looks as if Greyhole can't find a match for the 02 PS3 Movies folder, as .*/_UNPACK_.*
is what is found. Not sure if this is from the DB or the tombstones.

Please find the trouble shooting information attached as a text document, any help would be appreciated. Thanks.
Attachments
greyhole_troubleshooting.txt
Trouble shooting data
(10.15 KiB) Downloaded 143 times

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Re: Greyhole stuck in a loop?

Postby vegaramos1 » Tue Jan 28, 2014 10:38 pm

Looks like the db wasn't created.

Code: Select all

+--------------------------+ | Tables_in_hda_production | +--------------------------+ | app_dependencies | | apps | | cap_accesses | | cap_writers | | dbs | | dns_aliases | | firewalls | | hosts | | schema_migrations | | servers | | settings | | shares | | themes | | users | | webapp_aliases | | webapps | +--------------------------+
I tried to create the db and user, but I'm seeing an error message that I didn't see the first time I ran this....

Code: Select all

[root@amahi alvin]# hda-create-db-and-user greyhole hda-create-db-and-user: creating greyhole ERROR 1396 (HY000) at line 2: Operation CREATE USER failed for 'greyhole'@'localhost'

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

Re: Greyhole stuck in a loop?

Postby bigfoot65 » Wed Jan 29, 2014 4:37 am

Database for Greyhole is separate from hda_production. The error message you see is reflecting that the greyhole database and user already exist. If it were missing, Greyhole would not run.

Your problem is something else. I will have to look more at your config files to see if anything seems out of sorts.
ßîgƒσστ65
Applications Manager

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

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Re: Greyhole stuck in a loop?

Postby vegaramos1 » Wed Jan 29, 2014 11:42 pm

This is what I see for the greyhole tables:

Code: Select all

MariaDB [greyhole]> SHOW TABLES; +--------------------+ | Tables_in_greyhole | +--------------------+ | du_stats | | settings | | tasks | | tasks_completed | +--------------------+ 4 rows in set (0.01 sec)
du_stats is empty

Code: Select all

MariaDB [greyhole]> select * from settings; +-------------------------+-------+ | name | value | +-------------------------+-------+ | last_read_log_smbd_line | 0 | | last_OOS_notification | 0 | +-------------------------+-------+ MariaDB [greyhole]> select * from tasks; +----+--------+------------------------------+-----------+-----------------+---- ------+---------------------+ | id | action | share | full_path | additional_info | com plete | event_date | +----+--------+------------------------------+-----------+-----------------+---- ------+---------------------+ | 1 | fsck | /var/hda/files/books | NULL | metastore | yes | 2014-01-28 22:34:35 | | 2 | fsck | /var/hda/files/public | NULL | metastore | yes | 2014-01-28 22:34:35 | | 3 | fsck | /var/hda/files/pictures | NULL | metastore | yes | 2014-01-28 22:34:35 | | 4 | fsck | /var/hda/files/movies | NULL | metastore | yes | 2014-01-28 22:34:35 | | 5 | fsck | /var/hda/files/music | NULL | metastore | yes | 2014-01-28 22:34:35 | | 6 | fsck | /var/hda/files/docs | NULL | metastore | yes | 2014-01-28 22:34:35 | | 7 | fsck | /var/hda/files/DVDs | NULL | metastore | yes | 2014-01-28 22:34:35 | | 8 | fsck | /var/hda/files/Software | NULL | metastore | yes | 2014-01-28 22:34:35 | | 9 | fsck | /var/hda/files/torrents | NULL | metastore | yes | 2014-01-28 22:34:35 | | 10 | fsck | /var/hda/files/Ivette Folder | NULL | metastore | yes | 2014-01-28 22:34:35 | | 11 | fsck | /var/hda/files/ITunes | NULL | metastore | yes | 2014-01-28 22:34:35 | +----+--------+------------------------------+-----------+-----------------+---- ------+---------------------+ 11 rows in set (0.00 sec)
tasks_completed is empty;

Not sure if this helps...

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

Re: Greyhole stuck in a loop?

Postby bigfoot65 » Thu Jan 30, 2014 6:09 am

What version of Greyhole are you using? It might be worth upgrading it if you are not on the latest 0.9.41 release. One note of caution, for Amahi 7 you need to use hda-greyhole from the Amahi repo. If you do the following as root user, it will update if one is available:

Code: Select all

yum clean all yum update hda-greyhole
ßîgƒσστ65
Applications Manager

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

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Re: Greyhole stuck in a loop?

Postby vegaramos1 » Sat Feb 01, 2014 10:32 am

I tried what you suggested, and I was able to get Greyhole working, but I still have the same issue I originally posted about. When I add a file to the share, Greyhole seems to keep repeating the copy over and over again. I suspect the issue may be minidlna is locking the files, because I see this in the greyhole.log

Code: Select all

Feb 01 11:08:26 7 write: File /var/hda/files/DVDs/01 PS3 Kids Movies/Despicable Me 2.mp4 is locked by another process. Will wait until it's unlocked to work on it.
Is there anyway to avoid this locking?

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Re: Greyhole stuck in a loop?

Postby vegaramos1 » Sat Feb 01, 2014 12:25 pm

I stopped the minidlna service, but greyhole still seemed to be stuck in loop. I then disabled the minidlna service and rebooted the server. Greyhole then finished the pending tasks. I then tried copying yet another file to the server (still with minidlna disabled), and Greyhole continued copying the file over and over again to the same drives. At this point I'm starting to think that Greyhole has an issue.

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Re: Greyhole stuck in a loop?

Postby vegaramos1 » Sat Feb 01, 2014 12:57 pm

BTW, I can now see the version info.

Code: Select all

3.12.8-200.fc19.x86_64 samba-4.0.13-1.fc19.x86_64 hda-greyhole-0.9.39-5.x86_64

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

Re: Greyhole stuck in a loop?

Postby bigfoot65 » Sat Feb 01, 2014 2:58 pm

When using Minidlna you need to mount shares locally with greyhole and use the mnt directories. That's the issue I believe. Wiki has guidance.

[ Post made via Android ] Image
ßîgƒσστ65
Applications Manager

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

vegaramos1
Posts: 74
Joined: Thu Dec 16, 2010 6:00 pm

Re: Greyhole stuck in a loop?

Postby vegaramos1 » Sat Feb 01, 2014 3:33 pm

I have my minidlna configured as so. I don't see any guidance in the wiki to point it to the locally mounted shares.

Code: Select all

media_dir=A,/var/hda/files/music media_dir=V,/var/hda/files/DVDs media_dir=P,/var/hda/files/pictures
https://wiki.amahi.org/index.php/DLNA#D ... ation_File

...and I was following the instructions from this post....

viewtopic.php?f=19&t=4269

But I did completely disable the minidlna.service and I'm still running into this issue.

Who is online

Users browsing this forum: No registered users and 17 guests