FreeNAS and TrueNAS increase the virtual hard disk size

Buso

Cadet
Joined
Aug 31, 2020
Messages
4
Dears,
I'm experiencing the following trouble on both FreeNAS and TrueNAS.
My environment is composed by 6 servers and one SAN directly connetcting to the servers through the Gigabit ethernet switch.
The 6 servers and the san working together creating a Failover Cluster based on Hyper-V. In this Failover Cluster, a TrueNAS VM has been created with two hard drive attached: the first one contains the TrueNAS OS, the second one contains the TrueNAS Pool. On the second hard drive, through Hyper-V, I've created a 2TB of Virtual Hard Disk (vhdx) with fixed size (1.6TB).

Through TrueNAS, on the second hard drive, I've created a ZFS Pool with 80% of max size (80% of 1.6TB). This pool os shared through Windows SMB protocol.

As soon as this pool is mapped (\\truenas_ipaddress\pool_name), I try to copy on it 500GB of data. During the copy, the second hard drive increase its own dimension, until TrueNAS crash and failed.

My question is: why the second hard rive increase its own size? I've set it as fixed size and I don't understand why it "explodes". This behaviour is the same one with TrueNAS and FreeNAS.

Thanks in advance!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
From your description, it sounds like you're trying to virtualize TrueNAS/FreeNAS in a Hyper-V VM, providing Virtual disks to the VMs.

If this is just an experiment in order to learn about FreeNAS/TrueNAS, OK, but this is absolutely not the way to succeed with a reliable setup that would be used for any important data.

FreeNAS/TrueNAS (actually ZFS) needs direct access to the disks in order to operate correctly. The scenario you're describing is the opposite of that and you should expect complete data loss at some point in the future if you use it in that setup.

FreeNAS/TrueNAS (actually FreeBSD in general) is known to be problematic on Hyper-V in any case, so I wouldn't expect smooth operations no matter what you're doing here.

I can't speak to the reasons for the increase of size, but my guess would be that under-provisioning a disk that ZFS is assuming to have direct hardware access to is a bad idea, so it may be issuing instructions to write some data at the end of the disk geometry which isn't being handled well by Hyper-V.
 

Buso

Cadet
Joined
Aug 31, 2020
Messages
4
Hi Sretalla,
You are right, the situation you are describing is the same one I had implemented.
Now, keeping the TrueNAS OS installed in the Hyper-V VM, for the TrueNAS storage a physical hd has been used, adding it as SCSI device to the VM and avoiding to create a virtual hard disk inside: everything seems working well, copying several GBs on this physical storage, no issues yet experienced like the previous one.

Thanks for your support!
 
Top