bhyve, Windows guest and trim support

Felix Palmen felix at palmen-it.de
Sun Jul 12 13:11:35 UTC 2020


* Andrea Venturoli <ml at netfence.it> [20200707 18:18]:
> I have yet to try this, but, as I said, I switched temporaly to ahci-hd and
> used the instructions at the following link to reclaim space (without the
> need to start a new zvol):
> 
> https://winaero.com/blog/trim-ssd-windows-10/

Thanks for this hint, I can now confirm this also works with virtio-blk
(applied Allan's patch to 12.1). REFER for the zvol backing my Windows
Server 2016 dropped from 315G to 72.5G.

A word of warning: From the source cited here, I figured something like
| Optimize-Volume -DriveLetter C -Verbose
would automatically do "the right thing" for a thinly provisioned
virtual disk. Turns out it would indeed, but as I had an older version
of the virtio drivers installed, the disk was treated like a physical
HDD and this command started a (very) lengthy defragmentation process
instead. So, make sure you have a recent version of virtio drivers
installed before attempting this with virtio-blk :)

> Don't know if you are using other OSes, but I guess something similar must
> exist.

Yep, now I need the same thing for a 13-CURRENT guest. I'll probably
need to apply this patch that's still in review, but what would be the
next step? Is there a ZFS command to trigger a "re-TRIM"?

-- 
 Dipl.-Inform. Felix Palmen  <felix at palmen-it.de>   ,.//..........
 {web}  http://palmen-it.de  {jabber} [see email]   ,//palmen-it.de
 {pgp public key}     http://palmen-it.de/pub.txt   //   """""""""""
 {pgp fingerprint} A891 3D55 5F2E 3A74 3965 B997 3EF2 8B0A BC02 DA2A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20200712/dd28a866/attachment.sig>


More information about the freebsd-virtualization mailing list