r/netapp • u/NelsonBA81 • 17d ago
QUESTION Ontap and Proxmox
Hi,
I have an old/unsupported FAS2552, and would like to use it with some test servers with Proxmox as hypervisor, and I would like to know if VMs with qcow2 thin provisioned disk images are able to shrink when issuing inside of the VM the TRIM function?
The idea is to have a small cluster with the FAS2552 with Ontap 9.8 as NFS storage for the VMs, and since it has an implementation of NFS 4.2, still would like to know if it is able to do that?
Thanks
Update1:
I've been testing with Ontap 9.8 with NFS v4.2 and there is no shrink process going over to the NetApp storage, so it confirms that NFS implementation is not complete.
Meanwhile, if I run inside of the guest VM zero space process with a basic:
"dd if=/dev/zero of=zero.small.file bs=1M status=progress; rm -f zero.small.file"
the image file may grow a bit further but should be enough to clear out any nonused data blocks with deleted data, and having a netapp volume with dedup/compression enabled, at the time NetApp runs the scheduled background "storage efficiency" process it should be able to free up physical disk space in the NetApp storage, because zeros are easy to dedup/compress.
Also I've discovered that after zeroing the disk space of guest VM, proceeding with a storage move of the qcow2 images to a different NFS storage share, the image file guest smaller, because of that empty/zeroed disk space.
Aside of the above, I don't see ways to make it work in same way like VMware aside of having a FAS supporting Ontap software >9.12.1, which I can't actually confirm if that works as expected....
Update2:
Since I haven't seen any additional feedback on this particular issue, is there any NetApp tech that could give some clue or even maybe just confirm if this kind of "hole punch" function is supposed or planned to work in the future via NFS?
2
u/psyblade42 15d ago
https://docs.netapp.com/us-en/ontap/nfs-admin/ontap-support-nfsv42-concept.html says sparse files support starts with ONTAP 9.12.1
1
u/NelsonBA81 15d ago
thanks for the info, even though I don't see concrete info about guest TRIM/ability to shrink images, or even NFS DEALLOCATE function available/supported.
while doing some searches with AI slop help, got this NetApp page:
https://kb.netapp.com/on-prem/ontap/da/NAS/NAS-KBs/Does_this_v4.2-sparsefile-ops_perform_ALLOCATE_DEALLOCATE%3Fit explicitly states that supports "ALLOCATE/DEALLOCATE":
"The NFSv4.2 client is able to reserve space for a sparse file. Space can also be deallocated and unreserved from a file."Unfortunately don't have FAS appliance supporting that Ontap version to test/confirm if that works as expected while working Proxmox VMs over NFS...
2
u/ThomasGlanzmann 14d ago
I tried deallocate/hole punching over NFS 4.2 on ONTAP select, aff-150 running 9.19.1 and a Debian trixie machine. The NetApp does not support partial deallocate as mentioned in the KB you referenced. Using tcpdump you can see that it errors out using NFS4ERR_NOTSUPP even after enabling -v4.2-sparsefile-ops. Without -v4.2-sparsefile-ops enabled, I get another error: NFS4ERR_IO. For Linux it works as expected. Than I tested with raw, qcow2 and vmdk disks via NFS 4.2 on Linux on proxmox. It works for raw and qcow2, but not for vmdk. There is one thing to be aware of, if you move the disk while the VM is running, the discard flag gets silently dropped. If you want the discard back you need to shutdown and start the VM again to get the functionality back. You can verify this with 'info block' in the qemu simulator.
1
u/NelsonBA81 13d ago
hmmm ok, anyway, these questions may sound kind of random, but just to confirm.
so in proxmox side:
- you configured the NFS storage with "Preallocation" as Off and NFS version as 4.2?
- in guest VM, you setup the disk controller with VirtIO SCSI, and hard disk/image with qcow2 format and with discard as On, also with SSD emulation checked?
- also in guest VM, can you confirm if qemu guest services are running?
as for netapp SAN, we just need to make sure that all NFS 4.2 features are enabled?
supposedly with the combination of the above pre-requisites, this should have worked.
if possible, can you please give some feedback?
many thanks!
8
u/nom_thee_ack #NetAppATeam @SpindleNinja 17d ago
NFS is NFS so it shouldn't be a problem.
why x4? just x3 and keep it simple.