Page 1 of 1

Loss of data using Greyhole

Posted: Sun Jun 06, 2010 7:02 am
by jinxytj
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.

Re: Loss of data using Greyhole

Posted: Sun Jun 06, 2010 10:27 am
by gboudreau
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...

Re: Loss of data using Greyhole

Posted: Sun Jun 06, 2010 1:28 pm
by cpg
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.

Re: Loss of data using Greyhole

Posted: Sun Jun 06, 2010 1:36 pm
by gboudreau
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.

Re: Loss of data using Greyhole

Posted: Sun Jun 06, 2010 1:44 pm
by cpg
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.

Re: Loss of data using Greyhole

Posted: Sun Jun 06, 2010 1:54 pm
by gboudreau
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.

Re: Loss of data using Greyhole

Posted: Thu Jul 01, 2010 2:07 pm
by Quazeye
Hi,

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

Thanks,
Q

Re: Loss of data using Greyhole

Posted: Thu Jul 01, 2010 5:42 pm
by cpg
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.