Disk Management under Linux

Source: Internet
Author: User

Cylindrical cylinder

Sector sector

Head Head

/DEV/SDA1,/dev/sda2: First and second partitions of the first hard drive

Partitioning is not a physical function of a hard disk, but a software feature.

Mainstream partitioning: There are MBR and GPT mechanisms, the main differences are as follows:

1.mbr:master boot record, master boot record, traditional partitioning mechanism, applied to most PC devices that use the BIOS (Basic Input Output System), the Apple Computer does not use the BIOS but EFI ( Extensible Firmware Interface).

* Supports 32bit and 64bit systems

* MBR supports a limited number of partitions

* MBR only supports hard drives up to 2T, more than 2T drives will only use 2T space (with third-party workaround)

* MBR structure, accounted for the hard disk head 512 bytes, 446 bytes is the boot code, after 16 bytes x 4 = 4 partition table, the last two bytes must be a, AA. Up to 4 primary partitions, which can contain 3 primary partitions + one extended partition, and then create logical partitions above the extended partition (the IDE has up to 63 logical partitions and SCSI creates up to 15 partitions).

2.gpt:guid Par ation table is a newer partitioning mechanism that solves many of the drawbacks of the MBR.

* Support for more than 2T HDD

* Backward compatible MBR

* Must be available on UEFI-enabled hardware, UEFI is a next-generation hardware boot system that is proposed by Intel to replace the BIOS.

* 64bit system must be used

* MAC, Linux system can support GPT partition format

* Windows7 64bit, Windows Server 64bit support GPT

   

Add a 8G hard drive to a virtual machine before you can add it before you shut down the computer

------------------fdisk Partitioning tool supports Unix/win MBR only root su # into Superuser fdisk-l # confirm that you want to partition SDB FDISK/DEV/SDB # partition SDB

--------------Create a primary partition 2 G, an extended partition 6 G, 2G logical partition, 4G logical partition According to the prompts can be, note 1. Common commands: M help, p look at the information, l look at the partition type code, t change the code, W save and Exit 2. If it is the default value, enter 3 directly. The logical partition starts from 5 to 4. The so-called section of the division is to see the number of SDB1, forget to use P to look at 5. Set to 5G with +5g, don't forget the plus sign

------------------Partprobe # Refresh partition table, good habit if prompt "command not found" install PARTD RPM Package:yum-y Install parted (requires networking)

To view partition information:

ls/dev/sd*

Fdisk-l

Cat/proc/partitions

Disk Management under Linux

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.