Solved

trim/discard support

  • 29 December 2016
  • 6 replies
  • 1503 views

Badge +3
Hi,

I am doing some tests with creating and deleting large files in a sles12 installation on our AHV environment. I use an ext4 filesystem and have enabled the trim/discard feature for the filesystem and lvm. But when i delete a large file with random data (5g size) the storage backend of the cluster does not see that the former used storage is now not longer used. I tried fstrim to initiate the cleanup but that doesn´t work. If I write zeros to the file/partition/filesystem then the backend gets backs the storage.
Is trim/discard supported to tell the storage backend that filesystem space is no longer needed or does anybody has experience with such a setup ?

Thank you for your help.

Regards
Hans
icon

Best answer by Jon 2 January 2017, 18:51

View original

This topic has been closed for comments

6 replies

Userlevel 6
Badge +29
What version of AOS are you running? We've had UNMAP/TRIM support since 4.7, and should just work automatically


Zero'ing of course is separate, that works on all new releases of Nutanix in the last year or so, as we've got zero suppression built right in, so we detect those zeros and just discard them for you.
Badge +3
Hi Jon,

we are using the newest version 4.7.3.3. Is there any example how to configure the os/filesystems ?

Regards
Hans
Userlevel 6
Badge +29
Generally if you're mounting the file system with the discard option, that should be enough.

Keep in mind, when using discard in the guest OS file stystem, the storage will be discarded on the backend as requested, but Prism might not update until the next full curator scan.

This article has some good info on discard in suse OS's: https://en.opensuse.org/SDB:SSD_discard_(trim)_support

Past that, if you are not seeing storage reclaimed after a full curator scan (generally every 6 hours), feel free to open a support ticket and we can dig into it with you. Portal.nutanix.com for NX and SX models, and the respective OEM for Dell XC and Lenovo HX
Badge +3
Hi Jon,

thank you for the information. Yesterday I did some tests with a SLES12SP2 KVM with an ext4 filesystem. After deleting large files and doing a fstrim nothing happend but after a curator full scan (for svm in `svmips`; do wget -O - "http://$svm:2010/master/api/client/StartCuratorTasks?task_type=2"; done) the backend got back the storage.

Thank you for your help.

Best regards
Hans Bienert
Badge
Hello Hans,

I would like to add there is a difference if you do perform a default install of SLES 12 SP1 which has TRIM enabled by default, and SLES 12 SP2 which does not.
Curator will release the storage after a full scan as previously discussed.

Hope this helps.

Thanks,
Neil.
24553