The chkdsk command cannot be executed because the indicated volume is in use. Chkdsk options

Chkdsk  - short for collocation check disk  (disk check). This application is present by default on operating systems like Dos and Windows. It is necessary for verification. hard drives  for errors and subsequent opportunities to correct the errors found.

Launching is possible both from under Windows, and through the command line. The second will be discussed in more detail in this article.


So let's say the command line with administrator privileges is already running. When you enter the chkdsk command without parameters, information about the status of the current disk will be displayed.

The command is introduced as follows:

Chkdsk [volume:] [[path] file_name]]

Everything that is enclosed in square brackets is the parameters of the command, which we can enter, as well as all together, or separately, depending on our needs and wishes.
  It is worth analyzing the parameters and their purpose in more detail.

Parameters

Parameter [Volume:]

Indicates the drive letter (optionally with a colon), mount point, or volume name.

[[Path] file_name] parameter

This parameter sets the location and file name, in case of work with several names, the names of all files are indicated. For them, the command must use wildcards - * or ?.
  For the file (s), the degree of fragmentation will be checked.

Parameter

This parameter is able to set error correction on a locked drive. If the drive has not been locked, a request for verification is displayed at the next boot.

Parameter

The / v option displays the names of the scanned files (directories).

Parameter

  This parameter is used to detect bad sectors and restores the readable part.

Parameter

Able to work only with the NTFS file system. If necessary, it can initiate a volume shutdown. All already loaded descriptors will be incorrect.

Parameter

It works the same way with NTFS. The parameter performs a less thorough check, which positively affects the execution time of the chkdsk command.

Parameter

Like the two previous ones, it only works with the NTFS file system. Just like the previous parameter, it can reduce the running time of the chkdsk command, but by skipping loops in the folder structure.

Parameter

It works the same way with NTFS. If no size is specified, the parameter displays the current size. But when you enter [: size], the size of the log will be set.

Parameter

Help in command line.

Parameter usage example

You need to check the disk in drive H. Fix detected in Windows. The team will look as follows.

Displays a report on the status of the disk in a form depending on the used file system. Command chkdsk  also compiles a list of errors on the disk and corrects them. Command executed without parameters chkdsk  displays information about the status of the current disk.

Syntax

chkdsk [tom: ][[way] file name] [/ f] [/ v] [/ r] [/ x] [/ i] [/ c] [/ l[: the size]]

Parameters

tom :   Indicates the drive letter (followed by a colon), mount point, or volume name. [ way] file name  Specifies the location and file name or names of multiple files for which the command chkdsk  will check the degree of fragmentation. You can use wildcards (* and?) To specify multiple files. / f  Defines error correction on the disk. The drive must be locked. If the drive is not locked by the command chkdsk, a prompt appears to check the disk the next time you restart the computer. / v  Displays the names of the scanned files and directories. / r  Discovers bad sectors  and restores that piece of data that can still be read. The drive must be locked. / x  Use only with the NTFS file system. If necessary, initiates a volume shutdown operation as a first action. All open disk descriptors will be invalid. Parameter / x  also includes functionality  parameter / f. / i  Use only with the NTFS file system. Performs less thorough checking of index entries, which reduces the time required for the team to work chkdsk. / c  Use only with the NTFS file system. Skips checking cycles in the folder structure, which reduces the time required for the command to work chkdsk. / l[:the size] Use only with the NTFS file system. Sets the specified log size. If size is not specified, parameter / l  displays the current size. /?   Displays help on the command line.

