Linux Thin Lun space reclamation

Hello,
We have IBM storwize v7000 storage. I have created thin provisioned LUN and attached it to my server(dell r910, Centos 7).
Whenever I copy files in that LUN correspondingly Thin provisioned LUN's used space increases but when I remove files to free up space the LUN's size isn't decreased.
I have opened case to IBM to address the issue but they stated that there is nothing wrong with the storage and that I should follow OS instructions to release removed blocks whenever files are removed .

Please share your opinion about this and pls let me know if you faced the same issue and how did you solve it.
Thanks in advance dear forum members

Usually there needs to be some sort of API for the integration of the OS with the storage device in order for the storage array to know that storage is no longer used. There sometimes can also be space reclamation if devices are zeroed by the OS, it depends on the implementation.

are there any SAN storage out there with the possibility to reclaim unused space? I really have never seen/heard about such storage. Does somebody have examples (but please don't say about vmware)?

Have no idea what should be done...

Hitachi has reclaim zero pages on enterprise level storage (VSP)

This is mostly used in combination with software on the machine.
For instance, with ASM, you can reclaim zero pages from ASM, then reclaim on storage.

A nice document :
https://www.hds.com/assets/pdf/reclaiming-storage-capacity-using-asm-storage-and-zero-page-reclamation-utility.pdf

There is an article on RHEL network regarding :

It involves creating a lvol with all free space from volume group, dd-ing the lvol with using /dev/zero, removing the lvol, remount with discard and running fstrim.
After that you can reclaim the storage space from storage GUI/command line.

Dunno how would you apply the same on raw volume tho (no VG).

Hope that helps.
Regards
Peasant.

1 Like

@Peasant, I will try the same for LVM. let you know the results

---------- Post updated at 04:27 AM ---------- Previous update was at 04:00 AM ----------

FOR IBM V7000 red-hats recommendation did not worked.
(dd if=/dev/zero of=/dev/$vg/$lv)

And per red-hat they remove VG which does not make sense if I destroy vg/file-system I can remove the corresponding LUN and recreate it.