Is this the correct Btrfs structure?

I have done a clean install of Manjaro Gnome on my laptop, completely removing Windows. This time I have selected btrfs. Is everything fine here? Also I have fomated my 1tb drive as btrfs but it is not mounting at startup & I can not copy paste anything to that drive from usb drive.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=9A88-8C51                            /boot/efi      vfat    umask=0077 0 2
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /              btrfs   subvol=/@,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /home          btrfs   subvol=/@home,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/cache     btrfs   subvol=/@cache,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/log       btrfs   subvol=/@log,defaults 0 0
UUID=7d46ec8f-c2ad-472b-b831-1e162c8d9316 swap           swap    defaults,noatime 0 0
inxi -Fxaa                                                                                                                                               ✔ 
System:
  Host: Ultron Kernel: 5.15.21-1-MANJARO x86_64 bits: 64 compiler: gcc
    v: 11.1.0 parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 rw rootflags=subvol=@
    quiet splash resume=UUID=7d46ec8f-c2ad-472b-b831-1e162c8d9316
    udev.log_priority=3
  Desktop: GNOME 41.3 tk: GTK 3.24.31 wm: gnome-shell dm: GDM 41.3
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: HP product: OMEN Laptop 15-en0xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8786 v: 22.58 serial: <superuser required> UEFI: AMI
    v: F.13 date: 03/04/2021
Battery:
  ID-1: BAT0 charge: 58.4 Wh (100.0%) condition: 58.4/58.4 Wh (100.0%)
    volts: 12.8 min: 11.6 model: Hewlett-Packard Primary type: Li-ion
    serial: N/A status: Full cycles: 525