Notes

  • Command execution chkdsk

    To execute a command chkdsk  For hard drives, you must be a member of the Administrators group.

  • Checking locked drives during reboot

    If you need to fix disk errors using the command chkdsk, you cannot open files on this drive. Otherwise, the following error message is displayed:

    Cannot execute the Chkdsk command because the indicated volume is being used by another process. Should I check this volume the next time I reboot the system?

    If the user selects this option, the command chkdsk will check the disk and automatically correct errors when you restart the computer. If the disk partition being checked is bootable, the command chkdsk  will automatically restart the computer after checking this drive.

  • error reporting

    Command chkdsk  performs verification disk space  and its use for FAT and NTFS file systems. Command Chkdsk  allows you to get a status report with information on each file system. The disk status report includes a list of errors found. If the team chkdsk  launched without parameter / f  in the active partition, you may receive a message about the presence of serious errors, since the disk cannot be locked. To find errors command chkdsk  need to run from time to time on each drive.

  • Error correction

    If a command line option is specified / fprogram chkdsk  fixes disk errors. At work chkdsk  it should be possible to lock the drive to correct errors. Since when fixing errors, the file allocation table usually changes and sometimes data loss occurs, the program chkdsk  asks for confirmation in the following form:

    Lost clusters: 10; conversations: 3.

    Convert lost cluster chains to files?

    If you enter Y, Windows saves every lost chain in the root directory as a file with the name of the format File nnnn.chk. After completion chkdsk  You can check these files for the necessary information. If you enter N, Windows fixes errors on disk without saving data from lost blocks.

    If the command line parameter / f  not used, program chkdsk  only displays a message about the presence of errors in the file, but does not correct them.

    If the team chkdsk / f  running on a large disk (for example, 70 GB) or the disk contains a large number of files (for example, several million), to complete the program chkdsk  it may take a very long time (maybe a few days). During all this time, the computer will be unavailable to users, as chkdsk  does not return control until completion.

  • Checking disks with the FAT file system

    chkdsk  about the status of the disk with the FAT file system in the following format:

    Volume Serial Number: B1AF-AFBF

    72214528 bytes total on disk

    73728 bytes in 3 hidden files

    30,720 bytes in 12 directories

    11493376 bytes in 386 user files

    61440 bytes in bad sectors

    60555264 bytes available on disk

    2048 bytes in each cluster

    Total clusters on disk: 35261.

    29568 clusters per disk

  • Checking drives with NTFS file system

    Windows displays a program report chkdsk about the state of the disk with the NTFS file system in the following format:

    File System Type: NTFS.

    Checking files ...

    File verification completed.

    Checking Indexes ...

    Indesk verification completed.

    Checking security descriptors ...

    Validation of security handles completed.

    12372 Kbytes total on disk.

    3 KB in 1 user files.

    4217 KB in use by the system.

    8150 Kbytes free on disk.

    Cluster size: 512 bytes.

    Total clusters on disk: 24745.

    16301 clusters on disk.

  • Using chkdsk  with open files

    If parameter is specified / f, command chkdsk  displays error message if found on disk open files. If the parameter / f  not specified and open files found on the disk, chkdsk  can display messages about lost blocks on the disk. This will happen when open files are not already written to the file allocation table. If the program chkdsk  reports on a large number  lost blocks of disk space, should be considered the possibility of disk repair.

  • Physical disk error detection

    Use command line option / r  to detect physical disk errors in the file system. For physical recovery information corrupted files  using the command recover  click the "" link.

  • Report bad disk sectors

    Bad Sectors Reported by Team chkdskwere marked during the first formatting of the disc. Such sectors are not dangerous.

  • Overview of program exit codes

    The following table lists the completion codes that may appear in a program report. chkdsk  after the end of its implementation.

  • Command chkdsk  with other options is available in the recovery console.

Examples

If you want to check the drive in drive D and fix any detected errors in Windows, enter the following command:

chkdsk d: / f

If an error is detected, program execution shkdsk  pauses and displays the appropriate messages. At the end of the command chkdsk  A report containing information about the current state of the disk is displayed on the screen. Until completion chkdsk  You cannot open any files on the specified drive.

To check the fragmentation of all files in the current directory on the disk with the FAT file system, enter the following command:

chkdsk *. *

Chkdsk  displays a status report on the disk, followed by a list of fragmented files that match the command template.

If you have any problems with the hard drive, many immediately have a question about how to start the chkdsk process.

These problems can be very different - from banal inhibition, which is impossible to fix, to total failure  operating system boot.

Fact that it the best way  solve all possible problems with or even. Most experts advise using it in such situations.

We will consider all really working methods that help to launch the recovery tool for Windows in Windows.

Content:

Method number 1. With the help of "Computer"

This option assumes that your system is at least somehow loading, that is, there is no complete refusal to boot. Yes, it can slow down, reboot spontaneously from time to time, and so on, but you can still, albeit with attempts, but still see the desktop and other elements of the system. If so, do this:

  1. Open Computer.
  2. On the main (system), and most often it is in C, right-click and select "Properties" in the drop-down menu.
  1. In the window that opens, go to the "Service" tab at the top. In the "Verification" block, click on "Perform a check ...".


Fig. 1. Run button

  1. Then a new window will appear, a smaller one. Check the boxes next to the inscriptions. "Automatically fix system errors»   and Check and repair bad sectors. However, this can not be done, but it’s better to check these boxes, since you won’t succeed on your own. Click the Start button.


