分类: LINUX
2015-03-03 16:01:46
最近上了台存储设备,6T空间,准备开始对大容量存储做分区以及格式化挂载
由于MBR分区支持最大容量只有2T 如果超过2T的话 就要使用gpt分区
首先使用parted命令把硬盘转换成gpt分区
——————————————————————
[root@ ~]# parted /dev/sdb
GNU Parted 1.8
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted)
由MBR转为GPT磁盘
—————————————————————————————————————-
(parted) mklabel 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?
Yes/No? Yes
(parted)
设定你要做的分区的type以及size(根据实际情况来) 0 ,-1表示起点容量和终点容量,其差就是分区容量,单位是M mkpart primary 0 -1 表示划分全部容量
—————————————————————————————————————-
(parted) mkpart primary 0 -1
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
(parted)
(parted)
(parted) p
Model: Adaptec RAID 5 (scsi)
Disk /dev/sdb: 6TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 28.0TB 6TB primary
(parted) quit
Information: You may need to update /etc/fstab.
已经分区完毕 接下来开始格式化硬盘并挂载
———————————————————————————————————————–
[root@ ~]# mkfs.ext3 /dev/sdb1
[root@ ~]# mount /dev/sdb1 /data
至此大功告成!
[root@ ~]$ df -lTh
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb1 ext3 6T 173M 6T 1% /data
(责任编辑:admin)
|
|
|
|
|
|