This project has moved. For the latest updates, please go here.

Win 10 Can't Defrag Veracrypt Drive?

Topics: Technical Issues
Jul 14, 2016 at 1:20 AM
I am using whole drive encryption on a storage disk (non-system). I can use, mount, and dismount the drive no problem using Win 10 x64 Enterprise. However, when I go to attempt to defragment the drive it says: "Optimization not available." Here is a screenshot:

Is this a known issue? Any work-arounds?
Jul 14, 2016 at 3:46 AM
Is the VeraCrypt volume mounted when you performed the screenshot?

With the VeraCrypt volume mounted, can you use Windows Explorer to right click on the mounted volume > Properties > Tools > Defrag Now?
Jul 14, 2016 at 12:14 PM
Yes, the Veracrypt volume is mounted. Windows doesn't see it as a valid drive until it is (it is my D: drive in the screenshot). If I right-click on the D: drive, go to Properties -> Tools tab -> Optimize it brings up the same window that I sent in the screenshot.

It's strange because I can ChkDsk and on the general tab it identifies the file system as NTFS. But in disk management it still shows as unknown and not initialized (and if I'm not mistaken if I initialize it, it will mess up my veracrypt volume).
Jul 14, 2016 at 12:24 PM
Edited Jul 14, 2016 at 12:25 PM
I am using the latest Intel Rapid Storage drivers and SATA drivers available from my motherboard manufacturer (I just checked for updates).

A few details that may help: I just wiped my system drive and installed a fresh copy of Windows 10 (non-upgrade). I was previously using Windows 8.1. The non-system drive that cannot be defragmented was left alone during this process. I believe I am using the same version of Veracrypt as I was in 8.1 as I only semi-recently started using Veracrypt (maybe a month or two). I could defrag when I was running 8.1.

Has anyone else run into issues defragging a VC whole disk encrypted drive in Win 10?
Jul 14, 2016 at 12:58 PM
Did you encrypt the drive or the partition on the drive?

For example in VeraCrypt, when you click Select Device, do you see only "HardDisk 1:" or do you see partition(s) under HardDisk 1?
Jul 15, 2016 at 1:05 AM
The entire drive.
Jul 16, 2016 at 3:57 PM
Any other ideas anyone? :(
Jul 16, 2016 at 4:12 PM
I tried running "winsat formal" in an elevated cmd as suggested on another forum... Windows completely skipped the Veracrypt encrypted drive during that test so it didn't help.

How the drive appears in Veracrypt: (Harddisk 1, Harddisk 0 is a non-veracrypt drive)

How the drive appears in Disk Management: (Disk 1)

Warning that appears when opening DIsk Management: (I always hit cancel, this is expected, yes?)

How the drive appears when you open its properties: (Note that it clearly sees an NTFS file system)

Let me know if any other information is helpful.
Jul 22, 2016 at 1:23 PM
Bump. Hope someone has some ideas to help me out here. Not the end of the world but I imagine drive performance is going to get worse as time goes on.
Jul 22, 2016 at 8:05 PM
Edited Jul 22, 2016 at 8:57 PM
+1 I can confirm I also have this issue on Windows 10 with full system encryption. I am using a legacy MBR with 2x spinners with an AMD RAID driver.

edit: hmm looks like I got it working for me. It might have a maleware issue since there were a few system32/Wow64 files missing.
Jul 25, 2016 at 7:51 PM
Windows 10 has introduced many changes on how hard disks should integrate into the kernel and the current VeraCrypt driver lacks compatibility with these changes which makes its non-system volumes not recognized as physical hard disks in several cases and this in turn make them unavailable in several operations like defragmentation.

Work in ongoing on these Windows 10 compatibility issues. This task in not simple since the Windows kernel driver is the most complex and most sensitive part of VeraCrypt but I hope to have fixes in the coming weeks in order to finally be able to real a final version of 1.18.

PS: system encryption is not affected.
Jul 26, 2016 at 6:57 AM
If touching VC's disk managment for full Win10 compatibility, please refer to:
Maybe there are some performance improvements possible, and working TRIM for non-system ssd disks?

Thanks so far, p.
Apr 24 at 12:09 PM
Edited Apr 25 at 10:53 AM
I've just performed a full partition non-system volume encryption (the partition occupies the whole drive, but it was only the partition that I encrypted). I am using 1.19, which I think is the latest version. I am also getting a message suggesting "Optimisation not available". I am curious as to whether this is an issue that remains for others or whether it was fixed for most people in release 1.18, and I have some kind of other problem.

Further information: Win 10 Creators Edition, NTFS 4K cluster format, partition fully encrypted.