Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Given a union file system (mhddfs, unionfs, aufs) would it save me anything if I overlaid a writable file system over one with a bunch of ISO files, say Ubuntu 10.04, and then use zsync to update the CD/DVD images to 10.04.1, 10.04.2 etc, respectively?

I suppose the question boils down to whether or not these overlay file systems keep track of blocks or only of files as a whole?

share|improve this question
2  
I can't speak for mhddfs (never heard of it), but unionfs and aufs operate at the file level. If one byte changes in a file that is located on a read-only branch of the union, the whole file is copied up. –  Celada Feb 12 '13 at 1:12
    
@Celada: thanks. Please write it up as an answer. It's not the result I was looking for, but it's certainly an answer to my question. –  0xC0000022L Feb 12 '13 at 13:47

1 Answer 1

up vote 4 down vote accepted

No, I don't think this will save you any disk space. It may even use more, since you've got multiple filesystems in play.

Celada is right -- a unionfs operates at the filename level, not the block level. If you change a file on a read-only layer filesystem, it gets copied to the writable layer. A block-level unionfs would be a heroic feat, if only because of the difficulty of separating the two filesystems afterwards. The unionfs would have to be a proper filesystem itself to keep track of which block is on which filesystem, and the writable filesystem would no longer contain complete files and would be unusable outside of the unionfs. At that point you may as well use a proper multi-disk filesystem like ZFS.

However, if all you're trying to do is avoid extra network traffic by downloading pieces of the CD images, then yes, I think zsync will do its job. It will probably be delayed on the first write to each file as the unionfs copies the large ISO image across filesystems, but otherwise things should work normally. But since it won't save any disk space, I'd rather zsync directly onto a base filesystem containing the initial ISOs, and not bother with unions.

share|improve this answer
    
Actually in this case it is about storage space. So if it doesn't save any, it defeats the purpose. Thanks for the succinct answer. –  0xC0000022L Feb 15 '13 at 18:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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