-2

archivemount allows rw-mounting tar archives.

What happens when I delete a file? Is it actually removed from the tar archive? Is a delete flag set?

If the file is actually removed, then I assume the operation to be painfully slow, because the whole archive would need to be rewritten, at least from the point where the file has been deleted.

  • I'm surprised by the down votes. It this not a valid question? – feklee Jun 24 '14 at 8:09
  • Questions typically get downvoted due to topicality or level of details. Usually there is an expectation of 'show your own working', which you're lacking here. – Sobrique Jun 24 '14 at 10:48
  • @Sobrique I like to keep questions terse, only adding detail where I believe it helps with understanding the question. If you think this question could be improved, then please let me know how. – feklee Jun 24 '14 at 10:58
  • I'd suggest here: serverfault.com/help/how-to-ask - that's probably the baseline that's being referred to when you're getting downvotes. – Sobrique Jun 24 '14 at 11:09
4

You can test this fairly easily

create a tar file

tar -cf test.tar this.txt that.txt

Get it's inode number for later comparison

ls -i test.tar
24903987 test.tar

Mount the test.tar archive and delete a file from it

archivemount test.tar /mnt/a
rm /mnt/a/that.txt
ls -i test.tar
24903987 test.tar

Note above that the file retains it's original inode number. Lets unmount the tar file and see wnat happens

umount /mnt/a
ls -i test.tar
24903988 test.tar

The inode number has changed so it's a new file. This would likely be very slow on a large archive.

  • Thanks for the test! I thought I ask before I go through the potential hassle of installing archivemount. – feklee Jun 24 '14 at 8:08
  • 2
    I installed it and ran the tests in less than 5 minutes - it's trivial. – Iain Jun 24 '14 at 8:09
1

If I understand archivemount correctly, it does not actually update the contents of the archive file before you unmount it. When unmounting, it re-creates the archive and sure, with a huge archive file this will be slow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.