Announcement

Collapse
No announcement yet.

Are Subvolumes on My Disk Being Compressed?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Are Subvolumes on My Disk Being Compressed?

    I have a traditional HDD as one of my of my secondary HDDs, and I have it auto mounted (It's an internal) using this part of the fstab:
    Code:
    #Convergent Refuge
    UUID=7fc2a06f-418b-4534-8fb4-0e615189565f /media/sarah/ConvergentRefuge btrfs   defaults,noatime,nodiratime,compress=zstd 0       1
    It has a subvolume called "Convergent Refuge" which has all the information on the drive in it so I can make easy backups of it.

    Is the compress=zstd enough to ensure that the subvolume is compressed as well, or do i need an additional entry for this?

    #2
    https://btrfs.wiki.kernel.org/index.php/Compression

    AFAIK, generally, a btrfs file system will use compression on all subvolumes if any of them are mounted with compression. Per-subvolume compression is not yet supported even though mtab will not display the compression option for those subvolumes not explicitly mounted with the option but they will still be compressed.

    You can individually compress a folder/file using chattr to set the +c flag. Theoretically, if you set the /home folder to compress, everything under it would be compressed as well.

    Also, last I checked, a ZSTD compressed file system cannot be booted by GRUB.

    Please Read Me

    Comment


      #3
      Yes, I know that because I encountered that issue already and had to fish an answer out of someone as to why the system wasn't booting anymore.

      Now I compress the @ subvolume with lzo, and not zstd.

      I think I used the UUID of the HDD though, not a subvolume on the secondary HDD. It's the UUID I get from sudo blkid.

      Do you thing this would effect anything? Would I have to specify a subvolume in the fstab to get it to compress or is the fstab entry fine as it is?

      Comment


        #4
        K, "hard drives" don't have UUIDs, file systems do. btrfs subvolumes don't have UUIDs, the filesystem the subvolume resides on does.

        Did you read the link or was my comment not clear? If you compress a subvolume with an fstab entry, that subvolume and all other subvolumes residing on the same btrfs file system are compressed because per-subvolume compression is not yet implemented - per the wiki.

        Please Read Me

        Comment


          #5
          My bad, meant to say file system.

          I just wanted to confirm it. It wasn't clear in my mind.

          Comment

          Working...
          X