# BTRFS options in fstab

**URL:** <https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241>\
**Category:** Newbie\
**Created:** [November 22, 2021, 7:02pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241 "2021-11-22T19:02:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brtza](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/brtza/32/86831_2.png) [@Brtza](https://forum.endeavouros.com/u/Brtza)\
**Post date:** [November 22, 2021, 7:02pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/1 "2021-11-22T19:02:15Z")

</div>

Hi all,

I just installed i3 with BTRFS (/) and ext4 (home)

I hope all subvolumes are there and that everything is fine and correct.

But looking on the fstab, I found this :

```auto
> UUID=C5EC-F36B /boot/efi vfat umask=0077 0 2
> UUID=cf8452a9-aa15-446c-a5af-7d27dfa1d5d9 / btrfs subvol=/@,defaults,noatime,space_cache,autodefrag 0 1
> UUID=cf8452a9-aa15-446c-a5af-7d27dfa1d5d9 /var/cache btrfs subvol=/@cache,defaults,noatime,space_cache,autodefrag 0 2
> UUID=cf8452a9-aa15-446c-a5af-7d27dfa1d5d9 /var/log btrfs subvol=/@log,defaults,noatime,space_cache,autodefrag 0 2
> UUID=cdea5701-4b70-4491-a314-3ae5fe9df3c1 /home ext4 defaults,noatime 0 2
> UUID=ef02fea8-6c3e-4f72-9a55-bbd9d57e1f89 swap swap defaults,noatime 0 0

```

I dont see options for autodefrag, commpresion etc. But I didn’t have those options during the installation also 🙂

What to do to make it right ?

I have SSD disk, swap partition. Any additional step which I need ?

Thx

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [November 22, 2021, 7:09pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/2 "2021-11-22T19:09:23Z")

</div>

I would change it like this:

```nohighlight
,defaults,noatime,autodefrag,compress=zstd 0 0

```

The changes are:

- Remove `space_cache` since kernel 5.15 forward `space_cache=v2` is the default.
- Add `compression=zstd` - For compression 🙂
- Change the numbers at the end to 0 0 because btrfs doesn’t support fsck

---

<div class="post-metadata">

**Author:** ![Brtza](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/brtza/32/86831_2.png) [@Brtza](https://forum.endeavouros.com/u/Brtza)\
**Post date:** [November 22, 2021, 7:10pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/3 "2021-11-22T19:10:22Z")

</div>

Directly in fstab ? 🙂 sorry for my noobish questions

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [November 22, 2021, 7:11pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/4 "2021-11-22T19:11:55Z")

</div>

> [@Brtza](#):
>
> Directly in fstab ?

Yes. Put that after the subvol=whatever part because that is different on each mountpoint.

---

<div class="post-metadata">

**Author:** ![Brtza](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/brtza/32/86831_2.png) [@Brtza](https://forum.endeavouros.com/u/Brtza)\
**Post date:** [November 22, 2021, 7:16pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/5 "2021-11-22T19:16:46Z")

</div>

> [@dalto](#):
>
> `,defaults,noatime,autodefrag,compress=zstd 0 0`

Is it ok now ?

```auto

UUID=C5EC-F36B /boot/efi vfat umask=0077 0 2
UUID=cf8452a9-aa15-446c-a5af-7d27dfa1d5d9 / btrfs subvol=/@,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=cf8452a9-aa15-446c-a5af-7d27dfa1d5d9 /var/cache btrfs subvol=/@cache,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=cf8452a9-aa15-446c-a5af-7d27dfa1d5d9 /var/log btrfs subvol=/@log,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=cdea5701-4b70-4491-a314-3ae5fe9df3c1 /home ext4 defaults,noatime 0 2
UUID=ef02fea8-6c3e-4f72-9a55-bbd9d57e1f89 swap swap defaults,noatime 0 0

```

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [November 22, 2021, 7:18pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/6 "2021-11-22T19:18:35Z")

</div>

Looks good to me.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [November 23, 2021, 1:18am UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/7 "2021-11-23T01:18:09Z")

</div>

Just a dumb question on this. What is the point of using btrfs file system if you are aren’t using timeshift and snapshots or snapper? Just for my own thinking? Or is there no reason to use it otherwise over ext4?

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [November 23, 2021, 1:23am UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/8 "2021-11-23T01:23:24Z")

</div>

> [@ricklinux](#):
>
> What is the point of using btrfs file system if you are aren’t using timeshift and snapshots or snapper?

Just off the top of my head:

- Subvolumes(volumes which share space but can be managed separately)
- Transparent compression
- Easily expand volumes across drives
- Copy on write

---

<div class="post-metadata">

**Author:** ![Brtza](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/brtza/32/86831_2.png) [@Brtza](https://forum.endeavouros.com/u/Brtza)\
**Post date:** [November 23, 2021, 7:20am UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/9 "2021-11-23T07:20:11Z")

</div>

Hi,

I am using Timeshift and btrfs snapshots 🙂

---

<div class="post-metadata">

**Author:** ![freebird54](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/freebird54/32/83106_2.png) [@freebird54](https://forum.endeavouros.com/u/freebird54)\
**Post date:** [November 23, 2021, 7:58am UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/10 "2021-11-23T07:58:40Z")

</div>

I recently read (I think it was Linux Format) that btrfs actually outperforms ext4 in some measures - which is not something I expected to see! I wouldn’t make a change based on that, though.

Personally, if zfs can be made more accessible - then as I learn more of its capabilities I can add them in as fits my use. It apparently can do everything!

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [November 23, 2021, 2:17pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/11 "2021-11-23T14:17:02Z")

</div>

> [@freebird54](#):
>
> if zfs can be made more accessible

If there is interest, I could make an unofficial zfs ISO once the new ISO is released.

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [November 25, 2021, 2:17pm UTC](https://forum.endeavouros.com/t/btrfs-options-in-fstab/20241/12 "2021-11-25T14:17:06Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
