I have a volume under a FSx Netapp filesystem that when I delete files free space isn't being restored to the volume. For example. Here I am deleting an 8GB file on a 10GB volume but no space is being returned to the filesystem:
$ df -h .
Filesystem Size Used Avail Use% Mounted on
fsxdata:/keith_test_vol 9.5G 8.6G 981M 90% /mnt
$ ls -lh
total 8.1G
-rw-r--r-- 1 root root 8.0G Jan 26 09:07 bigfile
-rw-rw-r-- 1 ubuntu ubuntu 6 Dec 6 11:30 test
-rw-r--r-- 1 root root 0 Oct 9 16:54 test2
-rw-r--r-- 1 ubuntu ubuntu 0 Nov 9 11:35 test3
drwxrwxrwx 2 root root 8.0K Dec 15 09:25 test_qtree
-rw-r--r-- 1 root root 0 Oct 9 11:53 testfilefromroot
-rw-rw-r-- 1 ubuntu ubuntu 0 Nov 9 11:34 testfromunbuntu
$ rm bigfile
rm: remove write-protected regular file 'bigfile'? y
$ ls -lh
total 8.0K
-rw-rw-r-- 1 ubuntu ubuntu 6 Dec 6 11:30 test
-rw-r--r-- 1 root root 0 Oct 9 16:54 test2
-rw-r--r-- 1 ubuntu ubuntu 0 Nov 9 11:35 test3
drwxrwxrwx 2 root root 8.0K Dec 15 09:25 test_qtree
-rw-r--r-- 1 root root 0 Oct 9 11:53 testfilefromroot
-rw-rw-r-- 1 ubuntu ubuntu 0 Nov 9 11:34 testfromunbuntu
$ df -h .
Filesystem Size Used Avail Use% Mounted on
fsxdata:/keith_test_vol 9.5G 8.6G 978M 90% /mnt
Anyone know what is going on here?
FSxN uses ONTAP technology that uses snapshots (if not disabled). This keeps old data around even after users have deleted it. Check your volume snapshot policy. You can delete old snapshots if you no longer need them, also in general based on the policy they will age off as well and then the space will be reclaimed.
vol show -fields snapshot-policy
vol snapshot policy show
vol snapshots show -volume <vol name>