chkdsk
Linux

La commande chkdsk sous Windows 10

Chkdsk est une commande sous le système d’exploitation Windows qui permet de vérifier l’état d’un disque spécifique, il indique également toutes les erreurs détectées sur le disque et les corrige.

Dans ce guide nous allons voir comment utiliser la commande chkdisk sous Windows 10.

Disponibilté de la commande chkdsk :

la commande chkdsk est accessible via l’invite de commande est disponible sous Windows 10, Windows 8, Windows 7, Windows Vista et Windows XP.

Elle est également accessible via les « Options de démarrage avancées » (Advanced Startup Options) et les options de restauration système (System Recovery Options).

Syntaxe de la commande chkdsk :

chkdsk [volume:] [/F] [/V] [/R] [/X] [/I] [/C] [/L:size] [/perf] [/scan] [/?]

Exemple :

Si vous taper la commande chkdsk sans paramètre, elle affiche l’état du disque en cours d’utilisation :

C:\Windows\system32>chkdsk
The type of the file system is NTFS.
WARNING! /F parameter not specified.
Running CHKDSK in read-only mode.
Stage 1: Examining basic file system structure …
565504 file records processed.
File verification completed.
Phase duration (File record verification): 6.14 seconds.
11805 large file records processed.
Phase duration (Orphan file record recovery): 0.00 milliseconds.
0 bad file records processed.
Phase duration (Bad file record checking): 0.34 milliseconds.
Stage 2: Examining file name linkage …
183 reparse records processed.
837122 index entries processed.
Index verification completed.
Phase duration (Index verification): 18.78 seconds.
0 unindexed files scanned.
Phase duration (Orphan reconnection): 2.75 seconds.
0 unindexed files recovered to lost and found.
Phase duration (Orphan recovery to lost and found): 0.51 milliseconds.
183 reparse records processed.
Phase duration (Reparse point and Object ID verification): 4.24 milliseconds.
Stage 3: Examining security descriptors …
Security descriptor verification completed.
Phase duration (Security descriptor verification): 29.71 milliseconds.
135810 data files processed.
Phase duration (Data attribute verification): 0.47 milliseconds.
CHKDSK is verifying Usn Journal…
36180752 USN bytes processed.
Usn Journal verification completed.
Phase duration (USN journal verification): 349.50 milliseconds.
Windows has scanned the file system and found no problems.
No further action is required.
468284779 KB total disk space.
184221676 KB in 417444 files.
260716 KB in 135811 indexes.
0 KB in bad sectors.
685779 KB in use by the system.
65536 KB occupied by the log file.
283116608 KB available on disk.
4096 bytes in each allocation unit.
117071194 total allocation units on disk.
70779152 allocation units available on disk.
Total duration: 28.08 seconds (28082 ms).

Spécifier la partition :

Si vous souhaitez vérifier une partition précise, il suffit de spécifier la lettre de la partition :

C:\Windows\system32>chkdsk c:
The type of the file system is NTFS.
WARNING! /F parameter not specified.
Running CHKDSK in read-only mode.
Stage 1: Examining basic file system structure …
565760 file records processed.
File verification completed.
Phase duration (File record verification): 6.12 seconds.
11840 large file records processed.
Phase duration (Orphan file record recovery): 0.00 milliseconds.
0 bad file records processed.
Phase duration (Bad file record checking): 0.86 milliseconds.
Stage 2: Examining file name linkage …
183 reparse records processed.
837398 index entries processed.
Index verification completed.
Phase duration (Index verification): 18.32 seconds.
0 unindexed files scanned.
Phase duration (Orphan reconnection): 2.60 seconds.
0 unindexed files recovered to lost and found.
Phase duration (Orphan recovery to lost and found): 0.53 milliseconds.
183 reparse records processed.
Phase duration (Reparse point and Object ID verification): 3.90 milliseconds.

le paramètre /r :

Ce paramètre permet de détecte les secteurs défectueux et essaye de récupérer toute les informations à partir des secteurs défectueux, par contre le disque doit être verrouillé, si ce n’est pas le cas le message ci-dessous s’affiche vous demandant si vous souhaitez effectué ce check au prochain démarrage du système.

Cette commande est utile lorsque vous utilisez les « options de démarrage avancées » ou « les options de restauration système » .

C:\Windows\system32>chkdsk c: /r
The type of the file system is NTFS.
Cannot lock current 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)

/scan /forceofflinefix :

Cette commande exécute une analyse en ligne sur le volume D, afin que vous n’ayez pas à démonter le volume pour exécuter le test, par contre au lieu de résoudre les problèmes détectés pendant que le volume est actif, les problèmes sont envoyés dans une file d’attente.

