Show HN: Compressed directories on Linux
excamera.com
excamera.com
It's useful as a workaround for 32-bit applications which aren't built with LFS (Large File Support) enabled, and because of that fail on large XFS partitions. It's a very common bug in games which come out in 32-bit only. Making a loop device is a workaround, but using sudo for it all the time is annoying.
Also, there is probably no need to explicitly create a loop device, unless you already used up all existing ones (see man mount):
if no explicit loop device is mentioned (but just an
option `-o loop' is given), then mount will try to find
some unused loop device and use that, for example
mount /tmp/disk.img /mnt -o loop
I.e. in such case I simply create an empty file of certain size, then format it with some filesystem, and then mount it as a loop.For example:
dd if=/dev/zero of="$image" bs=1024K count="$img_size"
mkfs.xfs "$image"
sudo mount -o loop "$image" "$mount_path"
sudo chown $USER:$USER "$mount_path"This approach is not a useful path to lower overall disk usage IMO because you need to thick provision the directory up front, with an estimate of overall compressed disk usage. That's a recipe for usability pain. Thin provisioning with sparse files won't work well with a COW tree structured backing store like btrfs either.
Another possibility is data deduplication, which is useful if you have plenty of RAM. You can deduplicate across files on block level. However I have only used it sporadically due to the high ram usage.
Each of these datasets can have their own options set. So yeah it's basically the same thing as btrfs?
One of the benefits of NT's packet-driven I/O model (versus the UNIX synchronous VFS read/write blocking buffer I/O model).
Show HN is for something you've made that other people can play with. HN users can try it out, give you feedback, and ask questions in the thread.
This blog post is not a "Show HN" meterial.
Plase change the title to "Using BTRFS with loopback for compressed directories".
He/She is hoping the 50GB's are enough since there are no calculations on the article.