Greyhole only partionally working on netatalk/SAMBA shares?

amahivirtual
Posts: 19
Joined: Sun Jun 05, 2011 1:18 pm

Greyhole only partionally working on netatalk/SAMBA shares?

Postby amahivirtual » Wed Jul 06, 2011 5:40 am

Hi there,

I work on a fresh F 14/Amahi 6.1.0.1 installation. Additionally I installed netatalk 2.1.3.1 in order to get AFP enabled for some shares. I prefer AFP-shares to work on with my MacBooks at home for storage and as a Time Machine backup target. For the Windows side of life, I work with the SMB shares provided by Samba in Amahi.

In order to have all my shares under one Amahi hood, I create a new share called “macsamba” in Amahi. Afterwards for the AFP support of “macsamba”, I add this two lines at the end of /etc/netatalk/AppleVolume.default :
~ "%u" options:usedots,upriv
/var/hda/files/macsamba options:usedots,upriv,tm
So I could easily access “macsamba” as an AFP share from my Macs and as an SMB share from my Windows computers.
Now I add the share to be processed and duplicated by Greyhole. After doing that, I made some tests with these results:
  • A. MacOSX Client connects to macsamba via AFP, Upload of files and folders, MacOSX Client disconnects from macsamba. Starting Greyhole with greyhole --fsck: Everything works fine.
    B. MacOSX Client connects to macsamba via AFP, Upload of files and folders, MacOSX Client stays connected to macsamba. Starting Greyhole with greyhole --fsck: Greyhole seems to be caught in a loop during its work, it seems to be stuck on processing the locked “/.AppleDB/…” in “macsamba”.
    C. MacOSX Client connects to macsamba via AFP, deleting some files and folders via MacOSX Finder, MacOSX Client disconnects from macsamba. Starting Greyhole with greyhole --fsck: the previously deleted files and folder reappear. Greyhole seems not to delete them.
    D. MacOSX Client connects to macsamba via AFP, deleting some files and folders via Mac OS X Finder, MacOSX Client stays connected to macsamba. Starting Greyhole with greyhole --fsck: the previously deleted files and folder reappear. Greyhole seems not to delete them.
When I connect my MacBook via SMB to macsamba, all operations in A-D work as expected.
Is there a way to fix the issues in B.-D. or am I just working out of the actual Greyhole concept? If so, is there an ongoing work on an integration of netatalk in Greyhole as it has been done with SAMBA?
Sorry for the lengthy posting. If necessary I could provide more in-depth information of the greyhole-log or from other sources.

Regards,
amahivirtual

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

Re: Greyhole only partionally working on netatalk/SAMBA shar

Postby gboudreau » Thu Jul 07, 2011 6:24 am

There is no plan to support anything but Samba in the future.

The situation described by B. is normal. Greyhole is not stopped, it's just retrying over and over to work on a locked file.
That doesn't prevent it from working on other files. And it will be able to work on the locked file as soon as it's released by whatever is keeping it locked.

C. & D.: Also normal. Greyhole should be accessed through Samba, not otherwise. So when you delete a file without using Samba, you effectively just delete the symlink. When you run greyhole --fsck, greyhole notice a missing link, and just re-creates it.
In short: you won't be able to delete a file in a Greyhole-handled share without using Samba, or deleting all copies / metadata files corresponding.

Note that you should use Samba to access your shares, even from Mac clients (I only have Mac clients at home, including an AppleTV); all of them use Samba to access my files.
There is no advantage to use AFP on Mac clients: the open-source implementation of AFP (on the server side) is missing the features required to safely make TimeMachine backups on there.
You're best bet, if you can't backup to an Apple AFP share (another Mac, a TimeCapsule, or a HDD attached to an Airport Extreme), is to backup to sparsebundle file hosted on a Samba share. Myself, I didn't have much luck with that, and I'm not using my Airport Extreme for TM backups throughout the house.
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 2 guests