Page 1 of 1

FSCK defaulting to --if-config-changed

Posted: Wed Feb 02, 2011 1:25 pm
by adavidm
Hi,

as the subject says really, I cannot run an fsck as greyhole is assuming the option --if-config-changed is set even though i am not specifying it. Any ideas?

Thanks in advance

David

Code: Select all

Version Info: 2.6.32.26-175.fc12.i686 samba-3.4.9-60.fc12.i686 hda-greyhole-0.8.4-1.i386

Code: Select all

[code]# This file is automatically generated by Amahi on Tue Feb 01 00:00:57 +0000 2011 # Any manual changes WILL BE OVERWRITTEN! # Set the defaults (carefully) in /var/hda/platform/html/config/greyhole.yml db_engine = mysql db_host = localhost db_user = greyhole db_pass = greyhole db_name = greyhole 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 df_cache_time = 15 delete_moves_to_attic = true # sticky_files and stick_into options are nested - see http://wiki.amahi.org/index.php/Greyhole#Greyhole_advanced_options sticky_files = Music/ sticky_files = Movies/Films/*/* # add any group of other settings # here in multiple lines storage_pool_directory = /mnt/store_a/gh, min_free: 11gb storage_pool_directory = /mnt/store_b/gh, min_free: 11gb storage_pool_directory = /mnt/store_c/gh, min_free: 11gb num_copies[Books] = 2 num_copies[Pictures] = 2 num_copies[Movies] = 1 num_copies[Music] = 2 num_copies[Docs] = 2 num_copies[Greyhole Attic] = 1
[/code]

Re: FSCK defaulting to --if-config-changed

Posted: Wed Feb 02, 2011 2:16 pm
by NeverSimple
Hi,

as the subject says really, I cannot run an fsck as greyhole is assuming the option --if-config-changed is set even though i am not specifying it. Any ideas?
Hi David,

After reading your post, I guess you already tried to run it manually but it runs fine at my HDA, although i'm still on 0.8.3.1. Could be this has changed but that seems somewhat unlikely. Although '--if config-changed' is the default (instead of running every night at midnight), you can still run an '--fsck' anytime you like. In a terminal, as 'root', just enter greyhole --fsck [--dir=/path/to a specific share]. You can get the options for greyhole by just entering 'greyhole' without any options.

Richard

Re: FSCK defaulting to --if-config-changed

Posted: Wed Feb 02, 2011 4:55 pm
by gboudreau
I can't see how this could happen. I checked the code, and everything about that seems fine.

Try this: wait for /var/log/greyhole.log to say "Sleeping..."
On the command line, as root:

Code: Select all

greyhole --fsck --dir=/var/hda/files/movies/
Then look again in greyhole.log (tail /var/log/greyhole.log) to see what it says.

If something doesn't look right, please reply here, and copy-paste what you have in your Terminal (the command you executed and the tail etc.)

Re: FSCK defaulting to --if-config-changed

Posted: Fri Feb 04, 2011 6:45 am
by adavidm
Sorry about this. There was a power failure during the night and, after starting back up, the problem has gone. I was specifying individual directories as you suggested and was getting the same result.

If the problem comes back I will take copies of the logs. I was wondering if two copies of greyhole might have been running at the same time or something, but I can't go back and check 'ps' now.

Thanks for both of your attempts to assist :D

Re: FSCK defaulting to --if-config-changed

Posted: Tue Feb 08, 2011 2:24 pm
by adavidm
Guillaume,

This problem has come back, i'm afraid. running:

greyhole --fsck --dir /var/hda/files/movies

shows the following in the log:

Feb 08 21:20:18 7 sleep: Nothing to do... Sleeping.
Feb 08 21:20:24 6 fsck: Optimizing MySQL tables...
Feb 08 21:20:28 7 fsck: Now working on task ID 35840: fsck /var/hda/files/movies//
Feb 08 21:20:28 6 fsck: Skipping fsck; --if-conf-changed was specified, and the configuration file didn't change since the last fsck.
Feb 08 21:20:28 7 sleep: Nothing to do... Sleeping.

I suspect a reboot will cure this again but am willing to leave it like that if you have any tests you would like running?

adavidm

edit: Spell Guillaume's name right!

Re: FSCK defaulting to --if-config-changed

Posted: Tue Feb 08, 2011 2:36 pm
by gboudreau

