0

I noticed that the files in the by-hash directories are not hardlinked to the actual files, as I would have expected. This means that any mirror downloads consume double the time and bandwidth for the dists directories.

Is this a problem or an actual design decision?

To demonstrate, I can rsync down a very small directory from the official mirror. You'll notice that the timestamps are actually different, so it is not a matter of hard links not being replicated:

+ rm -rf /tmp/test
+ rsync -aAH --delete rsync://mirror.enzu.com/ubuntu/dists/cosmic-proposed/restricted/source/ /tmp/test/
+ echo 0
0
+ find /tmp/test/ -type f -exec ls -igG '{}' +
51 -rw-r--r-- 1  64 May 18 01:30 /tmp/test/by-hash/SHA256/1ecf8ede6a1ae61b641204572f1da419db0786316399292b17e653658e90f36e
52 -rw-r--r-- 1 112 May  2 03:56 /tmp/test/by-hash/SHA256/c2250852d322551048ac95dfcaa941a5dd4ebb29dbb64e8ccb101c78b62b4217
53 -rw-r--r-- 1  40 May 18 01:30 /tmp/test/by-hash/SHA256/e7ab72b8f37c7c9c9f6386fb8e3dfa40bf6fe4b67876703c5927e47cb8664ce4
47 -rw-r--r-- 1 112 Oct 15 11:35 /tmp/test/Release
48 -rw-r--r-- 1  40 Oct 15 11:35 /tmp/test/Sources.gz
50 -rw-r--r-- 1  64 Oct 15 11:35 /tmp/test/Sources.xz
+ hardlink -t /tmp/test
Mode:     real
Files:    6
Linked:   3 files
Compared: 0 xattrs
Compared: 3 files
Saved:    216 bytes
Duration: 0.00 seconds
+ find /tmp/test/ -type f -exec ls -igG '{}' +
50 -rw-r--r-- 2  64 Oct 15 11:35 /tmp/test/by-hash/SHA256/1ecf8ede6a1ae61b641204572f1da419db0786316399292b17e653658e90f36e
47 -rw-r--r-- 2 112 Oct 15 11:35 /tmp/test/by-hash/SHA256/c2250852d322551048ac95dfcaa941a5dd4ebb29dbb64e8ccb101c78b62b4217
48 -rw-r--r-- 2  40 Oct 15 11:35 /tmp/test/by-hash/SHA256/e7ab72b8f37c7c9c9f6386fb8e3dfa40bf6fe4b67876703c5927e47cb8664ce4
47 -rw-r--r-- 2 112 Oct 15 11:35 /tmp/test/Release
48 -rw-r--r-- 2  40 Oct 15 11:35 /tmp/test/Sources.gz
50 -rw-r--r-- 2  64 Oct 15 11:35 /tmp/test/Sources.xz
  • Is it possible that the main archive.ubuntu.com uses links, but the mirror you're using lost that information because of whichever syncing method it uses? – muru Oct 15 '18 at 3:31
  • @muru updating my question clarifying why I don't think this is a mirror issue: 1) did test against main mirror and 2) the timestamps are off anyway – chutz Oct 15 '18 at 6:30
  • Your update didn't clarify anything because 1) I said the archive.ubuntu.com repository, the source of mirrors, not a mirror, and 2) they could use symbolic links, in which case the timestamps would be of the links, not the target, but save space anyway. – muru Oct 15 '18 at 6:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.