OpenStack Discussions

How do I enable trim(unmap / reclaim) when using the nfs cinder backend?

redheo

A Cinder volume corresponds to a file within the NFS share provided by a FlexVol.

The space is consumed when you write actual data in the Cinder volume.

ONTAP is not able to read the filesystem within the Cinder volume to tell if a block is in use or not, so removing a file inside the Cinder volume won't free space.

Only when you delete the Cinder volume, the corresponding file within the NFS share will be deleted, and the space will be reclaimed.

How do I enable trim(unmap / reclaim) when using the nfs cinder backend?

2 REPLIES 2

AlainTansi

From your explanation, it is not very clear to me if you are having a SAN(iscsi/FC) configuration or a NAS(nfs) configue.
However, if you are talking about ONTAP not able to read the file system within the Cinder volume then i assume this should be a SAN volume
and a LUN was provisioned from the NetApp storage.

To enable and ensure that you have trim(unmap/reclaim) working, you will need to check ensure that the lun has space_allocation feature enabled on that LUN from the storage end.

- Take the lun offline

- Enable space allocation
lun modify -vserver vserver_name -volume volume_name -lun lun_name - space-allocation enabled

- Bring back lun online.

- Rescan from the host side

redheo

I said in the first question.
says "when using nfs cinder backend"
And this is the first sentence of the question.
"A Cinder volume corresponds to a file within the NFS share provided by a FlexVol."

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public