Re: Unused blocks and fstrim

2024-09-23 Thread Tim Woodall
On Mon, 23 Sep 2024, Steve Keller wrote: Tim Woodall writes: The raid rebuild is a particular pain point IMO. It's important to do a discard after a failed disk rebuild otherwise every block is 'in use' on the underlying storage. Hmm, does a RAID rebuild really always copy the whole new d

Re: Unused blocks and fstrim

2024-09-23 Thread Steve Keller
Tim Woodall writes: > In the default, iscsi, md, lvm, ext2 do not keep this information. Don't > know if it's configurable sonewhere but I suspect not. Don't know about > btrfs. > > Some of this data is cached, but not between reboots. I have played a bit and it seems for ext4 and btrfs they kee

Re: Unused blocks and fstrim

2024-09-20 Thread Michael Kjörling
On 20 Sep 2024 10:04 +, from debianu...@woodall.me.uk (Tim Woodall): > I guess ZFS users might > have a different view of how useful lvm aware mdraid is :-) ZFS nowadays has the pool `autotrim` property (default off) and the `zpool trim` subcommand for manual or scripted usage. This is one of

Re: Unused blocks and fstrim

2024-09-20 Thread Tim Woodall
On Fri, 20 Sep 2024, Steve Keller wrote: I'd like to understand some technical details about how fstrim, file systems, and block devices work. Do ext4 and btrfs keep a list of blocks that have already been reported as unused or do they have to report all unused blocks to the block device layer

Unused blocks and fstrim

2024-09-20 Thread Steve Keller
I'd like to understand some technical details about how fstrim, file systems, and block devices work. Do ext4 and btrfs keep a list of blocks that have already been reported as unused or do they have to report all unused blocks to the block device layer everytime the fstrim command is issued? Doe