Fig. 2. Check window

After that, it remains only to wait until the tool performs its main task.

In some cases, after performing all the above operations, another window appears with the text: "Windows cannot check which is currently being used."

This means that some kind of error (next) has occurred, or you do not have access rights to certain files. This window may look different.

Without going into details, let’s say that it will be possible to press the “Yes” or “OK” button. So, you just need to do this and continue to calmly watch the recovery tool work.


Fig. 3. “Windows cannot execute”

Important! In some cases, you will need to restart your PC in order to continue. So if nothing happens after all the above steps, restart your PC or. It happens that the computer reboots automatically. This is not worth fearing.

Method number 2. Using the program execution window

In addition, the recovery tool in question can be launched using the standard or programs that are available in all windows versions.

Hint: To start the execution of programs, you can go to the "Start" menu and click "Run." You can also do this by simultaneously pressing the “Win” and “R” buttons.


  1. Enter the command in the following format: "Chkdsk [drive letter]: / [command]". That is, for example, to check C, you need to enter "chkdsk c: / f". It uses the one that fixes errors on the disk (“/ f”). In addition, you can enter following parameters:
  • / f - check and automatically fix errors;
  • / i - lack of analysis of the so-called index parts (if you do not know what is meant, do not use this parameter);
  • / v - along the way, display messages with scanned files (and their paths on the hard drive), as well as other messages about the progress of cleaning and analysis;
  • / c - lack of loops inside folders (again, if you do not know what is meant by this, do not take it);
  • / x - disconnect the drive before starting (the system will automatically check if there is a need for it and take the appropriate action);
  • / r - search for “beaten” sectors and, of course, their automatic recovery;
  • / l: [size] - to change the file size, the size must be specified in kilobytes.

In most cases, it all comes down to entering a simple command “chkdsk c: / f” and clicking “OK”.


Fig. 4. Enter phrase to correct

  1. After that, the verification process will begin. It looks like shown in figure №5. Here it remains only to wait until it is all over.


Fig. 5. Verification process

In newer versions, this process looks almost the same, but the interface is slightly different.

Again, after performing the above steps, another one may appear in which it will be indicated that the drive “cannot be locked”.

The meaning of this message comes down to the same thing that we talked about above - the disk is currently in use, which means that another failure has occurred or you do not have access to certain elements. In any case, it remains to enter the “Y” command and press the “Enter” button.

Fig. 6. The appearance of an additional window

Important! To use both methods, you must have administrator rights on the computer. This is best done on behalf of the administrator. In and below the Start menu there is a corresponding item - "Command line (administrator)". In later versions, in order to see this option, you must click on the Start menu or the Windows menu. In the line that opens, enter "Net user Admin / active: yes".


Fig. 7. Enter to obtain administrator rights

Friends, this article is about the built-in Windows utility Chkdsk, with which you can fix file system errors. You can successfully run the Chkdsk utility on a running operating system and fix disk errors, but how to run Chkdsk if your operating system  Doesn’t load because of these errors? Here, judging by your letters, many of you make a mistake and I will tell you about it. Also, many people are interested in the question - why sometimes for no reason when you turn on the computer starts a check hard drive. What is a dirty bit and how to get rid of it? The article is suitable for users of the operating systems Windows XP, Windows 7, Windows 8.1, Windows 10.

Letter from the reader.

Hello, please tell me why my operating system freezes at boot. This story began a long time ago. At the beginning of the system boot, various errors appeared on the black screen, but after that Windows still booted, though it worked with freezes and even went to a couple of times blue screen. One friend advised me to use the built-in Windows chkdsk program  and check with it for errors the partition with the installed operating system (C :). I agreed and entered chkdsk c: / f at the command prompt, followed by a Windows prompt to check the drive at the next boot.

After rebooting, the drive (C :) was checked for errors, the check itself lasted forty minutes and successfully completed. After that, my computer worked fine for two months and there was nothing to complain about, but then it turned out that I accidentally turned off the computer several times in a row and the problems started again.

Now I just can’t log into Windows, the operating system freezes in words “ Windows startup"Or on" Welcome "and nothing is practically impossible to do. If you press the F-8 key during bootup, the Computer troubleshooting menu appears and everything stops at that, that is, the Last successful configuration option is not applied. It also does not go out to Troubleshoot or Safe Mode.

Many experienced users may notice that in such cases, you can simply remove hDD, then connect it to another system driver from another Windows, that will check it for errors and fix them, then return the hard drive to its place and the operating system boots fine, that's all.

