Linux command Fdisk&mkfs

Source: Internet
Author: User
Tags what file system


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.