What should we do if we want to add a hard drive to the system?
1. Partition the disk import line to establish the available partition;
2. Format the partition to establish the filesystem available to the system;
3. If you want to be careful, you can test the newly established filesystem.
4. On a Linux system, a mount point (i.e. directory) needs to be set up and mounted;
First, MKFS the partition formatted
The MKFS command is used to create a Linux file system on a device (usually a hard disk). The MKFS itself does not perform the work of establishing the filesystem, but rather calls the relevant program to execute it.
MKFS (option) (parameter)
Options
FS: Specifies the parameters when the file system is established;
-t< file system type;: Specifies what file system to build;
-V: Displays the version information and the detailed use method;
-V: Displays a brief use method;
C: Before making the file system, check whether the partition has a bad track.
Parameters
File system: Specifies the device file name of the file system to be created;
Number of blocks: Specifies the number of disk blocks for the file system.
Build a Msdos file system on/DEV/HDA5, check for bad tracks, and list the process in detail:
Mkfs-v-T Msdos-c/dev/hda5
MKFS-T EXT3/DEV/SDA6//Format SDA6 partition as EXT3 format
MKFS-T EXT2/DEV/SDA7//Format SDA7 partition as ext2 format
Second, Fdisk
Fdisk-l View all partitions
Fdisk/dev/sda
The fsck command is used to check and attempt to repair errors in the file system. When the file system error four modernizations, the fsck command can be used to try to repair.
Document Inspection Fsck-y/DEV/HDA2
The difference between SDA and HDA
SD stands for Scsi,sata interface hard disk
HD represents the IDE interface's hard disk
SDA and HDA, the back of a, represent the first hard drive.
SDA1 and hda1 represent the first partition of the hard disk.
Linux command Fdisk&mkfs