[linux-lvm] on discards

Zdenek Kabelac zdenek.kabelac at gmail.com
Mon May 15 08:08:46 UTC 2017


Dne 15.5.2017 v 05:16 Xen napsal(a):
> On discards,
> 
> I have a thin pool that filled up when there was enough space, because the 
> filesystem hadn't issued discards.
> 
> I have ext4 mounted with the discard option, I hope, because it is in the list 
> of default mount options of tune2fs:
> 
> Default mount options:    user_xattr acl discard
> 
> What can I do to ensure that it won't happen again?
> 
> Is the filesystem really mounted with discard?
> 
> It doesn't say so anywhere.
> 


Hi


I'd not suggest to mount fs with discard - but rather run 'fstrim' in your 
cron once a while.

Standalone 'small trim' on deleted file is quite inefficient and will not 
resolve aggregation of continuous blocks for proper trimming.

For thin-pool - min size of trim is i.e. whole 64K chunk, - when it sits on 
SSD you need to even trim much multiple pool chunks to free something on your SSD.

When you run 'fstrim'   whole region of unused blocks is trimmed - to it's 
always biggest possible chunk.

Regards

Zdenek




More information about the linux-lvm mailing list