파일 시스템 및 논리적 및 물리적 오류에 대 한 볼륨의 파일 시스템 메타 데이터를 확인합니다. If used without parameters, chkdsk displays only the status of the volume and doesn't fix any errors. If used with the /f, /r, /x, or /b parameters, it fixes errors on the volume.
Important
Membership in the local Administrators group, or equivalent, is the minimum required to run chkdsk. To open a command prompt window as an administrator, right-click Command prompt in the Start menu, and then select Run as administrator.
Important
Interrupting chkdsk isn't recommended. However, canceling or interrupting chkdsk shouldn't leave the volume any more corrupt than it was before chkdsk was run. Running chkdsk again checks and should repair any remaining corruption on the volume.
Note
Chkdsk는 로컬 디스크에 대해서만 사용할 수 있습니다. 이 명령은 네트워크를 통해 리디렉션된 로컬 드라이브 문자와 함께 사용할 수 없습니다.
Syntax
chkdsk [<volume>[[<path>]<filename>]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:<size>]] [/b] [/scan] [/forceofflinefix] [/perf] [/spotfix] [/sdcleanup] [/offlinescanandfix] [/freeorphanedchains] [/markclean] [/?]
Parameters
Parameter | Description |
---|---|
<volume> |
드라이브 문자(뒤에 콜론이 옴), 탑재 지점 또는 볼륨 이름을 지정합니다. |
[<path>]<filename> |
파일 할당 테이블(FAT) 및 FAT32만 함께 사용합니다. Specifies the ___location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use the wildcard characters ? and * to specify multiple files. |
/f | 디스크에서 오류를 해결합니다. 디스크를 잠가야 합니다. If chkdsk can't lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer. |
/v | 디스크를 검사할 때 모든 디렉터리의 각 파일의 이름을 표시 합니다. |
/r | 불량 섹터를 찾아 읽을 수 있는 정보를 복구 합니다. 디스크를 잠가야 합니다. /r includes the functionality of /f, with the additional analysis of physical disk errors. |
/x | 필요한 경우 볼륨을 먼저 분리 되도록 합니다. 드라이브에 열려 있는 모든 핸들이 무효화 됩니다. /x also includes the functionality of /f. |
/i | NTFS로 사용 합니다. Performs a less vigorous check of index entries, which reduces the amount of time required to run chkdsk. |
/c | NTFS로 사용 합니다. Doesn't check cycles within the folder structure, which reduces the amount of time required to run chkdsk. |
/l[:<size> ] |
NTFS로 사용 합니다. 입력 한 크기를 로그 파일 크기를 변경 합니다. If you omit the size parameter, /l displays the current size. |
/b | NTFS로 사용 합니다. 볼륨에서 잘못된 클러스터 목록을 지우고 할당된 모든 클러스터와 사용 가능한 클러스터에서 오류를 다시 검사합니다. /b includes the functionality of /r. 새 하드 디스크 드라이브에 볼륨 이미징 후이 매개 변수를 사용 합니다. |
/scan | NTFS로 사용 합니다. 볼륨에서 온라인 검사를 실행합니다. |
/forceofflinefix | Use with NTFS only (must be used with /scan). 모든 온라인 복구를 무시합니다. 발견된 모든 결함은 오프라인 복구를 대기합니다(예: chkdsk /spotfix ). |
/perf | Use with NTFS only (must be used with /scan). 시스템 리소스를 더 많이 사용하여 최대한 빨리 검사를 완료합니다. 이는 시스템에서 실행되는 다른 작업에 부정적인 성능 영향을 미칠 수 있습니다. |
/spotfix | NTFS로 사용 합니다. 볼륨에서 지점 수정을 실행합니다. |
/sdcleanup | NTFS로 사용 합니다. Garbage collect unneeded security descriptor data (implies /f). |
/offlinescanandfix | 볼륨에서 오프라인 검사와 수정을 실행합니다. |
/freeorphanedchains | FAT/FAT32/exFAT만 함께 사용합니다. 그 콘텐츠를 복구하는 대신 분리된 클러스터 체인을 해제합니다. |
/markclean | FAT/FAT32/exFAT만 함께 사용합니다. Marks the volume clean if no corruption was detected, even if /f wasn't specified. |
/? | 명령 프롬프트에 도움말을 표시합니다. |
Remarks
The /i or /c switch reduces the amount of time required to run chkdsk by skipping certain volume checks.
If you want chkdsk to correct disk errors, you can't have open files on the drive. 파일이 열려 있으면 다음 오류 메시지가 나타납니다.
Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)
If you choose to check the drive the next time you restart the computer, chkdsk checks the drive and corrects errors automatically when you restart the computer. If the drive partition is a boot partition, chkdsk automatically restarts the computer after it checks the drive.
chkntfs /c
명령을 사용하여 다음에 컴퓨터를 다시 시작할 때 볼륨을 확인하도록 예약할 수도 있습니다. Use thefsutil dirty set
command to set the volume's dirty bit (indicating corruption), so that Windows runs chkdsk when the computer is restarted.You should use chkdsk occasionally on FAT and NTFS file systems to check for disk errors. Chkdsk examines disk space and disk use and provides a status report specific to each file system. 상태 보고서에는 파일 시스템에서 발견 된 오류가 표시 됩니다. If you run chkdsk without the /f parameter on an active partition, it might report spurious errors because it can't lock the drive.
Chkdsk corrects logical disk errors only if you specify the /f parameter. Chkdsk must be able to lock the drive to correct errors.
Because repairs on FAT file systems usually change a disk's file allocation table and sometimes cause a loss of data, chkdsk might display a confirmation message similar to the following:
10 lost allocation units found in 3 chains. Convert lost chains to files?
If you press Y, Windows saves each lost chain in the root directory as a file with a name in the format
File<nnnn>.chk
. When chkdsk finishes, you can check these files to see if they contain any data you need.If you press N, Windows fixes the disk, but it doesn't save the contents of the lost allocation units.
If you don't use the /f parameter, chkdsk displays a message that the file needs to be fixed, but it doesn't fix any errors.
많은 수의 파일(예: 수백만 개의 파일)
chkdsk /f*
이 있는 큰 디스크 또는 디스크에서 사용하는chkdsk /f
경우 완료하는 데 시간이 오래 걸릴 수 있습니다.Use the /r parameter to find physical disk errors in the file system and attempt to recover data from any affected disk sectors.
If you specify the /f parameter, chkdsk displays an error message if there are open files on the disk. If you don't specify the /f parameter and open files exist, chkdsk might report lost allocation units on the disk. 이 문제는 열려 있는 파일이 파일 할당 테이블에 아직 기록되지 않은 경우에 발생할 수 있습니다. If chkdsk reports the loss of a large number of allocation units, consider repairing the disk.
공유 폴더에 대한 섀도 복사본을 사용하는 동안에는 공유 폴더 원본 볼륨의 섀도 복사본 을 잠글 수 없으므로 원본 볼륨에 대해 chkdsk 를 실행하면 잘못된 오류가 보고되거나 chkdsk 가 예기치 않게 종료될 수 있습니다. You can, however, check shadow copies for errors by running chkdsk in Read-only mode (without parameters) to check the Shadow Copies for Shared Folders storage volume.
The chkdsk command, with different parameters, is available from the Recovery Console.
On servers that are infrequently restarted, you might want to use the chkntfs or the
fsutil dirty query
commands to determine whether the volume's dirty bit is already set before running chkdsk.
chkdsk가 다른 미디어에서 수행하는 방식
Physical nature: HDDs use spinning magnetic platters. 섹터와 블록은 플래터에서 물리적으로 읽습니다.
chkdsk가 실행되는 경우:
- The physical head must move to each data ___location being checked, which is slower due to mechanical movement.
- Checking for bad sectors (with
/r
) takes longer as every sector's physical integrity is checked and bad ones are replaced if possible. - 높은 시간 런타임은 대형 드라이브에서 드문 일이 아닙니다.
일반적으로 대용량 HDD /r
/b
에서는 모든 섹터를 읽을 때 상당한 시간이 소요됩니다. 오류가 없고 대부분 빈 드라이브가 있어도 실제 읽기 속도 병목 현상이 발생합니다.
대용량 HDD에서 프로세스를 너무 빨리 완료할 수 있는 chkdsk
경우가 있을 수 있습니다. 이 경우 다음과 같은 상황이 발생할 수 있습니다.
- 볼륨이 더럽게 탑재되거나 운영 체제(OS) 또는 다른 프로세스에 의해 잠깁니다.
- 이
chkdsk
작업은 실제로 드라이브의 모든 섹터를 스캔하지 않았습니다. - HDD에 실패한 읽기 헤드 또는 예측 불가능하게 동작하는
chkdsk
기타 하드웨어 문제가 있을 수 있습니다. - 이
chkdsk
작업은 파일 시스템 구조에 대한 온라인 검사만 수행했으며 OS로 부팅하기 전에 오프라인 검사를 실행하기 위해 명시적으로 수행되지 않았습니다.
로그를 chkdsk
보면 검사 중에 잠재적인 문제가 발생할 수 있습니다. 자세한 내용은 chkdsk 로그 보기를 참조하세요.
종료 코드 이해
The following table lists the exit codes that chkdsk reports after it has finished.
Exit code | Description |
---|---|
0 | 없음 오류가 발견 되었습니다. |
1 | 오류 발견 하 고 해결 되었습니다. |
2 | Performed disk cleanup (such as garbage collection) or didn't perform cleanup because /f was not specified. |
3 | Could not check the disk, errors could not be fixed, or errors were not fixed because /f was not specified. |
Examples
D 드라이브의 디스크를 확인하고 Windows에서 오류를 수정하게 하려면 다음을 입력합니다.
chkdsk d: /f
If it encounters errors, chkdsk pauses and displays messages.
Chkdsk finishes by displaying a report that lists the status of the disk. 완료될 때까지 chkdsk
지정된 드라이브에서 파일을 열 수 없습니다.
연속 되지 않은 블록에 대 한 현재 디렉터리에 FAT 디스크에 있는 모든 파일을 확인 하려면 다음을 입력 합니다.
chkdsk *.*
Chkdsk displays a status report, and then lists the files that match the file specifications that have noncontiguous blocks.
chkdsk 로그 보기
이벤트 뷰어와 PowerShell을 사용하여 Windows에서 chkdsk 로그 파일을 검색하는 데 사용할 수 있는 두 가지 방법이 있습니다.
이벤트 뷰어를 사용하여 로그를 보려면 다음 작업을 수행합니다.
Start >Control Panel>Administrative Tools>Event Viewer.
Alternatively, press Win + R keys to bring up the run dialog box, type eventvwr.msc, and select OK.
Expand Windows Logs> right-click on Application> select Filter Current Log.
현재 로그 필터링 창에서 이벤트 원본 드롭다운 메뉴로 이동하고, Chkdsk 및 Wininit을 선택합니다.
Select OK to finish filtering for these two sources.