XCP-NG - storage/disk display. What's actually happening? Is this a case for passthrough?

I’m running xcp-ng 8.0. VM VDs are on NFS (TrueNAS).

So I have a CentOS VM with /home (ext3) on a local SSD SR (using an entire 480GB SSD), but the rest on NFS SR. df in CentOS reads /home as 11G used (3%), 400G available. But, df in the host with the uuid of SR (as well as looking at the SR in XenOrchestra, and XenCenter) as 281G used (68%), 138G available.

Basically, the reason I installed this drive in the first place was because I needed the i/o for a particular VM, and files (lots and lots of them) were going to be written/deleted, written/deleted, etc… which I understand could be torturous to an NFS SR.

So since the files are being deleted by a cron job in CentOS, 1) why are the OS and Xen showing such different values? I expect it’s because the OS deleting the file does not zero out the blocks on the SSD, or even the VD.

  1. Can someone explain what happens when you delete a file in a linux OS?
  2. Why isn’t the VD being updated, or is it more proper to ask, should the VD be updated?
  3. If the OS shows 3% usage, and the VD shows 68%, assuming I keep deleting the files, and /home in the OS stays at about 3%, but the VD grows and grows, what wil the VD actually do when it gets to 100%?
  4. Is there a better way to utilize this SSD for this purpose? Is passthrough a good choice here? If so, will df in the OS properly display accurate numbers? (I realize XO and xcp-Center will not be accurate, and will show 100% usage [according to Tom’s video])




If I understand what you are asking, I don’t think there is any way to reclaim the space once the VDI expands. It will not be able to expand beyond the limits defined for the storage of that VM.

There are two storage parts to this… think of it as an SR for the whole VM except for /home, and an SR for just /home.

/home is the issue. It is an SSD, and the SR was an ext3 fs created in XO, it’s mounted like anything else in /etc/fstab. Here is an example of the issue. Let’s say /home starts with 1GB of data. Every day, 10GB of data gets written to /home. Then at the end of the day, a cron job deletes those files (10GB). df -h inside the CentOS VM shows 1GB used, but the xcp host does not, nor does XO or xcp-ng Center. They show 268GB used.

So, are you saying, if I have an 400GB SR, and if every day I write 10GB, then every night I delete ALL those files, I still can only write data for 40 days, and my storage will be full, even though I’m deleting those files?