Am 15.01.23 um 15:43 schrieb Pascal Hambourg:
On 15/01/2023 at 13:13, Reindl Harald wrote:
Am 15.01.23 um 13:00 schrieb Pascal Hambourg:
Linux RAID supports TRIM/discard, but what does it do exactly ?
Does it only pass-through TRIM/discard information to the underlying
devices or can it also store information about which blocks contain
valid data in the superblock metadata?
pass-through TRIM/discard
it makes no sense to store that on the RAID layer
Wouldn't it make sense to:
- skip the initial sync at array creation
- only resync valid data areas during array resync
- reduce wear caused by useless writes on flash drives
- enable TRIM/discard with parity RAID levels by default without relying
on the underlying device capability to return zeroes on read after TRIM
- ignore mismatches in invalid data areas when scrubbing
it would make sense but it's out of question the way mdadm is
implemented today - just store the information without a proper usecase
would make things only worser
the intentional design of mdadm is a pure RAID implementation on the
device layer with no konwledge of the filesystem on top
everything you listed above has an answer and that's ZFS/BTRFS which has
RAID-functionality by design as part of the FS and hence knows implcit
that unused space don#t need to be mirrored
"skip the initial sync at array creation" - surely, would be nice, but
the design is "we don't know what is stord in thea RAID, our job is that
in RAID1 all mirros are identical at the phyiscal disk layer"