SUMMARY: rdist(1) and hard links

From: wmg@pixels.att.com
Date: Fri May 31 1991 - 11:52:03 CDT


My original question was;

I have a question about rdist(1). rdist does not seem able to
distribute links (I don't mean symbolic links.) I have a directory
structure which I would like to maintain of several different
machines, and that structure already has many links within it.
Is there a way around this problem? If not is there a better or another
way of doing what I want? I have read the manual page, but it only
mentions symbolic links. Any pointer would be appreciated.

Conclusions:

     Rdist can handle hard links when the paths are the same on both
machines. Unfortunately, it does not correctly handle the case when
you do an install to a different location, which leaves me with several
options.

        1. Replace all of the hard links with symbolic links. This is no
           good in my case, too many, spread to far apart (read to much
           work.)

        2. Make a symbolic link on the destination host that matches the
           source host. This is the route that I will use, as it is the
           easiest.
        
        3. Use the special directive in the rdist file. Again no good
           due to the number of hard links.

        4. Use the -w option on rdist. This will not work in my case as
           it reproduces the entire source tree from the root under the
           destination tree.

A summary of responses is provided below the following list of
names. Many thanks to:

dupuy@hudson.cs.columbia.edu (Alexander Dupuy)
rwolf@dretor.dciem.dnd.ca (Robert J Wolf)
melissa@cunixe.cc.columbia.edu (Melissa Metz)
jay@Princeton.EDU (Jay Plett)
trinkle@cs.purdue.edu (Daniel Trinkle)
oconnor!miker@oddjob.uchicago.edu (Mike Raffety)
rlk@Think.COM (Robert L Krawitz)
angela@everest.tandem.com (Angela Marie Thomas)
das@edee.edinburgh.ac.uk (David Stewart)

From: Daniel Trinkle <trinkle@cs.purdue.edu>

     Rdist can handle hard links when the paths are the same on both
machines. Unfortunately, it does not correctly handle the case when
you do an install to a different location.

From: Robert J Wolf <rwolf@dretor.dciem.dnd.ca>

I am not sure how to fix your problem but you should consider switching to
symbolic links for the following simple reasons:
- easier to maintain and recognize
- easier to backup and restore using various commands

Hard links were okay before but are fading from use. Bite the bullet and
convert, then be happier ever after.

From: Jay Plett <jay@Princeton.EDU>

The code inside rdist is pretty kludgy. rdist does deal with
hard links, modulo its weaknesses at dealing correctly with
anything at all.

I have found that it works much better if you can contrive that
the remote pathname and the local pathname are identical. That
is probably what is required to solve your problem (it's been a
long time since I looked at the code, and my memory isn't that
great).

For example, I need to rdist a hierarchy which is rooted on the
"master" host at "/sun4". I want the files to appear in
/usr/princeton on the slave host. It only works reliably if I
rdist to /sun4 on the slave and make /usr/princeton a symbolic
link to /sun4.

From: Angela Marie Thomas <angela@everest.tandem.com>

One thing you can do is use the "special" primitive to create the hard links
once the first file is installed. Something like:

dir -> host
    install rdir;
    special dir/file "rm rdir/newfile; ln rdir/file rdir/file2";

This should change the hard links to dir/file every time it's updated.

From: Mike Raffety <oconnor!miker@oddjob.uchicago.edu>

Try adding the -w flag to your rdist command line, or the install line.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:14 CDT