From mboxrd@z Thu Jan 1 00:00:00 1970 From: "briangpowell ." Subject: Re: [OT] Git plus Syncthing: breaking hard links Date: Tue, 5 Apr 2016 19:29:35 -0400 Message-ID: References: <87h9fgbm2j.fsf@ericabrahamsen.net> <87bn5o1ax5.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113f061cdfdf09052fc5371c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anaPi-0005Hx-Rl for emacs-orgmode@gnu.org; Tue, 05 Apr 2016 19:29:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anaPh-0007Dp-A0 for emacs-orgmode@gnu.org; Tue, 05 Apr 2016 19:29:38 -0400 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:35436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anaPg-0007DJ-Ti for emacs-orgmode@gnu.org; Tue, 05 Apr 2016 19:29:37 -0400 Received: by mail-oi0-x22b.google.com with SMTP id p188so37171541oih.2 for ; Tue, 05 Apr 2016 16:29:36 -0700 (PDT) In-Reply-To: <87bn5o1ax5.fsf@pierrot.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos , Brian Powell Cc: emacs-orgmode --001a113f061cdfdf09052fc5371c Content-Type: text/plain; charset=UTF-8 * Strongly recommend you pay close attention to Nick Dokos--he's brilliant--agree totally with his suggestions; "hardlinks cannot span filesystems" etc. ** "hardlinks breaking"--in rsync I throw -H to include/follow hard links across filesystems when syncing. *** I'm with Nick though again--not sure what you mean by "hardlinks breaking" * Thanks for the "syncthing" link and comments--its open source: "Syncthing https://syncthing.net/ Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to ..." ** Sounds great, hope its easy to implement, thanks. *** I prefer rsync for such problems at the moment. * Suggest you use FuseFS and sshfs---and on her MacOS she can use BREW to install the FUSE .DMG package and use OSX shell to get to the filesystems that you're willing to share (you mentioned you were worried about providing too much). ** Not recommending SAMBA+CIFS protocol--especially right now, since there is a vulnerability to be revealed on 12APR16 ** Or you alone could use FuseFS and sshfs the dirs you want her to have access to on the machine you both share/access (you seem to indicate she has full and comfortable access to those dirs already--so installing the FUSE .DMG package is probably overkill). On Tue, Apr 5, 2016 at 8:45 AM, Nick Dokos wrote: > Eric Abrahamsen writes: > > > This isn't really a Org question at all, but you all are smart and > > friendly people, and are likely to have run into this situation before. > > So I'm trying here before I turn to StackOverflow! > > > > I have Org files in a git repo, synced across two Linux machines. At the > > same time, I have a few directories on these computers that I sync with > > colleagues, via Syncthing. > > > > One of these colleagues also uses Org, so instead of giving her access > > to my Org git repo, which would be a bit too much exposure, I hardlink > > some of the Org files into the Syncthing directories, and she accesses > > them there. With auto-revert-mode turned on, it's not too bad. > > > > Except that the hardlinks keep breaking! There are so many different > > systems interacting here that I have no idea where to even start > > looking. She's on a Mac, not Linux, and uses a fairly recent version of > > Emacs, plus Org from the ELPA package. She is *not* using git on her > > machine, just Syncthing and Emacs. > > > > How do the hardlinks break exactly? > > Hardlinks to a file are limited to the same filesystem: a file with > inode number N has essentially two or more directory entries, with > different names associated to the same inode number. Syncthing certainly > cannot maintain that as it copies the file to the cloud and back, so > there seem to be plenty of opportunities for breakage, but it's not > clear which one(s) obtain. > > > I'm inclined to blame Syncthing, but I really don't know where to start > > debugging. If any of you have any relevant experience, or any advice > > about where to look, that would be much appreciated. Otherwise, please > > excuse the off-topic post... > > > > -- > Nick > > > --001a113f061cdfdf09052fc5371c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
* Strongly recommend you pay close attention to Nick Dokos= --he's brilliant--agree totally with his suggestions; "hardlinks c= annot span filesystems" etc.

** "hardlinks bre= aking"--in rsync I throw -H to include/follow hard links across filesy= stems when syncing.

*** I'm with Nick though a= gain--not sure what you mean by=C2=A0"hardlinks breaking"

* Thanks for the "syncthing" link and comments-= -its open source:

"Syncthing
<= a href=3D"https://syncthing.net/">https://syncthing.net/
Sync= thing replaces proprietary sync and cloud services with something open, tru= stworthy and decentralized. Your data is your data alone and you deserve to= ..."

** Sounds great, hope its easy to= implement, thanks.

*** I prefer rsync for such pr= oblems at the moment.

* Suggest you use FuseFS and= sshfs---and on her MacOS she can use BREW to install the FUSE .DMG package= and use OSX shell to get to the filesystems that you're willing to sha= re (you mentioned you were worried about providing too much).
** Not recommending SAMBA+CIFS protocol--especially right now, = since there is a vulnerability to be revealed on 12APR16
** Or you alone could use FuseFS and sshfs the dirs you w= ant her to have access to on the machine you both share/access (you seem to= indicate she has full and comfortable access to those dirs already--so ins= talling the FUSE .DMG package is probably overkill).



On Tue, Apr 5, 2016 at 8:45 AM, Nick Dokos <ndokos@gmail.com> wrote:
Eric Abrahams= en <eric@ericabrahamsen.net> writes:

> This isn't really a Org question at all, but you all are smart and=
> friendly people, and are likely to have run into this situation before= .
> So I'm trying here before I turn to StackOverflow!
>
> I have Org files in a git repo, synced across two Linux machines. At t= he
> same time, I have a few directories on these computers that I sync wit= h
> colleagues, via Syncthing.
>
> One of these colleagues also uses Org, so instead of giving her access=
> to my Org git repo, which would be a bit too much exposure, I hardlink=
> some of the Org files into the Syncthing directories, and she accesses=
> them there. With auto-revert-mode turned on, it's not too bad.
>
> Except that the hardlinks keep breaking! There are so many different > systems interacting here that I have no idea where to even start
> looking. She's on a Mac, not Linux, and uses a fairly recent versi= on of
> Emacs, plus Org from the ELPA package. She is *not* using git on her > machine, just Syncthing and Emacs.
>

How do the hardlinks break exactly?

Hardlinks to a file are limited to the same filesystem: a file with
inode number N has essentially two or more directory entries, with
different names associated to the same inode number. Syncthing certainly cannot maintain that as it copies the file to the cloud and back, so
there seem to be plenty of opportunities for breakage, but it's not
clear which one(s) obtain.

> I'm inclined to blame Syncthing, but I really don't know where= to start
> debugging. If any of you have any relevant experience, or any advice > about where to look, that would be much appreciated. Otherwise, please=
> excuse the off-topic post...
>

--
Nick



--001a113f061cdfdf09052fc5371c--