zvol for windows VM keeps growing

Status
Not open for further replies.

NateWoodruff

Cadet
Joined
Mar 29, 2017
Messages
5
I created a 100GB zvol on my FreeNAS box to serve as the disk device for a Win 7 VM. I used a block size of 512 for Windows compatibility.

The zvol is now reporting as using 1.4TB on the storage screen in the UI, and it is continuing to trend upward.

There are no snapshots being taken of the zvol.

I expected the 512 block size to result in some inefficiencies, but around 50% excess, not 400%. I also expected that to be constant over time, not growing.

Currently at FreeNAS 11.0-U2 , though 11.0 RC 4 at the time the zvol was created.

Any ideas?

Thanks,
Nate
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
If you set 512b block size for ZVOL, then you will get about 700% extra, not mentioning that you quite reliably killed compression and performance. FreeNAS uses 4KB allocation blocks for compatibility with Advanced Format drives, that is why it defaults ZVOLs to >= 16KB blocks.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Not only that, Windows uses 4KB blocks, not 512b. In an effort to support older HDDs, what Windows does do is use a 512b logical size and 4KB physical size.
  • The reason why 512b blocks are no longer used is it takes more than 4KB to house eight 512b blocks. There's some really decent write ups online regarding the technicalities of this, which go into depth on why this is.
 

NateWoodruff

Cadet
Joined
Mar 29, 2017
Messages
5
I did attempt to use the default block size, but was unable to install Windows 7 successfully. Several of the "Windows on Bhyve" tutorials were pretty emphatic about setting the block size to 512. I'll report back here if I can get it working with a larger block size.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
I did attempt to use the default block size, but was unable to install Windows 7 successfully. Several of the "Windows on Bhyve" tutorials were pretty emphatic about setting the block size to 512. I'll report back here if I can get it working with a larger block size.
Just an FYI, Windows 7 requires an MBR partition table.

Sent from my Nexus 6 using Tapatalk
 

NateWoodruff

Cadet
Joined
Mar 29, 2017
Messages
5
Just a follow-up. I tried several takes on my windows 7 install with the freenas default block size (on my system) of 32k. I should mention I was able to install windows 7, but none of the services would run, so technically a fail. I was able to successfully install on a zvol with a 4k block size. I had to willfully ignore some warning messages (since my install media did not include SP1). But everything seems to be working out so far. I'll report back if it all goes pear-shaped later. Ironically I was confined to windows 7 because I wanted to continue using media center, but the quality of the program guide has deteriorated so much so, that I'm gonna try switching over to next pvr. Sticking with 7 anyways, because that's what I own.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
The iSCSI/bhyve block size is not the same as the ZVOL block size. iSCSI/bhyve block size should be set to 512 byte. ZVOL block size is better in the 16KB or 32KB range. And the NTFS cluster size (during format) needs to be 4K on a boot partition. Maybe that has changed and you can use higher cluster sizes, but I don't think the installer lets you choose.

bhyve lets you select a logical and physical block size. In that case, the logical would be 512 and the physical set to the ZVOL block size. If that doesn't work, then the physical should be set to 4096 instead.
 
Last edited:
Status
Not open for further replies.
Top