Page 1 of 1

SOLVED: Deletions restored, renames reverted, etc.

Posted: Sat May 25, 2013 5:33 pm
by Bureaucromancer
In the process of testing my installation I've found that running fsck results in changes made to files in the pool, particularly deletions and renaming to be reverted.

As an example, this file that had previously been deleted in the windows explorer or the locally mounted share (tried both) gets this treatment during the fsck.

Code: Select all

May 25 20:26:55 6 fsck_file: Now working on task ID 15890: fsck_file Misc/test.txt May 25 20:26:55 7 fsck_file: Found /var/hda/files/drives/drive1/gh/Misc/test.txt May 25 20:26:55 7 fsck_file: Loading metafiles for Misc/test.txt ... May 25 20:26:55 7 fsck_file: Got 1 metadata files: array ( '/var/hda/files/drives/drive1/gh/Misc/test.txt' => array ( 'path' => '/var/hda/files/drives/drive1/gh/Misc/test.txt', 'is_linked' => true, 'state' => 'OK', ), ) May 25 20:26:55 6 fsck_file: Symlink was missing. Creating new symlink. May 25 20:26:55 7 fsck_file: Missing symlink... A pending unlink transaction maybe? May 25 20:26:55 7 fsck_file: No... Found no good reason for the symlink to be missing! Let's re-create it. May 25 20:26:55 7 fsck_file: Updating symlink at /var/hda/files/Misc//test.txt to point to /var/hda/files/drives/drive1/gh/Misc/test.txt May 25 20:26:55 7 fsck_file: Saving 1 metadata files for Misc/test.txt May 25 20:26:55 7 fsck_file: Saving metadata in /var/hda/files/drives/drive1/gh/.gh_metastore/Misc/test.txt May 25 20:26:55 7 fsck_file: Saving backup metadata file in /var/hda/files/gh/.gh_metastore_backup/Misc//test.txt
My understanding is that this shouldn't be happening (that there should be at least a pending transactions associated with the file), but I'm pretty tenuous on what all is involved in greyhole file handling so first of all, is this normal? If not, could it realistically be a side effect of having installed amahi on Ubuntu server edition (if it is I'll just start over now); if not, what should I be looking for? For that matter, if it IS expected, how do I force greyhole to catch up on these sort of file operations that fsck doesn't do?

Re: Deletions restored, renames reverted, etc.

Posted: Sat May 25, 2013 6:41 pm
by sgtfoo
It looks like you were missing a file pointer that indicates where the file truly resides. I think this is part of sweeping the graveyard for missing symlinks... if I'm not mistaken. ... looks normal.... no? (looking at the greyhole pros)

Re: Deletions restored, renames reverted, etc.

Posted: Sun May 26, 2013 12:58 pm
by Bureaucromancer
Update on this.

I deleted some stuff last night and waited until this afternoon to see what would happen overnight once an automatic check runs. When I tested in this afternoon the changes were still in place, but were reverted by a manual -fsck.

Re: Deletions restored, renames reverted, etc.

Posted: Mon May 27, 2013 9:24 am
by Bureaucromancer
Reinstalled amahi using everything as recommended (by which I mean using desktop ubuntu instead of server). This is still happening.

How do I actually delete, or even edit, files in the pool? Whatever I do changes get reverted by the next greyhole fsck, manual or automatic. Deleting or changing files in explorer or locally mounted shares just gets me that message about missing symlinks, with no reported reason for it, and things get relinked.

Re: Deletions restored, renames reverted, etc.

Posted: Mon May 27, 2013 12:05 pm
by bigfoot65
What are you using to remove files? Might I suggest you try upgrading Greyhole to the latest version and see if that helps. There were some bug fixes in the latest that might relate to your problem.

https://wiki.amahi.org/index.php/Greyhole_updating

I would recommend option 2. I am running the latest version and it appears to be working fine for me.

Re: Deletions restored, renames reverted, etc.

Posted: Mon May 27, 2013 12:21 pm
by Bureaucromancer
Will do the update and report back.

As far as how I'm removing (and editing) files, it's mostly been through windows explorer, but I've also deleted with rm from a the terminal (in /mnt/samba, not /var/hda/files) and edited with nano.

Update: Sorry, n00b questions to follow: so reading through the wiki it seems to be meant for Fedora. What should I be doing about hda-greyhole only being available as an rpm? Just installing rpm doesn't seem like it will handle an existing install properly. There seems to be an old link on https://wiki.amahi.org/index.php/Ubuntu regarding rpms on Ubuntu, but it's dead.

PS: Just found viewtopic.php?f=39&t=4510, would this still be the correct way of updating greyhole on Ubuntu?

Re: Deletions restored, renames reverted, etc.

Posted: Mon May 27, 2013 1:37 pm
by bigfoot65
Yes that link is correct for updating to the latest Greyhole. We need to update the wiki, but never seems to be enough time to do everything that needs done :(

Check the Greyhole website for the latest version, which I believe is 0.9.31.

Re: Deletions restored, renames reverted, etc.

Posted: Mon May 27, 2013 7:57 pm
by Bureaucromancer
Ok, that's fixed it. Thanks.

Re: Deletions restored, renames reverted, etc.

Posted: Tue May 28, 2013 4:42 am
by bigfoot65
Awesome, glad it fixed your issue. I am going to open a bug in our issue tracker to update Amahi to the latest version of Greyhole for new installs. Seems like the right thing to do in order to prevent issues such as yours.