OpenStack Discussions

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

redheo
3,380 Views

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?

3 REPLIES 3

AlainTansi
3,299 Views

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
3,286 Views

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."

filerhero
898 Views

Did you find a solution for that?

Public