超过2T,磁盘分区

MBR:MBR分区表(即主引导记录)大家都很熟悉。所支持的最大卷:2T,而且对分区有限制:最多4个主分区或3个主分区加一个扩展分区

GPT: GPT(即GUID分区表)。是源自EFI标准的一种较新的磁盘分区表结构的标准,是未来磁盘分区的主要形式。与MBR分区方式相比,具有如下优点。突破MBR 4个主分区限制,每个磁盘最多支持128个分区。支持大于2T的分区,最大卷可达18EB。

-.使用parted

没有parted命令

#yum -y install parted

 

 

1、将、dev/sdb 分区

parted /dev/sdb

2、设置分区的类型

(parted) mklabel gpt

3、打印分区信息

(parted) p

4、分区

mkpart primary 0KB 40.0TB

 

输出:
rning: You requested a partition from 0.00B to 40.0TB.                  
The closest location we can manage is 17.4kB to 40.0TB.
Is this still acceptable to you?
Yes/No? yes (输入yes)                                                           
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i (输入i)

5、查看分区分区信息和退出

(parted) p
 Model: HP LOGICAL VOLUME (scsi)
 Disk /dev/sdb: 40.0TB
 Sector size (logical/physical): 512B/4096B
 Partition Table: gpt
 Number  Start   End     Size    File system  Name     Flags
   1      17.4kB  40.0TB  40.0TB               primary
(parted) quit

二、xfs格式化大分区
 

 #yum install kmod-xfs xfsprogs
 #modprobe xfs       //载入xfs文件系统模块
 #lsmod |grep xfs    //查看是否载入了xfs模块

用xfs格式化并挂载

 #mkfs.xfs -f /dev/sdb1
 #mount /dev/sdb1 /data

设置系统启动自动挂载分区

#cat  /etc/fstab
     /dev/sdb1  /data xfs  defaults  0  0

查看所有磁盘的状态

# parted -l

删除分区

(parted) p                                                                
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  21.5GB  21.5GB               gzh





(parted)  rm 1

把分区误删除了恢复

(parted) p                                                                
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 2      17.4kB  3000MB  3000MB  xfs          gzh
 1      10.0GB  21.5GB  11.5GB  xfs          gg

(parted) rm 2                                                             
(parted) p                                                                
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      10.0GB  21.5GB  11.5GB  xfs          gg

(parted) rescue 
Start? 0KB 
End? 3GB                                                                  
Information: A xfs primary partition was found at 17.4kB -> 3000MB.  Do you want to add it to the partition table?
Yes/No/Cancel? yes                                                        

(parted) p                                                                
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 2      17.4kB  3000MB  3000MB  xfs
 1      10.0GB  21.5GB  11.5GB  xfs          gg
rm

 

转载于:https://www.cnblogs.com/zhenhui/p/5775936.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值