2018-02-15 08:26 AM
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?
2018-02-25 09:09 PM
2018-02-26 01:13 AM
thanks for your reply.
I found some discussion where it seems snapdrive for linux is not capable of space reclaim, for instance
I'll try with fstrim on linux, I'll then post about the results.
2018-02-26 05:24 AM
with linux client i did the following:
1) Obtain the device id of the lun
# 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
(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.