Code: Select all

mysql -ugreyhole -pgreyhole -e "select * from tasks_completed where action = 'fsck'" greyhole

Re: FSCK defaulting to --if-config-changed

Posted: Tue Feb 08, 2011 2:52 pm
by adavidm
weird:

Code: Select all

+-------+--------+-----------------------------------------------+-----------+---------------------------+----------+---------------------+ | id | action | share | full_path | additional_info | complete | event_date | +-------+--------+-----------------------------------------------+-----------+---------------------------+----------+---------------------+ | 5902 | fsck | | NULL | graveyard | yes | 2011-01-20 22:15:51 | | 5909 | fsck | | NULL | graveyard | yes | 2011-01-20 23:45:16 | | 5914 | fsck | | NULL | graveyard | yes | 2011-01-21 00:06:00 | | 6018 | fsck | | NULL | graveyard | yes | 2011-01-21 00:21:12 | | 8695 | fsck | | NULL | graveyard | yes | 2011-01-21 21:20:11 | | 10214 | fsck | | NULL | graveyard | yes | 2011-01-21 21:43:52 | | 10215 | fsck | | NULL | graveyard | yes | 2011-01-21 22:23:03 | | 10266 | fsck | | NULL | graveyard | yes | 2011-01-21 22:25:47 | | 11035 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:10:37 | | 11036 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:11:45 | | 11037 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:12:25 | | 11278 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:22:16 | | 11415 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:24:15 | | 11546 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:38:27 | | 12604 | fsck | /var/hda/files/books/ | NULL | NULL | yes | 2011-01-21 23:42:16 | | 12605 | fsck | | NULL | NULL | yes | 2011-01-21 23:56:32 | | 17852 | fsck | | NULL | NULL | yes | 2011-01-22 00:32:00 | | 18191 | fsck | /var/hda/files/docs/Users/ | NULL | NULL | yes | 2011-01-22 16:23:26 | | 18622 | fsck | /var/hda/files/docs/ | NULL | NULL | yes | 2011-01-22 16:57:08 | | 21423 | fsck | /var/hda/files/music/ | NULL | NULL | yes | 2011-01-22 18:26:25 | | 22244 | fsck | /var/hda/files/movies/ | NULL | NULL | yes | 2011-01-22 19:21:21 | | 22261 | fsck | /var/hda/files/movies/ | NULL | NULL | yes | 2011-01-22 19:47:30 | | 22343 | fsck | /var/hda/files/movies/ | NULL | NULL | yes | 2011-01-22 21:51:32 | | 22405 | fsck | | NULL | email | yes | 2011-01-23 00:00:13 | | 24744 | fsck | /var/hda/files/movies/ | NULL | graveyard | yes | 2011-01-23 16:15:15 | | 26084 | fsck | | NULL | graveyard | yes | 2011-01-24 00:01:33 | | 31937 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-24 03:43:01 | | 31938 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-25 03:41:02 | | 31939 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-26 03:23:01 | | 32073 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-27 03:18:05 | | 32074 | fsck | | NULL | email | yes | 2011-01-27 03:40:03 | | 32270 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-28 03:10:02 | | 32366 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-29 03:35:02 | | 32367 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-30 03:39:01 | | 32474 | fsck | | NULL | email|if-conf-changed | yes | 2011-01-31 03:15:02 | | 32497 | fsck | /var/hda/files/movies/SABnzb | NULL | graveyard | yes | 2011-01-31 12:45:43 | | 32563 | fsck | ./ | NULL | graveyard | yes | 2011-01-31 19:11:44 | | 32565 | fsck | /var/hda/files/movies/Films/Stardust | NULL | graveyard | yes | 2011-01-31 19:14:22 | | 32618 | fsck | /var/hda/files/movies/Films/Stardust/VIDEO_TS | NULL | graveyard | yes | 2011-01-31 19:55:11 | | 32740 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-01 03:30:01 | | 32910 | fsck | | NULL | NULL | yes | 2011-02-01 22:26:51 | | 34509 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-02 03:20:02 | | 34510 | fsck | | NULL | graveyard|if-conf-changed | yes | 2011-02-02 19:41:51 | | 34512 | fsck | /var/hda/files/movies/Films/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 19:54:09 | | 34513 | fsck | /var/hda/files/movies/Films/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 19:54:38 | | 34514 | fsck | /var/hda/files/movies/Films/ | NULL | if-conf-changed | yes | 2011-02-02 19:55:04 | | 34515 | fsck | /var/hda/files/movies/Films/ | NULL | if-conf-changed | yes | 2011-02-02 19:55:29 | | 34516 | fsck | /var/hda/files/movies/Films/ | NULL | if-conf-changed | yes | 2011-02-02 19:57:44 | | 34517 | fsck | /var/hda/files/movies/Films/ | NULL | if-conf-changed | yes | 2011-02-02 19:59:00 | | 34518 | fsck | /var/hda/files/docs/ | NULL | if-conf-changed | yes | 2011-02-02 19:59:54 | | 34519 | fsck | /var/hda/files/docs/ | NULL | if-conf-changed | yes | 2011-02-02 20:06:36 | | 34520 | fsck | /var/hda/files/docs | NULL | if-conf-changed | yes | 2011-02-02 20:06:58 | | 34521 | fsck | /var/hda/files/docs | NULL | if-conf-changed | yes | 2011-02-02 20:07:11 | | 34522 | fsck | /var/hda/files/docs | NULL | if-conf-changed | yes | 2011-02-02 20:07:35 | | 34523 | fsck | | NULL | graveyard|if-conf-changed | yes | 2011-02-02 20:10:49 | | 34535 | fsck | /var/hda/files/movies/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 20:46:49 | | 34536 | fsck | /var/hda/files/movies/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 20:47:19 | | 34889 | fsck | /var/hda/files/movies/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 21:13:26 | | 34890 | fsck | /var/hda/files/movies/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 21:17:18 | | 34891 | fsck | /var/hda/files/movies/ | NULL | graveyard|if-conf-changed | yes | 2011-02-02 22:16:45 | | 35355 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-03 20:21:02 | | 35356 | fsck | | NULL | email | yes | 2011-02-03 20:48:03 | | 35362 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-04 03:07:02 | | 35363 | fsck | /var/hda/files/movies/ | NULL | graveyard | yes | 2011-02-04 13:38:15 | | 35524 | fsck | /var/hda/files/movies | NULL | graveyard | yes | 2011-02-04 13:41:54 | | 35688 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-05 03:23:01 | | 35746 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-06 03:23:01 | | 35747 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-07 03:35:02 | | 35748 | fsck | | NULL | email|if-conf-changed | yes | 2011-02-08 03:15:01 | | 35839 | fsck | | NULL | graveyard|if-conf-changed | yes | 2011-02-08 21:12:29 | | 35840 | fsck | /var/hda/files/movies/ | NULL | graveyard|if-conf-changed | yes | 2011-02-08 21:20:24 | +-------+--------+-----------------------------------------------+-----------+---------------------------+----------+---------------------+

