磁盘分区格式MBR限制了单块磁盘大小为2TB,如果想挂载超过2TB的磁盘,就要换成其他格式如GPT格式。
因为帮助客户使用OnApp搭建云平台,存储先用6TB在测试,所以需要通过其他格式来挂载这6TB的磁盘。分享下Linux上(我用的CentOS5.9 x86_64)挂载使用6TB的Dell MD3600f硬件存储的方法:
[root@demo ~]# parted /dev/sdb #使用parted来对GPT磁盘操作,进入交互式模式
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt # 将MBR磁盘格式化为GPT
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
parted: invalid token: gpt
Yes/No? yes
New disk label type? [gpt]? 按下Enter键
(parted) print
Model: DELL MD36xxf (scsi)
Disk /dev/sdb: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart primary 0 -1 #将整个磁盘空间全部分为一个区
(parted) print
Model: DELL MD36xxf (scsi)
Disk /dev/sdb: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 6000GB 6000GB primary
(parted) quit
Information: Don’t forget to update /etc/fstab, if necessary
硬件存储已经映射到Hypervisor服务器上了,所以不用再编辑/etc/fstab了。到这里就完成了CentOS 上挂载6TB磁盘。
(责任编辑:IT) |