veracrypt / VeraCrypt

Disk encryption with strong security based on TrueCrypt
https://www.veracrypt.fr
Other
7k stars 956 forks source link

[Windows] Defragmenting mounted Veracrypt volume not possible #374

Open zipplet opened 6 years ago

zipplet commented 6 years ago

Windows will not let me defragment any VeraCrypt volumes. Both tested volumes are "encrypted containers" (files) that are mounted in VeraCrypt. Both are NTFS.

The defrag UI shows "Optimization not available" for the 2 volumes I tried. Using the command line defrag tool results in it exiting immediately without displaying any information about the volume, like this example below:

C:\windows\system32>defrag h: /o
Microsoft Drive Optimizer
Copyright (c) Microsoft Corp.

C:\windows\system32>

Previously in the past I was able to defragment using the command line, but not with the UI. Now even the command line does not work. I am running the command as administrator.

OS: Windows 10 1803 VeraCrypt version: 1.23 (64-bit)

hasanalizxc commented 6 years ago

Hi,

You should read these links.

https://www.veracrypt.fr/en/Defragmenting.html https://sourceforge.net/p/veracrypt/discussion/general/thread/d6c19463/

zipplet commented 6 years ago

Thank you for the security warning. I'm aware that I should not be trying to defragment the volume that contains the container, and that defragmenting the mounted container is bad practice (it should only be done if I use device level encryption).

It used to be possible regardless however, I'm not sure why it stopped working. I'll test to see if a device hosted volume will defragment.

hasanalizxc commented 6 years ago

Please test and write results.

GH-Rake commented 5 years ago

v1.23 was released which included this in the changelog:

Add Driver option in the UI to explicitly allow Windows 8.1 and Windows 10 defragmenter to see VeraCrypt encrypted disks.

Did you try enabling this option and use Windows UI defragmenter?

csware commented 4 years ago

Seems still to be an issue with 1.24-hotfix1. defrag d: /o still does nothing (also the optimize dialog shows "drive type unknown"), however, defrag d: works.

GH-Rake commented 4 years ago

I'm using 1.24-Hotfix1 on Windows 10 1903 and defrag /o works fine for me

csware commented 4 years ago

defrag

zipplet commented 4 years ago

I'm able to defragment now using "defrag /o" with the new option under driver settings.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

csware commented 3 years ago

THis is still an issue with 1.24-Update7 for me.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

csware commented 3 years ago

Still an issue with latest VeraCrypt (1.24 Update7).