Wanted to report two possible bugs
Mailed Mounir about this too
Two things I noticed:
I have a Windows 10 system with one local administrator account (me) and a standard local account (my wife). System was encrypted, as was the data drive (D:). Vol D was mounted as a system favourite. When logging in to my wife's account, it loaded slowly (minutes), sometimes ending in a black screen. Or it did load until the desktop, but afterwards, the system froze. Error 137 (*) was repeatedly reported in Windows Event Viewer at the moments this kind of behaviour was noticed. HDD has been checked - no errors at all. After a while, I just tried something and unencrypted this volume D (not the system drive), and everything is ok now - even error 137 has not been reported anymore. Coincidence?
The windows defragmenter does not recognize the encrypted volume D; it does recognize the system drive (C) without a problem; as such, optimizations/defragmentations are not possible on volume D (unless one uses a tool like defraggler).
Last edit: Mortov Molotov 2018-08-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@mortovmolotov:
For the first issue, your configuration is fairly standard one (I myself have machines with such configuration) and there is no known issue with it. To me, it looks like some kind of HD issue that appears when encryption is enabled because VeraCrypt driver reports disk errors whereas Windows would simple ignore them for non encrypted disks. I don't know how you checked the HD for errors but in my opinion it is better to replace the D disk before it exhibits more serious failure and certainly the black screen screen issue will disappear.
Concerning the Windows defragmenter not recognizing non-system VeraCrypt volumes, this is a known issue and I have worked on it last year. My conclusion was that Windows 10 requires now that a disk be a physical one in order to support defragmenting and that's why it refuses virtual disks like VeraCrypt volumes.
To workaround this, I built a modified version of VeraCrypt that reports non-system volumes as the same physical disk that stores it (using IOCTL_STORAGET_GET_DEVICE_NUMBER) and Windows defragmenter was able to see VeraCrypt volumes but this approach causes many negative side effects because the same physical disk is seen twice at the volume level.
A real fix for this would be to change VeraCrypt driver so that it behaves like an SCSI adapter and so VeraCrypt volume would be seen by Windows as physical SCSI disks.This is not an easy task and for now there are no plans to go down this road because of the time and resources it requires.
Last edit: Mounir IDRASSI 2018-08-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For the defragmenter issue, I took a look at the non-published modification I did last year about it and I did some tests using the latest Windows 10 version 1803 and I was able to find a workaround that doesn't seem to have negative effects (although it is not a clean way).
I have published version 1.23-BETA5 that includes this fix which is activated only when the option "Enable extended disk contol codes support" using menu "Settings -> Performance/Driver Configuration" as shown in the screenshot below.
Thank you, Mounir and None No, for your response
The defrag issue is a minor one to me, I just wanted to report it.
As far as the HDD checking is concerned: I tested using the chkdsk d: /f command and the CrystalDiskInfo utility. Will try another deep testing using Western Digital DLGD.
On the other hand: Windows Event error 137 seems to be related to "StorageCraft Shadow Copy provider" and/or an issue where the Common Log File System (CLFS) transaction logs may be left in an inconsistent state.
As I said: I will do another test of my HDD later this evening, an try another encryption, same configuration, later this week. Will keep you posted
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, not to complain, but I just upgraded (on Windows 10) from 1.22 to 1.23 Hotfix 2.
I went to "Performance & Driver Options", selected "Enable Extended disk control codes support" & "Allow Windows Disk Defragmenter to defragment non-system partition/drive"
I rebooted several times, remounted several times, and still when I use windows File Explorer, right click on my VeraCrypt encrypted drive, do "Properties" & "Tools/Optimize", it says "Optimization not available" on my VeraCrypt drive.
Am I misunderstanding something? Should this be available from the Explorer GUI, or do I need to run defrag from the command line? Or select some other option, or maybe re-create the drive (the drive is quite old - it was a TrueCrypt drive I converted to VeraCrypt.)
And it's just a file I mount as a drive, not a system partition or anything. And on a regular hard drive, not SSD.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I went to "Performance & Driver Options", selected "Enable Extended disk control codes support" & "Allow Windows Disk Defragmenter to defragment non-system partition/drive"
Same here and Windows still lists the Media type as "Unknown".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
Wanted to report two possible bugs
Mailed Mounir about this too
Two things I noticed:
(*) http://www.eventid.net/display-eventid-137-source-ntfs-eventno-9241-phase-1.htm
Last edit: Mortov Molotov 2018-08-13
@mortovmolotov:
For the first issue, your configuration is fairly standard one (I myself have machines with such configuration) and there is no known issue with it. To me, it looks like some kind of HD issue that appears when encryption is enabled because VeraCrypt driver reports disk errors whereas Windows would simple ignore them for non encrypted disks. I don't know how you checked the HD for errors but in my opinion it is better to replace the D disk before it exhibits more serious failure and certainly the black screen screen issue will disappear.
Concerning the Windows defragmenter not recognizing non-system VeraCrypt volumes, this is a known issue and I have worked on it last year. My conclusion was that Windows 10 requires now that a disk be a physical one in order to support defragmenting and that's why it refuses virtual disks like VeraCrypt volumes.
To workaround this, I built a modified version of VeraCrypt that reports non-system volumes as the same physical disk that stores it (using IOCTL_STORAGET_GET_DEVICE_NUMBER) and Windows defragmenter was able to see VeraCrypt volumes but this approach causes many negative side effects because the same physical disk is seen twice at the volume level.
A real fix for this would be to change VeraCrypt driver so that it behaves like an SCSI adapter and so VeraCrypt volume would be seen by Windows as physical SCSI disks.This is not an easy task and for now there are no plans to go down this road because of the time and resources it requires.
Last edit: Mounir IDRASSI 2018-08-18
"HDD has been checked "
How did you check your HDD ?
For the defragmenter issue, I took a look at the non-published modification I did last year about it and I did some tests using the latest Windows 10 version 1803 and I was able to find a workaround that doesn't seem to have negative effects (although it is not a clean way).
I have published version 1.23-BETA5 that includes this fix which is activated only when the option "Enable extended disk contol codes support" using menu "Settings -> Performance/Driver Configuration" as shown in the screenshot below.
You can download 1.23-BETA5 from https://sourceforge.net/projects/veracrypt/files/VeraCrypt%20Nightly%20Builds/. Don't hesitate to report any issues you may encounter.
Thank you, Mounir and None No, for your response
The defrag issue is a minor one to me, I just wanted to report it.
As far as the HDD checking is concerned: I tested using the chkdsk d: /f command and the CrystalDiskInfo utility. Will try another deep testing using Western Digital DLGD.
On the other hand: Windows Event error 137 seems to be related to "StorageCraft Shadow Copy provider" and/or an issue where the Common Log File System (CLFS) transaction logs may be left in an inconsistent state.
As I said: I will do another test of my HDD later this evening, an try another encryption, same configuration, later this week. Will keep you posted
Yes, not to complain, but I just upgraded (on Windows 10) from 1.22 to 1.23 Hotfix 2.
I went to "Performance & Driver Options", selected "Enable Extended disk control codes support" & "Allow Windows Disk Defragmenter to defragment non-system partition/drive"
I rebooted several times, remounted several times, and still when I use windows File Explorer, right click on my VeraCrypt encrypted drive, do "Properties" & "Tools/Optimize", it says "Optimization not available" on my VeraCrypt drive.
Am I misunderstanding something? Should this be available from the Explorer GUI, or do I need to run defrag from the command line? Or select some other option, or maybe re-create the drive (the drive is quite old - it was a TrueCrypt drive I converted to VeraCrypt.)
And it's just a file I mount as a drive, not a system partition or anything. And on a regular hard drive, not SSD.
Same here and Windows still lists the Media type as "Unknown".