View Single Post
  #3  
Old 06-11-2005, 01:56 AM
steve steve is offline
Registered User
 
Join Date: Jun 2005
Location: Billings, MT
Posts: 4
Dave,

Thanks for the quick response. I hope your time at WWDC was useful and enjoyable!

I should have been more clear about how I used /usr/share/zoneinfo/US for testing. The hard linked files in that directory aren't hard linked to each other, so copying that directory by itself doesn't seem very revealing. In my tests, I cloned the entire boot volume, then checked /usr/share/zoneinfo/US on the target to quickly see what happened to link counts. Sorry for the confusion.

Also, I did not test ditto directly. I simply used Carbon Copy Cloner, and observed that hard links were preserved. According to CCC's log, it uses a series of ditto commands like this:

sudo /usr/bin/ditto -rsrcFork /'Applications' '/Volumes/<mytarget>'/'Applications'
sudo /usr/bin/ditto -rsrcFork /'usr' '/Volumes/<mytarget>'/'usr'
etc.

I would imagine that as long as all hard links to a particular inode are within one of the copied folders (like usr), ditto wouldn't need to unroll any of them. (Apparently that condition holds in Mac OS X's hard links, because I found no reduction in link counts within the CCC generated clone.)

Regarding asr, I used it like this:

sudo asr -source / -target /Volumes/<mytarget> -erase -verbose

In this simple application (source not an image), it apparently does not do a low-level block copy. My evidence is that modification dates of all symbolic link files (on the target) were updated during asr's operation. Ditto does the same thing. (I don't understand why in either case.) Note that asr and CCC/ditto took almost exactly the same amount of time to complete the clone, suggesting they're using the same copying method.

Incidentally, to fully explore the results of a cloning operation, I generate complete volume listings (sudo ls -lonTRA > ~/desktop/list.txt) of source and target, and compare them with FileMerge. It's time consuming, but interesting. That's how I discovered the loss of hard links with SuperDuper, and confirmed their complete preservation with asr and CCC. The symbolic link updating phenomenon with asr and CCC is a real nuisance, because it causes huge numbers of uninteresting differences.

Thanks for looking into the hard links issue. I'd love to see a FileMerge source/target listing comparison that shows only expected differences, rather than hundreds of disquieting extraneous ones caused by quirks of the cloning method.

Steve
Reply With Quote