Page 1 of 2
Problem removing /var/hda/files
Posted: Mon Feb 18, 2013 12:20 pm
by evylrat
Versions;
Code: Select all
2.6.35.6-45.fc14.x86_64
samba-3.5.8-76.fc14.x86_64
hda-greyhole-0.9.31-1.x86_64
/etc/samba/smb.conf
/etc/greyhole.conf
Originally I'd found lots of files in the /var/hda/files/gh folder, that had not appeared on the share. So I followed the advice on
http://forums.amahi.org/viewtopic.php?f=39&t=4035 and tried to use the GOING command on /var/hda/files/gh.
Greyhole said it couldn't find it. So I unchecked if from the control panel anyway, then when I checked greyhole, my drive 1 was missing. I stopped and restarted the service, did not fix it.
I check the /etc/greyhole.conf file and there was an error.
Code: Select all
df_cache_time = 15
delete_moves_to_attic = true
sticky_files = Music/storage_pool_directory = /var/hda/files/drives/drive1/gh, min_free: 10gb
storage_pool_directory = /var/hda/files/drives/drive2/gh, min_free: 10gb
storage_pool_directory = /var/hda/files/drives/drive3/gh, min_free: 10gb
num_copies[Books] = 1
num_copies[Pictures] = 1
num_copies[Movies] = 1
It had moved one of the lines to the end of another line. I fixed this (as you can see from fpaste above) and I got my drive back. Is this a bug?
Re: Problem removing /var/hda/files
Posted: Wed Feb 20, 2013 2:43 pm
by bigfoot65
Had you been editing the .conf file? Sometimes changing what the dashboard and Greyhole expects causes other issues.
If you suspect this may be a bug with Greyhole, please use it's bug tracker. If you think it's Amahi related, use ours.
Either way, if you file a bug please provide details.
Re: Problem removing /var/hda/files
Posted: Sat Mar 16, 2013 8:18 am
by evylrat
This error has recurred this morning. A vast amount of my MP3s disappeared from my shared music directory this morning. When I checked the status of Greyhole, it showed only drives 2 and 3. Checking the greyhole.conf file, it was as shown in the first post, with two lines merged.
Oh, just spotted the error. Looking at
https://wiki.amahi.org/index.php/Greyho ... ed_options.
I've written
rather than
I hope that fixed it.
Re: Problem removing /var/hda/files
Posted: Sat Mar 16, 2013 8:35 am
by bigfoot65
Syntax is crucial. I tend to not make changes to the .conf file. Minimizes error
[ Post made via Android ] 
Re: Problem removing /var/hda/files
Posted: Sun Mar 17, 2013 10:24 am
by evylrat
Still doing it. I've commented out the line in /var/hda/platform/html/config/greyhole.yml
But the lines in greyhole.conf keep combining, which stops Drive1 from being picked up.
Debating whether going from Fedora to Ubuntu on my Atom D525 machine will make any difference.
Re: Problem removing /var/hda/files
Posted: Sun Mar 17, 2013 10:29 am
by bigfoot65
Did you follow the guidance in the wiki for modifying this file?
https://wiki.amahi.org/index.php/Greyhole
Seems like there may be something out of place still. Might consider checking the Greyhole site as well. Could go back to the default greyhole.yml file, then try modifying it again.
Re: Problem removing /var/hda/files
Posted: Sun Mar 17, 2013 11:27 am
by evylrat
I just remembered what I changed originally. I wanted the CrashPlan share NOT to use the Attic. running the scripts at the top of the YML file, it showed an error on that line.
BUT using the sample conf file on the greyhole page also errors...
Code: Select all
echo 'require "yaml"; YAML::load(File.open("greyhole.yml"))' | irb
require "yaml"; YAML::load(File.open("greyhole.yml"))
ArgumentError: syntax error on line 18, col 0: ` email_to = root'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from (irb):1
from /usr/lib/ruby/1.8/date.rb:247
using the sample file at
https://gist.github.com/deanperry/1379102
I've put it back to as it was, with the crashplan line commented out, but it still fails the syntax check at the end of the file. Argh! Still broken! It's like it's not even reading the greyhole.yml file. I am going into HDA shares, clicking on a path, and hitting save, the greyhole.conf is being regenerated incorrectly.
If it worth DOWNGRADING it?
Re: Problem removing /var/hda/files
Posted: Sun Mar 17, 2013 11:50 am
by bigfoot65
What version of Greyhole are you using? Also if you cut and paste from a web page, it is likely there may be hidden characters embedded.
There is a util called dos2unix that you can try to ensure that is not a problem. Install it via the package manager, then do
.
It's those darn DOS characters that sometimes get in the way. Not sure if it will fix your issue, but worth a shot.
Re: Problem removing /var/hda/files
Posted: Sun Mar 17, 2013 12:02 pm
by evylrat
Done,
Code: Select all
[xxxx@amahi config]$ sudo dos2unix greyhole.yml
dos2unix: converting file greyhole.yml to UNIX format ...
[xxxx@amahi config]$ echo 'require "yaml"; YAML::load(File.open("greyhole.yml"))' | irb
require "yaml"; YAML::load(File.open("greyhole.yml"))
ArgumentError: syntax error on line 58, col 1: `'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from (irb):1
from /usr/lib/ruby/1.8/date.rb:247
The last line of greyhole.yml is just a comment.
Code: Select all
Fedora :: 2.6.35.6-45.fc14.x86_64
Samba :: samba-3.5.8-76.fc14.x86_64
Greyhole :: hda-greyhole-0.9.31-1.x86_64
Using the sample on the greyhole site and dos2unix still gives an error.
Code: Select all
[richardt@amahi config]$ sudo dos2unix greyhole.yml dos2unix: converting file greyhole.yml to UNIX format ...
[richardt@amahi config]$ echo 'require "yaml"; YAML::load(File.open("greyhole.yml"))' | irb
require "yaml"; YAML::load(File.open("greyhole.yml"))
ArgumentError: syntax error on line 18, col 0: ` email_to = root'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from (irb):1
from :0
But still the greyhole.conf generates with the error.
Re: Problem removing /var/hda/files
Posted: Sun Mar 17, 2013 2:17 pm
by bigfoot65
Definitely something odd going on here.
Ensure the files is owned by apache:apache. I have listed what mine looks like to see if that will help.
Code: Select all
#
# Greyhole default settings
#
# Note: if you make changes to this file and they do not appear
# in the greyhole.conf, please double check the formatting. To
# test the parsing of this file do:
#
# echo 'require "yaml"; YAML::load(File.open("greyhole.yml"))' | irb
#
# db_engine: sqlite or mysql
db_engine: mysql
# options for sqlite db engine
db_path: /var/cache/greyhole.sqlite
# options for mysql db engine
db_name: greyhole
db_user: greyhole
db_pass: greyhole
db_host: localhost
# other defaults:
email_to: root
greyhole_log_file: /var/log/greyhole.log
log_level: DEBUG
log_memory_usage: no
dir_selection_algorithm: most_available_space
df_cache_time: 15
delete_moves_to_attic: yes
balance_modified_files: no
# sticky_files and stick_into options can have special nested formatting. *indentation matters*
# see the details here http://wiki.amahi.org/index.php/Greyhole#Greyhole_advanced_options
sticky_files:
- - Music/
# special note about this field:
#
# * the format of this section is passed *raw*
# to he greyhole.conf file. i.e. use setting = value in greyhole
# style, not setting: value
# * do not use tabs in new lines below, use spaces. otherwise the
# yaml parser gets confused. (fwiw: vim does that automatically)
#
other: |-
# add any group of other settings
# here in multiple lines
I have not made any modifications and I am running the latest Greyhole, v0.9.31.