Defragmentation Error, The Volume (C:) was not Optimized

7

Event ID 257

The volume (C:) was not optimized because an error was encountered:
The parameter is incorrect. (0x80070057)

I have Windows 8.1 64 Bit (HDD) and lately I noticed the above event in my Event Viewer. I get every day 3 or 4 of these errors. Anyone found a solution to this ?


  • SFC /SCANNNOW didn't solve the problem: Resource Protection did not find any integrity violations.



Solutions that I did not try but might work

  1. Basic steps to use diskpart to assign a drive letter to the system partition

    1. Open an elevated command prompt.

    2. Type diskpart and press Enter. You leave the standard command prompt and enter the diskpart utility. (Nothing exciting happens, don't worry.)

    3. Type list disk and press Enter to get a listing of the disks on the system. (More accurately, the disks visible to diskpart.) Figure out which disk contains the partition you want to assign a drive letter to.

    4. Type select disk X, where X is the applicable disk number.

    5. Type list partition and press Enter to get a listing of recognized partitions on disk X (from step 4). Your desired partition will the listed there. If not, go outside and enjoy nature.

    6. Type select partition Y, where Y is the applicable partition number.

    7. Type assign letter=Z, where Z is the drive letter you wish to assign. Diskpart should reply: DiskPart successfully assigned the drive letter or mount point.

    Once the system recognizes the drive letter (a reboot may help; as I mentioned, I did not reboot before the trim worked, but did have to wait awhile), you should be able to defrag/trim.

    To unassign the drive letter:

    A. Carry out steps 1 - 6 above.

    B. Type remove and press Enter. Diskpart should reply: DiskPart successfully removed the drive letter or mount point.

    I hope this helps.


  1. I am not entirely sure why it helped, but after I had the same issue (0x80070057 during defrag, chkdsk reports no errors) reseting the journal seemed to fix it.

    Open an Administrator command prompt and make use of fsutil:

    fsutil usn deletejournal /D volume pathname
    fsutil usn createjournal m=max-value a=alloc-delta volume pathname

    Eg :
    fsutil usn deletejournal /D C:
    fsutil usn createjournal m=1000 a=100 C:

    Maybe it helps someone else as well.

The answers are from here

Devid

Posted 2014-01-09T21:48:54.510

Reputation: 5 566

As far as I remember Windows disk defragmentation tool requires at least 15% of free disk space to run. Do you have that much free space on C:? – gronostaj – 2014-01-09T23:12:19.070

Yes, I have a lot of free space. – Devid – 2014-01-09T23:14:00.070

If you find a solution, please post it. I'm having the same problem and some people have reported the problem is related to optimizing drives that don't have a drive letter assigned. – CoryR – 2014-01-13T17:37:30.737

@CoryR you can favorite the question and +1 so that you can always come back to see for solutions. I have also searched the web and no one has a clue why this error is reported. – Devid – 2014-01-14T11:53:12.363

@CoryR there is now a official solution to this problem. – Devid – 2014-04-01T17:25:36.653

Answers

3

After doing some research, I found out that Microsoft released a Hotfix for this issue.


Symptoms

When you run the Disk Defragmenter (Defrag.exe) utility on a volume on a computer that's running Windows 8.1 or Windows Server 2012 R2, the defrag operation fails. Additionally, event ID 257 is logged in the Application log. This event displays a "The parameter is incorrect" error message. In this case, you may be unable to optimize the volume for space efficiency.

Prerequisites

To apply this hotfix, you must be running one of the following operating systems:

  • Windows 8.1
  • Windows Server 2012 R2


from KB Article Number: 2929874

PaulTOB

Posted 2014-01-09T21:48:54.510

Reputation: 76

When I tried to install the patch, I was told that the patch is not applicable even though my computer has Windows 8.1 x64 installed. – Zian Choy – 2015-04-17T15:39:03.720

The hotfix link is now: https://support.microsoft.com/en-us/kb/2929874.

– Mark Berry – 2015-11-12T19:35:31.983

Same here, says this update is not applicable to your computer, even though I'm trying to install it on a Windows 8.1 x64 machine. – Lucky Luke – 2016-05-31T14:39:52.507

Thank you very much. I hope this solves also my problem. – Devid – 2014-04-01T17:37:38.357

0

It often results from an 'unusual' (such as ^ & or $ ) character in a file or folder names. Therefore, suggest you use the System File Checker

sfc /scannow

Which will take some time to complete.

K7AAY

Posted 2014-01-09T21:48:54.510

Reputation: 6 962

Not sure how things were in 2014, but here in 2017, /s is not an option to sfc on Windows Server 2012 R2. – jdgregson – 2017-03-22T02:24:04.467

ok, will try that out tomorrow and report if it helps. – Devid – 2014-01-09T22:51:03.090

Did you mean sfc /SCANNOW ? – Devid – 2014-01-14T11:26:31.090

It did not help. I got this message: Windows Resource Protection did not find any integrity violations. – Devid – 2014-01-14T11:48:54.847