Page 1 of 1

Greyhole init issues

Posted: Tue Aug 03, 2010 8:29 am
by geekraver
I installed Amahi and created shares on two drives (mounted at /media/HIT2_0 and /media/SEA1_5). I then set up two other drives (/media/SAM1_5 and /media/SAM1_0) in a storage pool and turned on storage pooling for some of my shares. The files are not being propagated to the pool though. I saw this in /var/log/messages:


Aug 2 23:37:04 server smbd_greyhole: [2010/08/02 23:37:04, 0] smbd/service.c:1025(make_connection_snum)
Aug 2 23:37:04 server smbd_greyhole: '/media/SEA1_5/Videos' does not exist or permission denied when connecting to [Videos] Error was Permission denied
Aug 2 23:37:04 server smbd_greyhole: [2010/08/02 23:37:04, 0] smbd/service.c:1025(make_connection_snum)
Aug 2 23:37:04 server smbd_greyhole: '/media/SEA1_5/Videos' does not exist or permission denied when connecting to [Videos] Error was Permission denied

In the greyhole logs I see things like:

Aug 3 03:32:12 6 fsck: /media/SEA1_5/gram/Old Backups/misc/roameo/Program Files/Windows CE Tools/wce420/POCKET PC 2003/Mfc/Src/dlgcomm.cpp is a file (not a symlink). Adding a new 'write' pending task for that file.
Aug 3 03:32:12 6 fsck: /media/SEA1_5/gram/Old Backups/misc/roameo/Program Files/Windows CE Tools/wce420/POCKET PC 2003/Mfc/Src/timecore.cpp is a file (not a symlink). Adding a new 'write' pending task for that file.

(BTW I have a bazillion files so it's pretty scary that there are log messages for each file).

This may be related to a different issue I have with Samba (http://forums.amahi.org/viewtopic.php?f=4&t=1664), in which I can see my Samba shares from a Windows PC but I can't open them on the server itself.

Here is the greyhole.conf file:

# This file is automatically generated by Amahi on Mon Aug 02 22:08:01 -0700 2010
# Any manual changes WILL BE OVERWRITTEN!
# Set the defaults (carefully) in /var/hda/platform/html/config/greyhole.yml
db_engine = sqlite
db_path = /var/cache/greyhole.sqlite
balance_modified_files = false
email_to = root
samba_log_file = /var/log/messages
greyhole_log_file = /var/log/greyhole.log
log_level = DEBUG
log_memory_usage = false
dir_selection_algorithm = most_available_space
sticky_files = Music/
df_cache_time = 15
delete_moves_to_attic = true
# add any group of other settings
# here in multiple lines
storage_pool_directory = /media/SAM1_5/gh, min_free: 10gb
storage_pool_directory = /media/SAM1_0/gh, min_free: 10gb
num_copies[Music] = 2
num_copies[Videos] = 2
num_copies[Photos] = 2
num_copies[Public] = 2

Re: Greyhole init issues

Posted: Tue Aug 03, 2010 8:54 am
by gboudreau
If you have too many files, maybe Greyhole isn't for you.
Each day, starting at midnight, Greyhole will scan all your shares, and check all your files.
On my 7TB (1.65M files) shares, it takes 3h every night.

I never saw the error you posted below but I'm pretty sure it's unrelated to Greyhole. It's something about Samba and permissions not being right. It's also not related to your point about not having your files moved into your storage pool.

The fsck lines you showed above are fine. That means Greyhole has found your files in your shares, and has queued a task to move them to the storage pool.
All those tasks will be executed once fsck completes.
tail -f greyhole.log to see it work.

But again, if you have too many files, this could take a very long time to complete...
I suggest you drop by http://talk.amahi.org (#amahi on freenode) to talk.

Re: Greyhole init issues

Posted: Tue Aug 03, 2010 9:12 am
by geekraver
Thanks. I'll run a check later today on how many files I have. I suspect it may be similar to you (I have about 2.5TB of files unreplicated; there's a lot of small .h files etc from old software projects that involved FreeBSD kernel modifications. I could probably tar some of those up and greatly reduce the number of files. Or maybe its time to stop being such a pack rat and keeping software I wrote more than ten years ago :-) )

Re: Greyhole init issues

Posted: Tue Aug 03, 2010 9:14 am
by gboudreau
Good idea.
I myself tar'ed or iso'ed a couple of directories I had to help speed up my daily fsck.

Re: Greyhole init issues

Posted: Tue Aug 03, 2010 8:56 pm
by geekraver
Okay, I made some progress here. What I have found:

- for some reason Nautilus file manager does not open the Samba shares. I don't see any logs anywhere from this but the inability to open the HDA folder in the file manager seems to be a Nautilus issue
- if I explicitly mount the SAMBA shares myself with mount.cifs, then I *still* can't see them under Nautilus even though they mount ok
- nonetheless, the moment I mounted them manually, greyhole kicked off the file copying

So, this begs the question - are the shares supposed to be mounted in Amahi, and if so, why aren't mine, and if not, how is anyone else's greyhole working?

Re: Greyhole init issues

Posted: Tue Aug 03, 2010 9:02 pm
by geekraver
Aaargh - after a few files got copied, next I had this appear:

Aug 3 21:01:09 hda smbd_greyhole: '/media/SEA1_5/Music' does not exist or permission denied when connecting to [Music] Error was Resource temporarily unavailable
Aug 3 21:01:09 hda kernel: CIFS VFS: No response for cmd 117 mid 1666
Aug 3 21:01:09 hda kernel: CIFS VFS: Unexpected lookup error -11
Aug 3 21:01:09 hda kernel: CIFS VFS: Unexpected lookup error -11

WTF.

Re: Greyhole init issues

Posted: Tue Aug 03, 2010 9:04 pm
by geekraver
I guess it's this:

http://blog.dhampir.no/content/cifs-vfs ... -cmd-n-mid

Sheesh - WHS may be limited in functionality but it is a shitload less of a pain in the butt than this is proving to be.

Re: Greyhole init issues

Posted: Wed Aug 04, 2010 12:23 am
by geekraver
A couple of reboots later and the greyhole replication seems to be working now, without me having to mount the shares on the server itself. But CIFS does seem pretty screwed up; I can see shares from my PC but not from my wife's PC or from my media streamer (WD TV Live Plus) although the latter can see the DLNA stuff. It's a mess, but I think I can end this thread at least. Thanks for your help.