Extra copies?

sakhurst
Posts: 2
Joined: Sun May 15, 2011 3:10 pm

Extra copies?

Postby sakhurst » Sun May 15, 2011 3:15 pm

So I thought that the extra copies function placed an extra copy of each folder on separate hard drives. But when I physically removed one hard drive from the pool (of three HDs), a lot of data was missing (despite all folders being set to max copies). I have all the data backed up, so it's not a big deal, but what's the purpose of the extra copies function if the extra copies are not on separate disks?

User avatar
lrevxl
Posts: 82
Joined: Fri Mar 04, 2011 7:23 pm
Location: Chicago, IL, USA
Contact:

Re: Extra copies?

Postby lrevxl » Mon May 16, 2011 5:05 am

That is what the extra file copies does. The data that's missing is missing because the linked copy was on the drive that you removed. When Greyhole sees a drive missing it schedules an fsck so it should end up: 1) recreating the missing copy and 2) linking to a valid copy of the files that were on the drive that you disconnected. This is not instant though, a Greyhole fsck can take a little while to complete, hence the statement on the Greyhole site saying do not use Greyhole if you need data that is always available, when you lose/remove drives it'll take a little bit to get those data links sorted. There are a few things you can do, check the Greyhole log to see what it's doing; go to the individual pool drives and verify the missing data is in fact on one or more of those drives; manually kick off an fsck to get the process going if it isn't running already.

sakhurst
Posts: 2
Joined: Sun May 15, 2011 3:10 pm

Re: Extra copies?

Postby sakhurst » Thu May 19, 2011 2:20 am

Thanks for replying lrevxl!

Here's the thing though...that's not what happened. This was my setup:

- 2 HDs, both included in the greyhole pool
- all shares set up with 1 extra copy

What I wanted to do was swap out one of the drives for a larger drive. So the larger one was going to join the pool and the smaller one was going to leave.

Here are the actions I took:

1) install the larger drive and permanently mount it.
2) add the larger drive to the greyhole pool
3) set all shares to "max copies"
3) fsck
4) remove the smaller drive from the pool
5) fsck
6) permanently unmount the smaller drive, shut down and physically disconnect the drive, reboot
7) fsck

When I checked the shares, data was missing all over the place. No matter how many times I reran fsck, it was just gone. Whole shares lost all their data, while others lost data here and there.

However, when I reconnected, remounted the smaller drive and reran fsck everything returned to its former order.

This has really undermined my confidence in greyhole, to the point where I want to disable it completely and just move all shares to the larger drive. However, removing drives from the pool and running fsck does not do this automatically (even though it should).

I'm really a Linux newbie, and right now the option I'm favouring the most is a backup of all shares, reinstall Amahi, and restoring all data...this time avoiding greyhole like the plague. But this would probably take up a weekend and I'm kind of dreading it.

Any suggestions on how I can disable greyhole and migrate the data without reinstalling?

User avatar
lrevxl
Posts: 82
Joined: Fri Mar 04, 2011 7:23 pm
Location: Chicago, IL, USA
Contact:

Re: Extra copies?

Postby lrevxl » Thu May 19, 2011 4:34 am

Your best bet for replacing a drive is the following:

Add the new drive to your server
Mount it
Add it to greyhole
Perform a --going on the drive you want to remove
Run an fsck

Doing the above causes Greyhole to recreate any copies stored on the the drive that's going away on the the other pool volumes. As to why your shares are losing most of or all their data, it sounds like there really isn't more than one copy. If you look at your /etc/greyhole.conf file, what do the num_copies properties say for each share? It should be 2 at least to generate the extra copies.

Who is online

Users browsing this forum: No registered users and 4 guests