-1

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.

feklee
  • 505
  • 3
  • 18
  • I'm surprised by the down votes. It this not a valid question? – feklee Jun 24 '14 at 08: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: http://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

2 Answers2

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.

user9517
  • 114,104
  • 20
  • 206
  • 289
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.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78