No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


How Do I Format Hard Disks and Restore Failed Disks on a Linux OS

Publication Date:  2019-04-23 Views:  203 Downloads:  0

Issue Description

How do I format hard disks and restore failed disks on a Linux OS?


1. Visit the open source community and download sg3_utils at the following address:


2. After the correct installation package is downloaded, copy it to the Linux OS, and run the following commands to install sg3_utils (the following uses the tar.gz format as an example):

tar -zxvf sg3_utils-1.33.tar.gz

cd sg3_utils-1.33



make install

3. After the installation is complete, the sg_format tool is available in the system. Use this tool to format the hard disk.

Formatting command: sg_format -F /dev/sdb

(Change the drive letter according to the actual situation.)

4. After the formatting is started, do not restart the system or remove the hard disk. Wait until the formatting is complete.

5.  After the formatting is complete, the hard disk can be used properly.


Note: During the formatting, you can run sg_format -F -v /dev/sdx to query the formatting progress. (If the hard disk is not being formatted, the command starts formatting the hard disk.)