[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Tar as filesystem

From: Aaron Bentley
Subject: [Gnu-arch-users] Tar as filesystem
Date: 29 Dec 2003 13:44:07 -0500

A while ago, Miles Bader pointed out that patch-log files tend to waste
space on filesystems where the minimum block size is 4 k.  He suggested
storing old patch-logs in tar files, which lead me to thinking of using
tar as a filesystem format.

I implemented read-only access to tar as a LUFS filesystem over the past
weekend, and discovered tar sucks as a filesystem.  (Mail me if you want
to see the code.)

Perhaps these observations can be helpful the next time
tar-as-filesystem comes up:

- Access time for a particular file in a compressed tar is proportional
to the total size of the tar, because the tar must be decompressed
before the file can be accessed.

- Access time for a particular file in an uncompressed tar is also
proportional to the total size of the tar, because tar is a sequential
format that has no table of contents.

- File deletion as implemented by GNU tar doesn't reduce the size of the
tarfile.  It just blanks out the file data.

- File modification increases the size of the tarfile by the size of the
modified file, because the original copy is retained.

- GNU tar doesn't provide ctime and atime in contents-listing.

All of these problems are surmountable (e.g. with index-cache files, and
a tar-delete tool), but that's an awful lot of scaffolding to maintain,
and I'm not sure it'll ever be worth it. 

It's probably better to use specialized commands for accessing tars,
instead of treating them like a filesystem.

Aaron Bentley
Director of Technology
PanoMetrics, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]