Use GPT to partition, format, mount a disk under Linux

Source: Internet
Author: User
Tags uuid

GPT (GUID) partitioning (recommended)

    1. sudo parted # Enter the parted tool, enter help to view assistance

    2. SELECT/DEV/SDA # Select the device you want to operate, be sure to be careful not to operate the default device by mistake

    3. Mklabel GPT # Sets the type of partition to use, and if you want to use MBR partitioning, enter MSDOS.

    4. Mkpart # Adding a partition
      (parted) Mkpart
      5. Enter the name of the partition, carriage return

6. Enter which file system to use, default ext2, enter (can be arbitrarily selected here, then reformat to file system)
File system type? [Ext2]? Xfs
7. Enter the partition starting from the location of the first few megabytes, enter 1, starting at 1Mb (preferably not starting from 0)
Starting point? 1

8. Enter the partition from the end of the first few megabytes, enter 2000, end of 2000Mb
End point? 3TB

9. The partition is now successful, enter print to view the current partition status
(parted) Print
Model:ata st3000vx000-1es1 (SCSI)
Disk/dev/sda:3001gb
Sector size (logical/physical): 512b/4096b
Partition TABLE:GPT
Disk Flags:

        Number  Start   End     Size    File system  Name  标志         1      1049kB  3001GB  3001GB        (parted) quit                                                                     信息: You may need to update /etc/fstab.10.格式化             # mkfs.xfs /dev/sda111.挂载            # mount /dev/sda1 /data/12.获取UUID方法        [[email protected] ~]# blkid /dev/sda1        /dev/sda1: UUID="1caf6563-3a4b-47d6-a4eb-cbcb6f17d830" TYPE="xfs" PARTUUID="5c7c330a-389d-4c3b-a0e3-d759fb2447d2"13.通过/etc/fstab文件来实现开机自动挂载:            # vim /etc/fstab            UUID=1caf6563-3a4b-47d6-a4eb-cbcb6f17d830 /data           xfs     defaults        0 0

Use GPT to partition, format, mount a disk 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.