FSTab discard, ssd & LVM-thin

Issues related to applications and software problems and general support
Post Reply
veehexx
Posts: 24
Joined: 2017/11/24 18:40:03

FSTab discard, ssd & LVM-thin

Post by veehexx » 2020/05/20 13:08:15

i think we all know by now SSD/nvme needs discard/trim to clear out the old used blocks upon file deletions, which i've just found out LVM-thin provisioned disks also need the same (not used thin provisioned upto now).

centos8stream is installed to an LVM'd SSD and i've 2x raid1 HDD arrays for datastorage. One has fixed LVM, the other with LVM-Thin partitions.

Cockpit handled the raid & LVM configuration and i accepted default mount options.
fstab just shows the options 'default,x-parent=LVM-UUID' for these raid1 mounts. 'defaults' only for the SSD OS drive.

a quick test on an LVM-Thin partition showed that the disk didnt reclaim space immediately, so manually running fstrim made the deleted test filesize be available. assuming i dont manually trigger fstrim, will LVM(?) periodically clean up?

a bit of research online shows 'man mount' has been updated at some point as i found one quote explcitly stating discard had to be set manually pending further testing (so sounds like early SSD/LVM-Thin days). currently this disclaimer has been removed so i'm wondering if there is some logic away that handles discard operations automatically now without needing to specific it on the mount.
from what i also understand, i could blindly apply 'discard' option to all mounts and for those drives that dont support it, it'll just be ignored.

what is the current status of the discard option? I'd of thought it'd be default on now based on solid-state being pretty standard.


veehexx
Posts: 24
Joined: 2017/11/24 18:40:03

Re: FSTab discard, ssd & LVM-thin

Post by veehexx » 2020/05/21 08:16:27

thanks - this wasnt a link that came up in my search. Went with the periodic systemd method. Still surprised this isnt enabled by default, but there ya go!

Post Reply

Return to “CentOS 8 - General Support”