C:\Windows\system32>chkdsk d: /scan /forceofflinefix
The type of the file system is NTFS.
Stage 1: Examining basic file system structure …
1792 file records processed.
File verification completed.
Phase duration (File record verification): 75.14 milliseconds.
0 large file records processed.
Phase duration (Orphan file record recovery): 0.67 milliseconds.
0 bad file records processed.
Phase duration (Bad file record checking): 0.21 milliseconds.
Stage 2: Examining file name linkage …
331 reparse records processed.
2186 index entries processed.
Index verification completed.
Phase duration (Index verification): 383.45 milliseconds.
0 unindexed files scanned.
Phase duration (Orphan reconnection): 4.75 milliseconds.
0 unindexed files recovered to lost and found.
Phase duration (Orphan recovery to lost and found): 1.39 milliseconds.
331 reparse records processed.
Phase duration (Reparse point and Object ID verification): 7.92 milliseconds.
Stage 3: Examining security descriptors …
Security descriptor verification completed.
Phase duration (Security descriptor verification): 15.45 milliseconds.
197 data files processed.
Phase duration (Data attribute verification): 2.42 milliseconds.
Windows has scanned the file system and found no problems.
No further action is required.
488383487 KB total disk space.
80542424 KB in 1454 files.
528 KB in 199 indexes.
0 KB in bad sectors.
82655 KB in use by the system.
65536 KB occupied by the log file.
407757880 KB available on disk.
4096 bytes in each allocation unit.
122095871 total allocation units on disk.
101939470 allocation units available on disk.
Total duration: 492.48 milliseconds (492 ms).

le paramétre /perf :

Ce paramètre augmente la priorité de chkdsk afin qu’il puisse exécuter les analyses aussi rapidement que possible, lorsque vous utilisez ce paramètre, d’autres programmes de votre système peuvent ralentir en raison de ressources limitées.

Ce paramètre ne fonctionne que sur le système de fichiers NTFS et doit être utilisé avec /scan :

C:\Windows\system32>chkdsk d: /perf
/PERF can be specified only with /SCAN.
C:\Windows\system32>chkdsk d: /scan /perf
The type of the file system is NTFS.
Stage 1: Examining basic file system structure …
1792 file records processed.
File verification completed.
Phase duration (File record verification): 77.61 milliseconds.
0 large file records processed.
Phase duration (Orphan file record recovery): 0.82 milliseconds.
0 bad file records processed.
Phase duration (Bad file record checking): 0.23 milliseconds.
Stage 2: Examining file name linkage …
331 reparse records processed.
2186 index entries processed.
Index verification completed.
Phase duration (Index verification): 375.83 milliseconds.
0 unindexed files scanned.
Phase duration (Orphan reconnection): 3.41 milliseconds.
0 unindexed files recovered to lost and found.
Phase duration (Orphan recovery to lost and found): 2.08 milliseconds.
331 reparse records processed.
Phase duration (Reparse point and Object ID verification): 4.16 milliseconds.
Stage 3: Examining security descriptors …
Security descriptor verification completed.
Phase duration (Security descriptor verification): 16.76 milliseconds.
197 data files processed.
Phase duration (Data attribute verification): 2.36 milliseconds

le paramètre /? :

Pour voir tous les paramètre que vous pouvez utiliser avec la commande chkdsk, utiliser le paramètre /? :

C:\Windows\system32>chkdsk /?
Checks a disk and displays a status report.
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]
volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
filename FAT/FAT32 only: Specifies the files to check for
fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every
file on the disk.
On NTFS: Displays cleanup messages if any.
/R Locates bad sectors and recovers readable information
(implies /F, when /scan not specified).
/L:size NTFS only: Changes the log file size to the specified
number of kilobytes. If size is not specified, displays
current size.
/X Forces the volume to dismount first if necessary.
All opened handles to the volume would then be invalid
(implies /F).
/I NTFS only: Performs a less vigorous check of index
entries.
/C NTFS only: Skips checking of cycles within the folder
structure.
/B NTFS only: Re-evaluates bad clusters on the volume
(implies /R)
/scan NTFS only: Runs an online scan on the volume
/forceofflinefix NTFS only: (Must be used with "/scan")
Bypass all online repair; all defects found
are queued for offline repair (i.e. "chkdsk /spotfix").
/perf NTFS only: (Must be used with "/scan")
Uses more system resources to complete a scan as fast as
possible. This may have a negative performance impact on
other tasks running on the system.
/spotfix NTFS only: Runs spot fixing on the volume
/sdcleanup NTFS only: Garbage collect unneeded security descriptor
data (implies /F).
/offlinescanandfix Runs an offline scan and fix on the volume.
/freeorphanedchains FAT/FAT32/exFAT only: Frees any orphaned cluster chains
instead of recovering their contents.
/markclean FAT/FAT32/exFAT only: Marks the volume clean if no
corruption was detected, even if /F was not specified.
The /I or /C switch reduces the amount of time required to run Chkdsk by
skipping certain checks of the volume.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *