View Single Post
  #2  
Old 06-10-2005, 02:53 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Steve,

You are, indeed, right: we unroll hard links -- but from what I can tell, ditto does too, sometimes. Here's how I tested: I created a disk image named "test", and -- from /usr/share/zoneinfo -- I did:

ditto US /Volumes/test/US

When I did this, all the hard links were unrolled, kind of as I would expect.

ASR is rather different, since it does a very low-level block copy, and doesn't deal with files. It also can't subset the drive (which, clearly, can't always guarantee the 'original' inode will be copied, so if you don't unroll you end up with a bad copy).

ditto only seems to copy hard links if the file with the original inode is copied. I tested this by touching "c" and hard linking "c.copy" to it. I then copied both files to the root of the test volume, and they were preserved as hard links.

We've not encountered a problem, yet, with what we're doing, but I agree that it's something that we should take a look at -- and we shall. Thanks for reporting it.
__________________
--Dave Nanian
Reply With Quote