CPU:
  Info: model: AMD Ryzen 5 4600H with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 2 family: 0x17 (23) model-id: 0x60 (96) stepping: 1
    microcode: 0x8600106
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 8 MiB desc: 2x4 MiB
  Speed (MHz): avg: 1527 high: 2960 min/max: 1400/3000 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1397 2: 1397
    3: 1397 4: 1397 5: 1396 6: 1397 7: 1397 8: 1397 9: 1397 10: 2960 11: 1397
    12: 1397 bogomips: 71895
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile]
    vendor: Hewlett-Packard driver: nvidia v: 510.47.03
    alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:2191
    class-ID: 0300
  Device-2: AMD Renoir vendor: Hewlett-Packard driver: amdgpu v: kernel
    bus-ID: 07:00.0 chip-ID: 1002:1636 class-ID: 0300
  Device-3: Luxvisions Innotech Limited HP Wide Vision HD Camera type: USB
    driver: uvcvideo bus-ID: 3-3:2 chip-ID: 30c9:000e class-ID: 0e02
  Display: x11 server: X.org 1.21.1.3 compositor: gnome-shell driver:
    loaded: amdgpu,nvidia unloaded: modesetting,nouveau,radeon failed: ati
    alternate: fbdev,nv,vesa resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: NVIDIA TU116 High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 10de:1aeb
    class-ID: 0403
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor
    vendor: Hewlett-Packard driver: snd_rn_pci_acp3x v: kernel
    alternate: snd_pci_acp3x,snd_pci_acp5x bus-ID: 07:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-3: AMD Family 17h HD Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel bus-ID: 07:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.21-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.45 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel port: e000 bus-ID: 02:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: 30:24:a9:89:55:7a
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 03:00.0
    chip-ID: 8086:2723 class-ID: 0280
  IF: wlo1 state: up mac: 78:2b:46:4a:91:60
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-4:3 chip-ID: 8087:0029 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 1.38 TiB used: 15.42 GiB (1.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: SA2000M81000G
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: 50026B768474B93C
    rev: S5Z42109 temp: 24.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:2 vendor: Samsung
    model: MZVLB512HBJQ-000H1 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: S4GLNX0N998775
    rev: HPS0NEXF temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 460.08 GiB size: 460.08 GiB (100.00%)
    used: 15.42 GiB (3.4%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:4
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 568 KiB (0.2%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:3
  ID-3: /home raw-size: 460.08 GiB size: 460.08 GiB (100.00%)
    used: 15.42 GiB (3.4%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:4
  ID-4: /var/log raw-size: 460.08 GiB size: 460.08 GiB (100.00%)
    used: 15.42 GiB (3.4%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:4
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.56 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme1n1p3 maj-min: 259:5
Sensors:
  System Temperatures: cpu: 43.0 C mobo: N/A gpu: amdgpu temp: 37.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 347 Uptime: 24m wakeups: 1 Memory: 15.06 GiB
  used: 2.55 GiB (16.9%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: N/A Packages: pacman: 991 lib: 292 Shell: Zsh v: 5.8
  running-in: gnome-terminal inxi: 3.3.12

If it’s an SSD, then I would personally recommend adding the noatime mount option.

Both drives are NVMe ssd.
Ok I will add noatime on every line. Should I also add ‘ssd’?
Should i also enable fstrim.timer on a weekly basis?

The last line is for my secondary 1tb data drive. Is this fine?

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=9A88-8C51                            /boot/efi      vfat    umask=0077 0 2
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /              btrfs   subvol=/@,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /home          btrfs   subvol=/@home,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/cache     btrfs   subvol=/@cache,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/log       btrfs   subvol=/@log,defaults 0 0
UUID=7d46ec8f-c2ad-472b-b831-1e162c8d9316 swap           swap    defaults,noatime 0 0
UUID=d851a7cb-e915-4a85-a2d5-f699cc6a22a8 /home          btrfs   defaults,ssd 0 0

You can — and I myself have — but btrfs is supposed to be capable of auto-detecting whether it’s running on an SSD or on spinning rust, so it’s not necessary. :wink:

If it’s not enabled by default, then yes. :arrow_down:

sudo systemctl enable --now fstrim.timer

No, you are mounting it over your other /home. Create a folder in your $HOME somewhere — e.g. /home/your-user-name/Data — and use that as the mountpoint for your second drive.

2 Likes

Now it is mounting but has a lock sign but the fstab section is not longer alligned correctly. I also want to enable fstrim on this drive

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=9A88-8C51                            /boot/efi      vfat    umask=0077 0 2
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /              btrfs   subvol=/@,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /home          btrfs   subvol=/@home,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/cache     btrfs   subvol=/@cache,defaults 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/log       btrfs   subvol=/@log,defaults 0 0
UUID=7d46ec8f-c2ad-472b-b831-1e162c8d9316 swap           swap    defaults,noatime 0 0
UUID=d851a7cb-e915-4a85-a2d5-f699cc6a22a8 /home/avra/Data          btrfs   defaults,ssd 0 0

Yep, looking good, but you may also want to add noatime to that second drive’s mount options. :wink:

Oh, and remove noatime from the swap partition’s options. A swap partition doesn’t have a filesystem on it, so that option is pointless. :wink:

Yup added noatime on every line except swap. The 1tb data drive folder showing a lock sign & I still can’t copy pase things in there.

Also I want to enable fstrim for the 1tb data drive. Will the fstrim program automatically trim both drives or I have to manually indicate the data drive?

Try… :arrow_down:

sudo chown -R avra:avra /home/avra/Data

The fstrim.service automatically trims all read/write-mounted filesystems.

1 Like

Thank you very much

1 Like
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=9A88-8C51                            /boot/efi      vfat    umask=0077 0 2
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /              btrfs   subvol=/@,defaults,noatime 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /home          btrfs   subvol=/@home,defaults,noatime 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/cache     btrfs   subvol=/@cache,defaults,noatime 0 0
UUID=ae8ac2cf-fbd1-473d-bfff-8e6b11a36512 /var/log       btrfs   subvol=/@log,defaults,noatime 0 0
UUID=7d46ec8f-c2ad-472b-b831-1e162c8d9316 swap           swap    defaults 0 0
UUID=d851a7cb-e915-4a85-a2d5-f699cc6a22a8 /home/avra/Data          btrfs   defaults,noatime 0 0

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