Loss of data using Greyhole

jinxytj
Posts: 5
Joined: Thu Dec 17, 2009 9:39 pm

Loss of data using Greyhole

Postby jinxytj » Sun Jun 06, 2010 7:02 am

Hi, I have been using greyhole for some time now, although a problem which has recently started is the loss of data within the storage poole. It began with some movies, although I thought it was my error as they were files I had been moving around.

The latest loss of data is with my music, 500 albums roughly. I have not added, moved or touched the files, and upon attemting to access them, all gone. The folders all remain and the size of the music folder which used to be 40 - 50 gigs is now under 2mb.

A couple of weeks ago when I began having these problems I looked though my greyhole logs, one of the rotated logs was 3gb. This was jammed with activities but has now gone in the rotation.

Any help appreciated.

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

Re: Loss of data using Greyhole

Postby gboudreau » Sun Jun 06, 2010 10:27 am

I investigated with him on IRC, and found out what happened:

1. His greyhole config file still contained two old directories as part of the storage pool.
In the past, those directories were partitions mounts, but they aren't anymore.
Because of that, those directories are not shown on the Shares > Storage Pool page, and thus he couldn't remove them from his storage pool.
This issue is already tracked here: http://bugs.amahi.org/issues/show/490

2. One of those directories was the 'sticky' dir for his Music share. i.e. all files on his Music share were stored there. Having the Music share 'sticky' is a default on Amahi, to support AmahiTunes which requires all music files to be on the same hard drive.

3. He didn't have choose to create extra copies for his Music share, so the files weren't anywhere else than in the 'sticky' dir.

4. Since he stopped using those two directories some times ago, he tried to manually delete (rm -rf) both of them, effectively deleting the only file copies he had of his music files.

So all this was part user error (he should have checked what was in those directories before deleting them!), part Amahi error (Amahi should show all storage pool directories in the Shares > Storage Pool page, even if they're not mount points).

Lucky for him, he has a copy of his music files somewhere else...
- Guillaume Boudreau

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Loss of data using Greyhole

Postby cpg » Sun Jun 06, 2010 1:28 pm

1. His greyhole config file still contained two old directories as part of the storage pool.
In the past, those directories were partitions mounts, but they aren't anymore.
Because of that, those directories are not shown on the Shares > Storage Pool page
ok, how did this happen in the first place?

the platform code could not, structurally, cause this, if i am not mistaken.

is this the relevant part?

> - show in the storage pool page the mounts that are in the db and not mounted atm, to allow the user to remove them if it's gone for good

can this happen because some drive is unmounted, then mounted in some other location?

i am not in context (and forgotten some of greyhole already by being swapped out of my medium term memory :) ), so please forgive if this are dumb questions.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

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

Re: Loss of data using Greyhole

Postby gboudreau » Sun Jun 06, 2010 1:36 pm

is this the relevant part?

> - show in the storage pool page the mounts that are in the db and not mounted atm, to allow the user to remove them if it's gone for good

can this happen because some drive is unmounted, then mounted in some other location?
Yes, and yes.

His drive was mounted as /mnt/sda before, and he included it in the pool then.
Then he changed his mind, and mounted it as /mnt/disk1, and also added that to the pool.
There is no way for him to remove /mnt/sda from the pool at this point, since it doesn't appear in the Shares > Storage Pool page anymore, since it's not a mount point.
So both the DB and his greyhole.conf contains both /mnt/sda and /mnt/disk1, which is a problem.
- Guillaume Boudreau

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Loss of data using Greyhole

Postby cpg » Sun Jun 06, 2010 1:44 pm

is a good solution to remove (automatically) the partitions in the pool that are not mounted?

problem is that it would require someone to actually browse the platform page(s).
until that happens, there is a window of opportunity for it still being in the pool.

wait, the new partition would not be added unless the user came to the pool settings page.

would that work as a solution?

the other is to show it with a scary warning and hope the user takes action.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

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

Re: Loss of data using Greyhole

Postby gboudreau » Sun Jun 06, 2010 1:54 pm

is a good solution to remove (automatically) the partitions in the pool that are not mounted?
I don't think so no.
The drive could be temporarily gone...
But it might be a good idea to keep it in the DB, and not put it in the greyhole.conf file if it's not a mount point at this time.
And later, when the user goes back to this page, it would be re-added to greyhole.conf if it's then a mount point.
- Guillaume Boudreau

Quazeye
Posts: 19
Joined: Wed Jun 30, 2010 9:41 pm
Location: Calgary, Alberta, Canada

Re: Loss of data using Greyhole

Postby Quazeye » Thu Jul 01, 2010 2:07 pm

Hi,

I am having this issue. How can I fix it?

Thanks,
Q

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Loss of data using Greyhole

Postby cpg » Thu Jul 01, 2010 5:42 pm

We have a fix for this in the latest code. if anyone wants it, please pm me. It will be in 5.4.2.
the fix.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 12 guests