Well, if we are dealing with a laptop or we don’t have another system unit at hand, what should I do then? Again, an experienced user will correctly notice that you can boot from installation disk  Windows 7 or recovery drive, then enter the recovery environment, select a command prompt and enter a command.
chkdsk c: / f, which means start a check system disk  (C :) with parameters

/ f - checks file system errors on disk and fixes them

Everything can be said correctly, but before entering the chkdsk c: / f command, first you need to determine the correct letters of all drives, since in the recovery environment they may differ from those that we see in a working operating system. And drive with installed windows  may not belong to the letter (C :), but any other. Everything in detail.

  • File system errors can occur during repeated emergency shutdowns of the computer (information not completely written to disk), due to the destructive activity of viruses, when using software written with errors and incorrect drivers. As a result of all this, the operation of the operating system with hard drive, the files are not completed or completed incorrectly, and then errors and destruction of the file system on the disk appear. For example, some clusters (pieces of information) do not belong to any file in the system (littering of disk space), while other clusters, on the contrary, belong to two different files (files with a common cluster). The chkdsk program will help to solve this problem; it will find and fix file system errors on the hard disk. In most cases, it will be enough to run the chkdsk utility with the / f option, the full command looks like this: chkdsk c: / f
The chkdsk program has another important parameter / r, which is used together with the / f parameter, that is:
chkdsk c: / f / r
  The / r option finds bad sectors on the disk and restores the data that it can read. In total, several attempts are made to read information from the damaged sector.

Now friends a little attention. When using the / r switch, chkdsk will check all sectors on the disk, which naturally will increase the program’s run time on large disks.

  • It is important to know friends that the minimum unit of hard disk space is a sector (512 bytes). Usually, space belonging to eight sectors occupies one cluster (4 Kilobytes). For example, when installing the operating system, the hard drive is formatted to file nTFS system  and if the partition of the hard drive where you install Windows is no more than 16 Terabytes (usually less), then eight sectors with a capacity of 512 bytes create one cluster with a capacity of 4 kilobytes.
If utility Chkdsk  finds an unreadable sector, it tries to read information from it several more times, if information from the sector is still not readable, then the cluster containing it is added to the list of damaged clusters and then a new cluster starts to perform its function. So use the / r option if the previous / f option doesn't solve your problems.
  Well, now let's get started on how to run chkdsk program  from the Windows GUI, and then we’ll look at How to start chkdsk if your operating system does not load at all. Launch Chkdsk from the GUI.  Open the Computer window and select, for example, the drive (C :), right-click on it and select Properties,


If you check only the item Automatically fix system errors, then the file system will be checked for errors. Noting in addition the second paragraph Scan and repair bad sectors, you will also run a test to read all sectors of the disk being checked. Know that such a double check will take a lot of time.

Next, click Run. If the partition with Windows installed is selected for verification, in most cases (C :), the verification will not start immediately and you will receive the message “ Windows cannot check the drive that is currently in use. Want to check the disk for crashes the next time you start your computer". Push " Disk Check Schedule"And the next time the computer boots up, the operating system will start checking the disk (C :) for errors.


How to run the Chkdsk program from the command line

For example, we intend to check the disk for errors (C :)

Start - Run, then cmd


At the command prompt, type chkdsk with: / f

Before us there will be a window with the following content: " Cannot execute the Chkdsk command because the indicated volume is being used by another process. Should I check this volume the next time I reboot the system? Y (yes) / N (no)"
We agree and press Y. After rebooting, our system partition will be checked for errors.

How to run the chkdsk program if your computer does not boot and where novice users make mistakes

Friends of my work, I very often have to deal with such situations. Well, the operating system does not load and that's it, and most importantly, it freezes strangely at any stage of loading, the mouse and keyboard, respectively, stop responding to user actions. You can get out of this situation like this.
  I’ll give an example for two operating systems: Windows 7 and XP, let's start with Windows 7.
  Here we friends need an installation disk or. Each of them has a medium recovery windows  7 and you need to do the same thing. For example, we boot the computer from the installation windows drive  7. Who does not know how to boot the computer from the installation disk, read the article "".
  In the initial phase of booting the computer from the Windows 7 installation disc, the inscription "" will appear on the screen, immediately press any key on the keyboard (for example, a space), otherwise the inscription will pass within 10 seconds and you will not boot from the installation or recovery Windows 7 disc.


You can choose a tool first Startup Recovery  and if it doesn’t help you boot the system, then choose the tool Command line.


