trim/discard support | Nutanix Community
Skip to main content
Solved

trim/discard support

  • December 29, 2016
  • 6 replies
  • 1601 views

Forum|alt.badge.img+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

Best answer by Jon

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
View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

6 replies

Jon
Nutanix Employee
Forum|alt.badge.img+29
  • Nutanix Employee
  • 569 replies
  • December 29, 2016
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.

Forum|alt.badge.img+3
  • Author
  • Voyager
  • 2 replies
  • January 2, 2017
Hi Jon,

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

Regards
Hans

Jon
Nutanix Employee
Forum|alt.badge.img+29
  • Nutanix Employee
  • 569 replies
  • Answer
  • January 2, 2017
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

Forum|alt.badge.img+3
  • Author
  • Voyager
  • 2 replies
  • January 3, 2017
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

NeilN
Nutanix Employee
Forum|alt.badge.img
  • Nutanix Employee
  • 1 reply
  • January 24, 2017
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.

  • 0 replies
  • May 10, 2023
24553