Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #244641

Re: Btrfs best practices: defrag?

From piorunz <piorunz@gmx.com>
Newsgroups linux.debian.user
Subject Re: Btrfs best practices: defrag?
Date 2022-01-26 21:40 +0100
Message-ID <DJXfc-6gi-7@gated-at.bofh.it> (permalink)
References <Dv2A9-6R3-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I'd like to add question to this topic.

Is it safe & recommended to run autodefrag mount option in fstab?
I am considering two machines here, normal desktop which has Btrfs as
/home, and server with VM and other databases also btrfs /home. Both
Btrfs RAID10 types. Both are heavily fragmented. I never defragmented
them, in fact.

Running manual defrag on server machine, like:
sudo btrfs filesystem defrag -v -t4G -r /home
takes ages and can cause 120 second timeout kernel error in dmesg due to
service timeouts. I prefer to autodefrag gradually, overtime, mount
option seems to be good for that.

My current fstab mounting:

noatime,space_cache=v2,compress-force=zstd:3 0 2

Will autodefrag break COW files? Like I copy paste a file and I save
space, but defrag with destroy this space saving?
Also, will autodefrag compress files automatically, as mount option
enforces (compress-force=zstd:3)?

Any suggestions welcome.

--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀⠀⠀

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Btrfs best practices "Jorge P. de Morais Neto" <jorge+list@disroot.org> - 2021-12-16 18:20 +0100
  Re: Btrfs best practices Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2021-12-16 19:00 +0100
    Re: Btrfs best practices Jorge P. de Morais Neto <jorge+list@disroot.org> - 2021-12-16 19:20 +0100
  Re: Btrfs best practices Jorge P. de Morais Neto <jorge+list@disroot.org> - 2021-12-16 19:20 +0100
  Re: Btrfs best practices: defrag? piorunz <piorunz@gmx.com> - 2022-01-26 21:40 +0100
    Re: Btrfs best practices: defrag? Andy Smith <andy@strugglers.net> - 2022-01-27 23:20 +0100
  Re: Btrfs best practices Jorge P. de Morais Neto <jorge+list@disroot.org> - 2022-01-29 21:00 +0100

csiph-web