Linux file System Management and new hard disk partition format

Source: Internet
Author: User
Tags file system linux

On a Linux server, when the partition planning of an existing hard disk does not meet the requirements (eg: too little space left on the root partition to continue installing a new System program), the partitions on the hard disk need to be redesigned and adjusted, and sometimes new hard disk devices need to be added to extend the storage space.

To do this requires an FDISK disk and partition management tool, and Fdisk is one of the basic tools that come with most Linux systems, where you can learn the use of FDISK tools by adding a hard disk to a Linux host and building a partitioning process.

After adding a new hard disk device and starting the host, the Linux system automatically detects and loads the hard drive, which is required to be installed. The "fdisk-l" command allows you to view, confirm the device name of the new hard disk, and the "fdisk-l" command to list information about all the hard disk devices and their partitions in the current system.

Eg: Execute "fdisk-l" command to confirm the newly identified hard disk device (/DEV/HDB, I add the equipment seems to be a bit old, but the same)!

The above output information contains the overall situation of each hard disk and partition, where "/dev/hda" for the original hard disk equipment, and "/DEV/HDB" for the new hard disk, the new hard disk device has not been initialized, does not contain valid partition information. For existing partitions, the following information is exported through the list:

Device: The device file name for the partition,

Boot: Is the boot partition, yes, there is a "*" Identity,

Start: The starting position of the partition on the hard disk (number of cylinders),

End: The ending position of the partition on the hard disk (number of cylinders),

Blocks: The size of the partition, in Blocks (block), the default block size is 1024 bytes,

ID: The ID tag number of the partition type, for the EXT3 partition is 83,LVM partition is 8e,

System: Partition type.

After recognizing the new hard disk device, you can then create a new partition on the hard drive, in which the partitioning and formatting process is relatively independent, and we will step through the operation of the format partition.

Planning partitions on your hard disk:

In the hard disk device to create, delete, change partitions and other operations also through the FDISK command, as long as the use of the hard disk device file as a parameter, eg: the implementation of "FDISK/DEV/HDB" command, you can enter the interactive partition management interface;

In this interface, command (M for help): "Prompt, the user can enter specific partition operation instruction, complete each partition management task, EG:M, N, p, etc. the next is the text:

1, "p" instruction--list of partitions on the hard drive

You can use the "P" directive to list detailed partitioning, which is displayed in the same format as the "fdisk-l" command. The output list information is empty when the partition is not already established on the hard disk.

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.