this post was submitted on 02 Jan 2024
45 points (97.9% liked)

Linux

45582 readers
595 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm attempting a new install. I want to use btrfs with swapfile.

Do I need to disable compression on my swap subvolume?

Is there anything else I should keep in mind for fstab if I want to, say, not keep track of my Downloads folder when snapshotting?

Here is my fstab:

LABEL=arch@btrfs        /               btrfs           rw,relatime,discard=async,space_cache=v2,subvolid=256,subvol=>

LABEL=arch@btrfs        /home           btrfs           rw,relatime,discard=async,space_cache=v2,subvolid=257,subvol=>

LABEL=arch@btrfs        /var/cache/pacman/pkg   btrfs           rw,relatime,discard=async,space_cache=v2,subvolid=259>

LABEL=arch@btrfs        /var/log        btrfs           rw,relatime,discard=async,space_cache=v2,subvolid=258,subvol=>

LABEL=arch@btrfs        /.snapshots     btrfs           rw,relatime,discard=async,space_cache=v2,subvolid=260,subvol=>

LABEL=arch@btrfs        /swap           btrfs           rw,relatime,discard=async,space_cache=v2,subvolid=263,subvol=>

LABEL=efi@fat32         /efi            vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=asci>

/swap/swapfile          none            swap            defaults        0 0
you are viewing a single comment's thread
view the rest of the comments
[–] bazsy 6 points 6 months ago

Do I need to disable compression on my swap subvolume?

Short: No

Long: it doesn't matter when mounting multiple subvolumes of the same btrfs partition the options from the first one (usually /) will apply to all. So even if you disable it, that will be ignored.

The old way of creating swap shows the chattr +C line which disables CoW. The same method should work for your Downloads folder since CoW is needed for snapshotting.