Linux hard disk detection badblocks Function Description: Check the damaged blocks in the disk device. Syntax: badblocks [-svw] [-B <block size>] [-o <output file>] [disk device] [number of disk blocks] [start block] Supplementary description: when executing the command, you must specify the disk device to be checked and the number of disk blocks for the device. Parameter:-B <block size> specifies the disk block size, in bytes. -O <output file> writes the check result to the specified output file. -S shows the progress during the check. -V displays detailed information during execution. -W performs a write test during the check. [Disk device] specifies the disk device to be checked. [Number of disk blocks] Total number of blocks of the specified disk device. [Start block] specifies the block from which the check starts. Hdparm Syntax: hdparm [-partition hiiqttvyyz] [-a <cache partition>] [-A <0 or 1>] [-c] [-d <0 or 1>] [-k <0 or 1>] [-K <0 or 1>] [-m <Number of partitions>] [-n <0 or 1>] [-p] [-P <Number of partitions >] [-r <0 or 1>] [-S <time>] [-u <0 or 1>] [-W <0 or 1>] [-X <transmission Mode>] [device] supplementary instructions: hdparm can be detected to display and set the parameters of the IDE or SCSI hard disk. Hdparm-t/dev/hda (IDE Hard Disk) hdparm-t/dev/sda (SATA, SCSI, hard RAID card array) hdparm-t/dev/md0 (soft RAID device) test results should be greater than 40 MB/s under no-load conditions, and equal to 20 Mb/s under load conditions should be normal, if the test result is extremely low, you need to use a dedicated hard disk detection tool to test whether the disk is faulty. Fsck checks the file system and tries to fix the error. Syntax: fsck [-aANPrRsTV] [-t <file system type>] [file system...] note: When an error occurs in the file system, use the fsck command to try to fix it. Parameter:-a automatically fixes the file system and does not ask any questions. -A checks all file systems listed in the file according to the/etc/fstab configuration file. -N: If no command is executed, only the actions that will be performed are listed. -P checks all file systems at the same time when used with the "-A" parameter. -R uses the interactive mode to ask questions when performing repair, so that users can confirm and determine the handling method. -R when used with the "-A" parameter, the file system that skips the/directory is not checked. -S executes the Check job in sequence rather than simultaneously. -T <file system type> specifies the file system type to be checked. -T when The fsck command is executed, the title information is not displayed. -V shows the command execution process.