fstrim with NFS

  • Thread starter Thread starter Deleted member 93625
  • Start date Start date
D

Deleted member 93625

Guest
Hi all,

I have a question regarding fstrim on NFS storage. I've configured a Ubuntu Linux box with hardware RAID, installed nfs-kernel-server package and all set. Adding it to Proxmox cluster was not a problem.

I had an old NFS box and I copied all the contents to the new box with rsync (rsync -av). This worked okay, VMs all booted okay but one thing is not working - fstrim. When I ran the command either on VM or new NFS box, it says went okay but the VM disk file size doesn't change on the new NFS box.

Am I doing something wrong? All VMs had discard option on from the beginning. Or, fstrim is not supported on NFS? VM disks are all QCOW2 format. This is a somewhat important question to me as the storage box is actually not that big in terms of its capacity (there are currently only 8 VMs with 60GB VM disk and already almost 600GB was filled). I thought thin provision should show much less than that.

Hope I can get some advice. Thanks.

Eoin
 
1. Fstrim has nothing to do with VM disk size change.
2. The SSD in a RAID behind hardware controller is used to not to expose any DISCARD capabilities.
 
1. Fstrim has nothing to do with VM disk size change.
2. The SSD in a RAID behind hardware controller is used to not to expose any DISCARD capabilities.
1. Okay, but shouldn't it show a reduced file size in storage?
2. The box doesn't have SSD. All spiking 3.5" hard disks.
 
1. Okay, but shouldn't it show a reduced file size in storage?
2. The box doesn't have SSD. All spiking 3.5" hard disks.

Even though fstrim could be run on classic rotation disks. In your case the problems are:
- NFS (if I'm not mistaken does not support discard so far. NFS 4.2 and sparse files/hole could be solution but Im not sure)
- (mainly) hardware RAID controller (only few models does really support discard)
 
Even though fstrim could be run on classic rotation disks. In your case the problems are:
- NFS (if I'm not mistaken does not support discard so far. NFS 4.2 and sparse files/hole could be solution but Im not sure)
- (mainly) hardware RAID controller (only few models does really support discard)
Okay, not a good news. Thanks for your response. What about iSCSI? If I use iSCSI target instead of NFS, will fstrim work? Thanks again.

Eoin
 
  • Like
Reactions: pascalc

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!