ONTAP Discussions

Space reclaim for lun

LORENZO_CONTI

Hello,

 

I have some iscsi lun configured on a 9.1P10 cluster.

space-allocation option is disabled, so I'm guessing I'm wasting disk space without reclaiming space.

Ontap 9 documentation says

"If you set the space-allocation option to enabled, Data ONTAP notifies the host when the volume has run out of space and the LUN in the volume cannot accept writes. This option also enables Data ONTAP to reclaim space automatically when your host deletes data."

Can I use snapdrive to reclaim space one shot?

Can I use a windows host to reclaim space on lun mapped for both windows and linux clients?

Do will be a disruptive operation?

Thank you 

Lorenzo

3 REPLIES 3

Sahana

Hi,

 

Please refer https://library.netapp.com/ecmdocs/ECMM1278932/html/admin/provisioning/concept/c_sdw_prov_space-reclaim-about.html

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

LORENZO_CONTI

Hello Sahana,

thanks for your reply.

I found some discussion where it seems snapdrive for linux is not capable of space reclaim, for instance

https://community.netapp.com/t5/Backup-and-Restore-Discussions/How-to-Reclaimed-Thin-Lun-In-UNIX/td-p/79811

I'll try with fstrim on linux, I'll then post about the results.

Lorenzo


Hello,

with linux client i did the following:

1) Obtain the device id of the lun

For instance

# ls -l /dev/mapper/netapp-lunp1
lrwxrwxrwx 1 root root 7 Feb 26 11:47 /dev/mapper/netapp-lunp1 -> ../dm-1

2) Check /sys/block/dm-1/queue/discard_max_bytes value: it should be not zero. If zero, maybe the option space-allocation must be set to enabled

http://docs.netapp.com/ontap-9/index.jsp?topic=%2Fcom.netapp.doc.dot-cm-sanag%2FGUID-6AD84908-041A-497D-95A7-BB6AFDD1B282.html

(I tried simply modifying the option without putting the lun offline, and it worked without disruption)

3) Rescan the lun (in our case we rebooted the client)

4) Check again /sys/block/dm-1/queue/discard_max_bytes, in our case we have 33554432 

5) fstrim <mountpoint>

We checked with red-hat like and debian linux, ext4 filesystem. It works.

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