Now friends, attention, many users wanting to check for errors on the system drive (C :) in this place are mistaken, immediately entering the chkdsk command with: / f,

First of all, you and I need to determine the correct letters of all disks, since in the recovery environment they usually differ from those that we see in a working operating system. So, the drive with Windows installed most likely does not belong to the letter (C :), but to some other one.
  To determine the correct letter of the system drive, at the command prompt, we need to enter the notepad command and press Enter. Notepad will open. Next, select the menu File and Open.


The contents of the recovery disc are opened, it is always under the letter (X :). In this window, click the Computer button and enter the Computer window,


already here we can easily determine the disk on which the operating system is installed. In order to see the files inside the sections. Select the item File type and in the drop-down menu All files


By the way, if you need, then if necessary, you can copy the files located on any drive to your pre-connected flash drive, as well as move files from disk to disk. For example, you still decide to reinstall Windows, naturally your desire will be to transfer all the files you need from the disk (C :) to another disk, all this you can do in this window.
  So the disk (C :) turned out to be a hidden 100 MB partition (Main partition) System Reserved (this section is needed) this partition is needed first of all for location boot files  Windows 7 and their protection against careless user actions. If we go to this section, we will see absolutely nothing, since even in the recovery environment these files are not accessible to the user.
  The Windows 7 installation disc on which the recovery environment is located (that is, the drive) always has the letter X.
  But the disk on which Windows 7 is installed, the recovery environment has assigned the letter (D :).


Therefore, to check the disk with the installed operating system, we need to enter on the command line

chkdsk D: / f


Checking the system drive for file system errors begins.


If things are really bad and chkdsk D: / f does not help, try running the utility with the parameters

chkdsk D: / f / r

You may receive a warning " The Chkdsk command cannot be run on this volume because The volume is being used by another process. To start Chkdsk, you must first disable this volume. ALL OPEN VOLUME DESCRIPTORS WILL BE FURTHER INCORRECT. Volume Shutdown Confirmation". Enter the Latin letter Y and press Enter on the keyboard. The system disk will begin checking for bad sectors.


How to run the chkdsk program in the operating room windows system  XP if it does not start

You and I will need the Windows XP installation disk, we boot the computer from it.
  In the initial phase of booting from the Windows XP installation disc, the message “ Press any key to boot from CD ...", You must immediately press any key, otherwise the inscription will pass within 10 seconds and you will not boot from installation Windows  XP.


After a short process of copying files, a program window appears windows installation  XP. It will prompt you to reinstall the system or restore the existing one using the recovery console (press R). Choose Restore using the recovery console and press "R"


In which copy of windows  log in?
  If you have one operating system, select No. 1
Enter admin password. Enter the administrator password. If there is no password, then press Enter on the keyboard.
  When the Chkdsk utility is used in the Windows XP Recovery Console, the / R option is used mainly, which includes the functions of another / P option. Therefore, we will use the / R option

Enter the command Chkdsk / r

and press Enter, that is, we look for damaged sectors and restore information.


By the way, can you enter the command Chkdsk /? and familiarize yourself with HELP


Why sometimes, for no reason, when you turn on the computer, the hard disk check starts and what is the dirty bit?  If the file system on your computer works with errors, and this happens for many reasons that I described in the middle of the article (frequent computer shutdowns, viruses, crooked programs and drivers, etc.), then Windows marks the problem disk with a “dirty bit”
  You can check whether a disk is marked with a “dirty bit” by entering the command fsutil dirty query C: at the command line, where “C:” is the letter of the disk being checked for a dirty bit.
  As we see in my case, volume - C: is not "dirty"


At each booting windows special program  Autochk.exe checks all volumes for the presence of a dirty bit. If the dirty bit is set, then Autochk.exe runs the chkdsk / f program for this volume. That is, the problem volume is checked for errors.
  chkdsk / f finds file system errors and tries to fix them.
  I must say that in rare cases, a check can occur every time you turn on the computer for several days.
  It annoys many users. To get rid of this, for example, select the drive (C :), right-click on it and select Properties, then Tools and Run scan. Check both items Automatically fix system errors and the second item Check and repair bad sectors, press start, then restart the computer and wait for the scan to finish.

If this does not help, try the following. Try disabling disk check using the command line.

Press the key combination Win-R or Start -\u003e Run \u003d\u003e enter the cmd command -\u003e click OK. In the window that opens, enter the command

chkntfs / X C: (where C: is the name of the disk that the operating system constantly checks for errors.