Checking the hard disk on Linux

Description of your first forum.
Post Reply
Mitu100@
Posts: 1351
Joined: Tue Jan 07, 2025 4:30 am

Checking the hard disk on Linux

Post by Mitu100@ »

Enter Y in the command line and the next time you restart your disk will be checked (Most often this applies to the system disk).

Thanks to this command, you can check the disk performance without installing separate programs on Windows OS and Windows Server OS.

Linux
Now let's look at which commands and distributions you can use to check the disk operation.


In order to check the hard telegram data drive, there is also no need to install any additional utilities. Everything can be done with a couple of commands on the command line.

You should familiarize yourself with the following types of commands: sudo fdisk -l and badblocks.

Sudo fdisk -l - this command allows you to find out all the disks that are connected to the system and their names.
Badblocks - this command checks the hard disk for broken sectors.
Initially, you need to enter the Sudo fdisk –l command (If that's a small letter L) and thus find out the name of your disk.

After that, you need to enter the command Badblocks -sv /dev/vda

BadBlocks

-s - Thanks to this parameter, you can track the execution of the command.
-v - This allows you to check the hard disk for broken sectors.
As you can see in the screenshot, after entering this command with these parameters, you will be shown as a percentage of the number of sectors checked and how much time has passed. Also in parentheses you can see the number of errors found, the number of corrected and those that can no longer be affected.
As soon as the check is completed, you will be shown the following.
Post Reply