码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 创建大于2T的分区(parted创建GPT分区)

时间:2021-01-21 10:44:15      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ant   gpt   sda   cancel   roo   现在   ali   existing   linux   

现在有一块12T的磁盘,需要分成三个区作为OpenStack的存储目录,分别为:

  • /dev/sda1(6T):作为Nova实例存放目录/var/lib/nova/instances
  • /dev/sda2(4T):存放Cinder数据卷存放分区
  • /dev/sda3(2T):作为Swift对象存储使用分区

操作方法:

[root@openstack-controller ~]# parted /dev/sda
......
(parted) mklabel gpt    # 更改为pgt分区
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes                                                               
(parted) print    # 打印分区信息                                                        
Model: AVAGO MR9361-8i (scsi)
Disk /dev/sda: 12.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt    # 确认为gpt
Disk Flags: 

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary 0 6TB    # 创建6TB分区                                    
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i                                                          
(parted) mkpart primary 6TB 10TB    # 创建4TB分区
(parted) mkpart primary 10TB 12TB    # 创建2TB分区
(parted) print                                                            
Model: AVAGO MR9361-8i (scsi)
Disk /dev/sda: 12.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start    End      Size    File system  Name     Flags
 1      17.4kB   6000GB   6000GB               primary
 2      6000GB   10000GB  4000GB               primary
 3      10000GB  12.0TB   2001GB               primary
(parted) quit

[root@openstack-controller ~]# lsblk   # 验证
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 10.9T 0 disk
├─sda1 8:1 0 5.5T 0 part
├─sda2 8:2 0 3.7T 0 part
└─sda3 8:3 0 1.8T 0 part
...

 

 

Linux 创建大于2T的分区(parted创建GPT分区)

标签:ant   gpt   sda   cancel   roo   现在   ali   existing   linux   

原文地址:https://www.cnblogs.com/wubolive/p/14304208.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有
迷上了代码!