Ceph, and fstab discard

NKarnel

New Member
Sep 4, 2019
8
0
1
33
Hello everyone,

I'm thinking of using the "discard" flag in my guest VMs fstabs.

Is there any downside to it, apart from maybe a performance hit?
What about data integrity?

Thanks!
 
This shouldn't make a difference for CephFS, as a client is writing/reading objects to/from a pool and the metadata is kept by the MDS in another. An object deletion should directly release the occupied space.
 
I'm using RDB mainly, and it does make a difference in the total "used" space seen by the cluster, thus helps me oversubscribe space.
 
Yes, using discard in /etc/fstab or fstrim in crontab is working fine on rbd to release space.
(just enable discard too on the vm disk option).

Just be carefull of discard in /etc/fstab, before kernel 4.7, it was not async, so you need to wait when you delete a file.
with kernel >= 4.7, it's async, so no performance degradation.
 
  • Like
Reactions: Lephisto
@spirit, thanks for clarifying. It seems I completely misread the post. ;)