Question/issue with Greyhole checksums command and cron

arthurdent4242
Posts: 42
Joined: Tue Jan 22, 2013 3:36 pm

Question/issue with Greyhole checksums command and cron

Postby arthurdent4242 » Mon Jan 27, 2014 10:53 pm

Hey guys,

Quick question about this. When I run the command manually from the command line the command executes just fine, however when I try to run it as a cron job I receive an error

Code: Select all

fsck: Found a share (Books) defined in /etc/greyhole.conf with no path in /etc/samba/smb.conf. Either add this share in /etc/samba/smb.conf, or remove it from /etc/greyhole.conf, then restart Greyhole.
Not sure what is causing this. Can you guys provide any insight?

Additional question: If greyhole finds a differing MD5 on a file, how does it know which file is the "correct" file?

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

Re: Question/issue with Greyhole checksums command and cron

Postby bigfoot65 » Tue Jan 28, 2014 6:10 am

Hey guys,

Quick question about this. When I run the command manually from the command line the command executes just fine, however when I try to run it as a cron job I receive an error

Code: Select all

fsck: Found a share (Books) defined in /etc/greyhole.conf with no path in /etc/samba/smb.conf. Either add this share in /etc/samba/smb.conf, or remove it from /etc/greyhole.conf, then restart Greyhole.
I had this message once and I had misspelled the share name in /etc/greyhole.conf. If the share name in Samba is Books, then it must match in greyhole.conf. If that is the only one you have had issues with, check to ensure there is no special characters or spaces in the name.

As for the MD5 question, you may need to check the Greyhole website for answers. I would speculate that it would use the file with the oldest date possibly. Hopefully you can find something on the web site, otherwise, wait for an answer here from gboudreau.
ßîgƒσστ65
Applications Manager

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

arthurdent4242
Posts: 42
Joined: Tue Jan 22, 2013 3:36 pm

Re: Question/issue with Greyhole checksums command and cron

Postby arthurdent4242 » Tue Jan 28, 2014 9:53 am

Hey guys,

Quick question about this. When I run the command manually from the command line the command executes just fine, however when I try to run it as a cron job I receive an error

Code: Select all

fsck: Found a share (Books) defined in /etc/greyhole.conf with no path in /etc/samba/smb.conf. Either add this share in /etc/samba/smb.conf, or remove it from /etc/greyhole.conf, then restart Greyhole.
I had this message once and I had misspelled the share name in /etc/greyhole.conf. If the share name in Samba is Books, then it must match in greyhole.conf. If that is the only one you have had issues with, check to ensure there is no special characters or spaces in the name.

As for the MD5 question, you may need to check the Greyhole website for answers. I would speculate that it would use the file with the oldest date possibly. Hopefully you can find something on the web site, otherwise, wait for an answer here from gboudreau.
Your logic about the MD5 thing seems right to me. Will wait to see what GBoudreau says.

As to the other issue, this is not the issue in my case. When I initially saw this message I verified they both existed in the smb and greyhole conf files and verified that the information was correct. The curious thing is that it works when it is run manually from the CLI, but it fails when it is run as a cron job. For reference, here is the relevant info from both my smb and greyhole conf files showing that nothing is spelled wrong:

Code: Select all

greyhole.conf num_copies[Books] = 2 smb.conf [Books] comment = Books path = /var/hda/files/Books writeable = no browseable = yes valid users = OMITTED write list = OMITTED create mask = 0775 force create mode = 0664 directory mask = 0775 force directory mode = 0775 dfree command = /usr/bin/greyhole-dfree vfs objects = greyhole

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

Re: Question/issue with Greyhole checksums command and cron

Postby bigfoot65 » Tue Jan 28, 2014 10:13 am

Is this Amahi 7?

If so, the Book share is actually /var/hda/files/books for the path by default. If you change it to match a previous configuration, then that makes sense. Not sure if it would cause the issue, but wanted to point it out.
ßîgƒσστ65
Applications Manager

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

arthurdent4242
Posts: 42
Joined: Tue Jan 22, 2013 3:36 pm

Re: Question/issue with Greyhole checksums command and cron

