How to reconnect Greyhole storage pool after Amahi rebuild

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

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby gboudreau » Sun Jan 23, 2011 3:25 am

Check in /var/log/greyhole.log to see what it's doing.
For me, a fsck of 8TB takes about 2h when it has nothing to repair. Add to that the time it would take to re-create all symlinks, and rewrite all tombstones, I'd guess 4-6h would be about right.

If fsck is done and you still don't see files, post a part of your greyhole.log where the fsck tried to work on a specific file.
Or, just run --fsck --dir /var/hda/files/some_share/some_small_folder and post what appears in greyhole.log when that runs.
- Guillaume Boudreau

User avatar
ralfb
Posts: 81
Joined: Mon Dec 06, 2010 7:23 pm
Location: Hong Kong

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby ralfb » Sun Jan 23, 2011 8:42 am

Hi again and many thanks

This is my entire greyhole log file:
Jan 23 03:26:03 7 prerotate: More than 900 tasks queued... Won't queue any more at this time.
Jan 23 03:26:03 6 prerotate: Samba log parsed using --prerotate
Jan 23 03:26:19 2 fsck: Can't insert write task: database is locked
Jan 23 03:26:19 6 postrotate: Samba log read pointer reset using --postrotate
does not seem like much is happening :-)

Also ran as suggested:

Code: Select all

[ralf@padme ~]$ su Password: [root@padme ralf]# run --fsck --dir /var/hda/files/books bash: run: command not found [root@padme ralf]# run --fsck --dir /var/hda/files/books bash: run: command not found [root@padme ralf]#
best,
Ralf

_______________________________________
Gigabyte GA-965G-DS3 Motherboard
Intel Pentium E2180 Processor @ 2.66MHz
Corsair 2 x 2GB xms2 DDR2 RAM
4 x 2T Western Digital Green Power HDD

User avatar
ralfb
Posts: 81
Joined: Mon Dec 06, 2010 7:23 pm
Location: Hong Kong

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby ralfb » Sun Jan 23, 2011 9:07 am

It just turned midnight here in Hong Kong and the greyhole log file exploded with activity.

Let's see what happens,

I'm going to bed now.
best,
Ralf

_______________________________________
Gigabyte GA-965G-DS3 Motherboard
Intel Pentium E2180 Processor @ 2.66MHz
Corsair 2 x 2GB xms2 DDR2 RAM
4 x 2T Western Digital Green Power HDD

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

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby gboudreau » Sun Jan 23, 2011 9:55 am

fsck: Can't insert write task: database is locked
That means you're using SQlite, not MySQL. Migrate ASAP.

The actual command I suggested is:

Code: Select all

greyhole --fsck --dir /var/hda/files/books
but you shouldn't need it, is a full fsck is ongoing.
- Guillaume Boudreau

User avatar
ralfb
Posts: 81
Joined: Mon Dec 06, 2010 7:23 pm
Location: Hong Kong

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby ralfb » Sun Jan 23, 2011 6:42 pm

ok great, migrated to mySQL:

Code: Select all

[root@padme ralf]# /usr/share/greyhole/db_migration-sqlite2mysql.sh Stopping Greyhole service watchdog... rm: cannot remove `/etc/monit.d/greyhole.conf': No such file or directory Reloading monit: Reinitializing monit daemon Done. Stopping Greyhole service... Shutting down Greyhole: [ OK ] Done. Creating MySQL database and user... hda-create-db-and-user: creating greyhole Done. Modifying Greyhole configuration to use MySQL... Done. Migrating data from SQLite to MySQL... Done. Starting Greyhole service... Starting Greyhole ... [ OK ] Done. Starting Greyhole service watchdog... Reloading monit: Reinitializing monit daemon Done. [root@padme ralf]# grep db_engine /etc/greyhole.conf db_engine = mysql [root@padme ralf]#
and restarted greyhole --fsck

Code: Select all

[root@padme ralf]# greyhole --fsck fsck of all shares has been scheduled. It will start after all currently pending tasks have been completed. [root@padme ralf]#
I can now see my shares being populated again so it believe it worked well.

Anything else I could do?


Maybe BALANCE? As I have 3 2 TB drives almost completely full and 1 2TB completely empty.
best,
Ralf

_______________________________________
Gigabyte GA-965G-DS3 Motherboard
Intel Pentium E2180 Processor @ 2.66MHz
Corsair 2 x 2GB xms2 DDR2 RAM
4 x 2T Western Digital Green Power HDD

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

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby gboudreau » Sun Jan 23, 2011 7:22 pm

Yes, a --balance would help, well, balance your drives' free space, if you want that.
But it might not be necessary, once Greyhole is done with fsck.
Anyway, it won't hurt either way.
- Guillaume Boudreau

User avatar
ralfb
Posts: 81
Joined: Mon Dec 06, 2010 7:23 pm
Location: Hong Kong

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby ralfb » Mon Jan 24, 2011 8:20 am

OK great, thanks.

Started a balance as still one drive empty whilst the others FULL.

Code: Select all

[root@padme ralf]# greyhole --balance A balance has been scheduled. It will start after all currently pending tasks have been completed. This operation will try to even the available space on all directories included in your storage pool. [root@padme ralf]#
best,
Ralf

_______________________________________
Gigabyte GA-965G-DS3 Motherboard
Intel Pentium E2180 Processor @ 2.66MHz
Corsair 2 x 2GB xms2 DDR2 RAM
4 x 2T Western Digital Green Power HDD

User avatar
ralfb
Posts: 81
Joined: Mon Dec 06, 2010 7:23 pm
Location: Hong Kong

Re: How to reconnect Greyhole storage pool after Amahi rebui

Postby ralfb » Mon Jan 24, 2011 6:38 pm

HDDs are nicely balanced now.

Many thanks for your help.
best,
Ralf

_______________________________________
Gigabyte GA-965G-DS3 Motherboard
Intel Pentium E2180 Processor @ 2.66MHz
Corsair 2 x 2GB xms2 DDR2 RAM
4 x 2T Western Digital Green Power HDD

Who is online

Users browsing this forum: No registered users and 24 guests