15

I know of the following transparent drive compressions on other operating systems:

  • MS-DOS 6.22 Doublespace (configured by autoexec.bat or config.sys)
  • Windiws XP/7: Drive Compression (configured by right-click on a folder in the file browser)

How to get transparent drive compression on Debian, Ubuntu and Linux Mint?

Possible, they are a solutions based on one of the follow one:

3 Answers 3

17

ext4 doesn't support compression, for that you need to use either Btrfs or ZFS (available in Ubuntu since 19.10 but it's still experimental).

Compression can be also configured on block device level with Device mapper VDO and than you could use it with ext4 (because it doesn't matter what filesystem is on top of the device), but that's currently not supported in Ubuntu.

5

You can compress and read/write a folder on ext4 p.e. by fuse-zip (a FUSE filesystem for zip archives with write support):

sudo mkdir -v /home/user/my_compressed_folder

Mount

mount /home/user/my_compressed_folder/zipArchive

fuse-zip foobar.zip /home/user/my_folder/zipArchive

Unmount

fusermount -u /home/user/my_compressed_folder/zipArchive

For additional information see: https://linux.die.net/man/1/fuse-zip

2
  • 4
    (1) Why do you need sudo to create a sub-directory in your user's home directory? (2) Are you sure it's mount /home/.../zipArchive, and not mkdir /home/.../zipArchive in your "mount" section (in particular when looking at the linked man-page)?
    – AdminBee
    Commented Feb 9, 2023 at 12:08
  • If I remember right, it only worked with sudo on my test system.
    – Alfred.37
    Commented Feb 9, 2023 at 12:19
1

You can run Debian, Ubuntu and Linux Mint on NTFS if you like. NTFS supports transparent drive compressing like btrfs, ZFS and and with the introduction of kernel 6.7 with bcachefs.

"According to the mount.ntfs-3g(8) manual page ( https://manpages.debian.org/buster/ntfs-3g/mount.ntfs-3g.8.en.html ):

This option enables creating new transparently compressed files in directories marked for compression. A directory is marked for compression by setting the bit 11 (value 0x00000800) in its Windows attribute. In such a directory, new files are created compressed and new subdirectories are themselves marked for compression. The option and the flag have no effect on existing files.

The compression option merely enables support for compression. You will still have to mark the individual directories as compressed in order for this to have any effect.

Even without this filesystem option, existing compressed files can still be read and modified."

Source: How to enable compression as mount option in /etc/fstab for ntfs-3g formatted disk under Linux?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .