Partition partitions in linux system

Source: Internet
Author: User
For linux partitions, you can use the fdisk command tool and parted tool for linux partitions. for partition tables, MBR partition tables and GPT partition tables are usually used for disks with a disk size smaller than 2 TB, we can use the fdisk and parted command tools for partitioning. for MBR partition tables, the special linux system disk partition. parted for linux partitions, the fdisk command tool and parted tool are usually used for MBR partition tables. and GPT partition tables for disks smaller than 2 TB, we can use the fdisk and parted command tools to partition the maximum disk size supported by MBR partition table features (usually using the fdisk command for partitioning: 2 TB supports up to 4 primary partitions or 3 primary partitions plus an extended partition. for GPT partition tables (partition using the parted command), the maximum volume is 18EB (1EB = 1024 TB) A maximum of 128 partitions are supported. for introduction to partition of the parted command tool, fdisk-l View disk information. parted/dev/sdb use the parted tool to operate disk/dev/sdbmktable gpt or mklabel gpt to mount disk/dev /sdb formatted as gpt partition table mkpart primary 0 MB 50 MB create a 50 m size primary partition mkpart extended 50 MB 100 MB create a 50 m size extended partition rm 1 delete partition with number 1 print: displays the disk/dev/sdb information. help: displays the help command to exit the parted command, in the linux command line window, format the partition mkfs. ext4/dev/sdb2 format the partition of disk/dev/sdb in the format of ext4. // automatically mount the disk vi/etc/fstable/dev/sdb2/backup ext4 defaults 1 2 scenario simulation: a 1 GB disk/dev/sdc is required. the partition table is in the gpt format and is divided into two MB partitions, one primary partition and one extended partition, format the file system in ext4 format and enable automatic mounting upon startup, the two directories are/backup/datafile1 using fdisk-l to View disk information. fdisk-l2 uses the command parted to format/dev/sdc parted/dev/sdc3 to the partition table mktable in gpt format. gpt4 creates a m primary partition mkpart primary 0 MB 400MB5 and exits quit6 format file system as ext4 mkfs. ext4/dev/sdc17 create two directories mkdir/backup mkdir/datafile8 for disk expansion (tip: For disk expansion that has formatted partition tables in gpt format, refer to the following) parted/dev/sdc 9 mkpart extended 400 MB 800MB10 View disk information print11 exit quit12 format file system is ext4 mkfs. ext4/dev/sdc213 configure to automatically mount disk vi/etc/fstab/dev/sdc1/backup ext4 default 1 2/dev/sdc2/datafile ext4 default 1 2 during operation it takes effect only after the system is restarted.
Related Article

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.