Postby arthurdent4242 » Tue Jan 28, 2014 3:15 pm

Is this Amahi 7?

If so, the Book share is actually /var/hda/files/books for the path by default. If you change it to match a previous configuration, then that makes sense. Not sure if it would cause the issue, but wanted to point it out.
This is Amahi 6. Not sure what you mean by the path by default? You can see in my smb.conf line that the path you specified is the path that my books share is at, unless you are hinting at the case sensitviity?

And again, why would I only receive the error when it is a cron job that runs and not when I run it myself?

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

Re: Question/issue with Greyhole checksums command and cron

Postby bigfoot65 » Tue Jan 28, 2014 3:19 pm

This is Amahi 6. Not sure what you mean by the path by default? You can see in my smb.conf line that the path you specified is the path that my books share is at, unless you are hinting at the case sensitviity?
Yes that is what I meant, but since you are on Amahi 6 it won't matter as those are correct.
And again, why would I only receive the error when it is a cron job that runs and not when I run it myself?
I was just trying help. Have you done OS updates? How about the latest Greyhole? Maybe this is a bug that a newer version fixed.
ßîgƒσστ65
Applications Manager

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

arthurdent4242
Posts: 42
Joined: Tue Jan 22, 2013 3:36 pm

Re: Question/issue with Greyhole checksums command and cron

Postby arthurdent4242 » Tue Jan 28, 2014 3:40 pm

This is Amahi 6. Not sure what you mean by the path by default? You can see in my smb.conf line that the path you specified is the path that my books share is at, unless you are hinting at the case sensitviity?
Yes that is what I meant, but since you are on Amahi 6 it won't matter as those are correct.
And again, why would I only receive the error when it is a cron job that runs and not when I run it myself?
I was just trying help. Have you done OS updates? How about the latest Greyhole? Maybe this is a bug that a newer version fixed.
No worries, I hope you didn't interpret my previous comment as being overly aggressive. Was just curious why it was happening :).

System is up to date with the latest version of Greyhole (0.9.41-1). When I brought this up in the IRC GB seemed to know about the issue, but I had to leave so I didn't see if he had a solution.

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Question/issue with Greyhole checksums command and cron

Postby gboudreau » Tue Jan 28, 2014 3:40 pm

Additional question: If greyhole finds a differing MD5 on a file, how does it know which file is the "correct" file?
It doesn't assume anything, because it doesn't act on such errors; it will only reports them.
- Guillaume Boudreau

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Question/issue with Greyhole checksums command and cron

Postby gboudreau » Tue Jan 28, 2014 3:42 pm

When I run the command manually from the command line the command executes just fine, however when I try to run it as a cron job I receive an error

Code: Select all

fsck: Found a share (Books) defined in /etc/greyhole.conf with no path in /etc/samba/smb.conf. Either add this share in /etc/samba/smb.conf, or remove it from /etc/greyhole.conf, then restart Greyhole.
What is the exact command you execute? What user is it executed with, from the command line?
What is the exact cron line, and in what file is it defined (if defined in crontab, for what user)?
Also: see https://github.com/gboudreau/Greyhole/wiki/GetHelp > Gather system information
- Guillaume Boudreau

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Question/issue with Greyhole checksums command and cron

Postby gboudreau » Tue Jan 28, 2014 3:50 pm

When I run the command manually from the command line the command executes just fine, however when I try to run it as a cron job I receive an error

Code: Select all

fsck: Found a share (Books) defined in /etc/greyhole.conf with no path in /etc/samba/smb.conf. Either add this share in /etc/samba/smb.conf, or remove it from /etc/greyhole.conf, then restart Greyhole.
What is the exact command you execute? What user is it executed with, from the command line?
What is the exact cron line, and in what file is it defined (if defined in crontab, for what user)?
Also: see https://github.com/gboudreau/Greyhole/wiki/GetHelp > Gather system information
I think I know what is happening: the testparm executable is used to get your Samba config.
It's used without specifying a path, so the current user's PATH is used to find it. When run within cron, you're probably missing the /usr/bin/ folder in your PATH, thus why you get this error.

Ref: http://askubuntu.com/questions/23009/re ... s-not-work
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 16 guests