Re: FSCK defaulting to --if-config-changed

Posted: Tue Feb 08, 2011 6:07 pm
by gboudreau
What does that return, on the command line ("fsck of ..."):

Code: Select all

greyhole --fsck --dir /var/hda/files/movies
Try those:

Code: Select all

service greyhole stop greyhole --fsck --dir=/var/hda/files/movies greyhole -f -d /var/hda/files/movies greyhole --fsck -d /var/hda/files/movies greyhole -f --dir=/var/hda/files/movies greyhole -f --dir /var/hda/files/movies mysql -ugreyhole -pgreyhole -e "select * from tasks where action = 'fsck'" greyhole service greyhole restart
The mysql command should tell us which one of the above commands added the if-conf-changed, and which didn't.
I'm guessing the code that parses the command-line options doesn't like you or something... I can't reproduce your issue here.

Re: FSCK defaulting to --if-config-changed

Posted: Sun Feb 13, 2011 7:51 am
by adavidm
Sorry, have been away for a few days.

It's behaving itself again now (had to reboot for something else). I will reply again with your suggested commands if it happens again.
I'm guessing the code that parses the command-line options doesn't like you or something...
not the first time, :D.

David

Re: FSCK defaulting to --if-config-changed

Posted: Mon Feb 28, 2011 9:20 pm
by techlife
I had this exact issue in 0.8.3-2 and 0.9.0-1.

Upgraded to 0.9.1-1 tonight and it's gone. --fsck works as it's supposed to with no mention of --if-config-changed. Woot!!

Thanks for all the hard work and great support, gboudreau!!!