标签:
最近新买了一台服务器DELL R730
首先我们做了一个raid 1 和raid 5
在raid 1 上安装系统
安装完系统之后,现在要进行分区了,那个raid 5 做完之后,实际大小是19T
所以这里不能用传统的fdisk来分区了,这里采用parted来分区,我们的系统是centos 7的,文件系统类型都设成是xfs文件系统了
这里开始分区:
[root@localhost ~]# parted /dev/sdb
GNU Parted 3.1
使用 /dev/sdb
Welcome to GNU Parted! Type ‘help‘ to view a list of commands.
(parted) p
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdb: 20.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name 标志
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
(parted) print free
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdb: 20.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name 标志
17.4kB 20.0TB 20.0TB Free Space
(parted) parted
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
(parted) mkpart /dev/sdb1
文件系统类型? [ext2]? xfs
起始点? 0
结束点? 5120GB
警告: The resulting partition is not properly aligned for best performance.
忽略/Ignore/放弃/Cancel? ignore
(parted) mkpart /dev/sdb2
文件系统类型? [ext2]? xfs
起始点? 5120GB
结束点? 10240GB
(parted) mkpart /dev/sdb3
文件系统类型? [ext2]? xfs
起始点? 10240GB
结束点? 15360GB
(parted) print free
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdb: 20.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name 标志
1 17.4kB 5120GB 5120GB /dev/sdb1
5120GB 5120GB 524kB Free Space
2 5120GB 10.2TB 5120GB /dev/sdb2
3 10.2TB 15.4TB 5120GB /dev/sdb3
15.4TB 20.0TB 4641GB Free Space
(parted) mkpart /dev/sdb4
文件系统类型? [ext2]? xfs
起始点? 15360GB
结束点? 20001GB
(parted) q
经过查找资料发现ext4格式不支持16T以上磁盘分区,没办法只能采用xfs格式。现在分区完成了。现在需要格式化磁盘了
mkfs.xfs /dev/sdb1
mkfs.xfs /dev/sdb2
mkfs.xfs /dev/sdb3
mkfs.xfs /dev/sdb4
现在就开始创建逻辑卷了
pvcreate
vgcreate vgdata
lvcreate lvdata
mkfs.xfs .../vgdata-lvdata
现在就是挂在分区了mkdir /ftproot
mount /dev/mapper/vgdata-lvdata /ftproot
vim /etc/fstab
/dev/mapper/vgdata-lvdata /ftproot xfs defaults 0 0
有关/etc/fstab下面的列的参数的意思是:http://blog.csdn.net/duyiwuer2009/article/details/8644753
文章参考:
http://blog.sina.com.cn/s/blog_406127500102uyr9.html
http://www.tuicool.com/articles/u63e6f
http://blog.chinaunix.net/uid-26413552-id-3379232.html
标签:
原文地址:http://www.cnblogs.com/smail-bao/p/5691154.html