Re: DRBD Trim Support

Lars Ellenberg <[email protected]>
Newsgroups gmane.comp.linux.drbd
Message-ID <[email protected]>
On Sat, Jan 08, 2022 at 04:24:54AM +0000, Eric Robinson wrote:
> According to the documentation, SSD TRIM/Discard support has been in DRBD
> since version 8. DRBD is supposed to detect if the underlying storage
> supports trim and, if so, automatically enable it. However, I am unable to
> TRIM my DRBD volumes.
> 
> [root@ha50a mysqld]# fstrim /ha
> fstrim: /ha: the discard operation is not supported
> 
> It looks like DRBD disk is the only thing in the stack that does not have trim enabled...

I would expect that you will find a log line like
discard_zeroes_data=0 and discard_zeroes_if_aligned=no: disabling discards

So you need to tell DRBD that you know that your storage backend
reliably returns _zeros_ for unmapped blocks, by setting
	discard-zeroes-if-aligned yes;
(and hope that is in fact the case)

    Lars

_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
[email protected]
https://lists.linbit.com/mailman/listinfo/drbd-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.