From 6b3003bd3be4c42434c977fb797ce0e5bdc39ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C2=B0=5F=C2=B0I?= <6h8fn1zo@duck.com> Date: Sat, 2 Mar 2024 18:08:06 +0700 Subject: [PATCH 1/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ce97c1..703b904 100644 --- a/README.md +++ b/README.md @@ -155,10 +155,10 @@ non-bootable. 1. `sudo gedit /etc/fstab`, change it to look something like this (this is on fedora, yours might vary): ```shell - UUID= / btrfs subvol=root,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async 0 0 + UUID= / btrfs subvol=root,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,nobarrier,lazytime 0 0 UUID= /boot ext4 defaults 1 2 UUID= /boot/efi vfat umask=0077,shortname=winnt 0 2 - UUID= /home btrfs subvol=home,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async 0 0 + UUID= /home btrfs subvol=home,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,nobarrier,lazytime 0 0 ``` From c379f17c8b3d03ce01994ee9bda13a2a4d994ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C2=B0=5F=C2=B0I?= Date: Sat, 9 Mar 2024 08:19:56 +0700 Subject: [PATCH 2/2] Update README.md --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 703b904..4812583 100644 --- a/README.md +++ b/README.md @@ -155,11 +155,18 @@ non-bootable. 1. `sudo gedit /etc/fstab`, change it to look something like this (this is on fedora, yours might vary): ```shell - UUID= / btrfs subvol=root,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,nobarrier,lazytime 0 0 + UUID= / btrfs subvol=root,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,lazytime 0 0 UUID= /boot ext4 defaults 1 2 UUID= /boot/efi vfat umask=0077,shortname=winnt 0 2 - UUID= /home btrfs subvol=home,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,nobarrier,lazytime 0 0 + UUID= /home btrfs subvol=home,x-systemd.device-timeout=0,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,lazytime 0 0 ``` + > Optional : `nobarrier` + + `nobarrier` option is safe as long you didn't expect sudden powerloss happens or has battery-backed. + + _On a device with a volatile battery-backed write-back cache, the nobarrier option will not lead to filesystem corruption as the pending blocks are supposed to make it to the permanent storage._ [man 5 btrfs](https://btrfs.readthedocs.io/en/latest/btrfs-man5.html) + +On a device with a volatile battery-backed write-back cache, the nobarrier option will not lead to filesystem corruption as the pending blocks are supposed to make it to the permanent storage. 2. `sudo systemctl daemon-reload`