Formatting Hard Disks Quickly on the OS
This topic describes how to format hard disks quickly on the operating system (OS).
Procedure
- Open the command terminal on Linux, run the ls /dev/sd* command.
If the command output shown in Figure 1-21 is displayed, the OS has only one logical disk and is installed in /dev/sda.
- Run the fdisk command to delete partitions on the disk to be formatted, enter d in the Command field, and enter Partition number a partition number as prompted. After all partitions are deleted, enter w.
The information shown in Figure 1-22 is displayed.
- Run the fdisk –l command.
The information shown in Figure 1-23 is displayed.
- Run dd to format the hard disk.
Enter /dev/sdX which indicates the hard disk to be formatted in the of field. Enter the size of a data block in the bs field. Set count to Capacity of a hard disk/Size of a data block. For example, count= 899*1024/4=230144, as shown in Figure 1-24. It takes about 30 minutes to format a 900 GB hard disk.
The information shown in Figure 1-24 is displayed.
- Restart or forcibly power off and then power on the server, and reinstall the OS.