解决parted分区时The resulting partition is not properly aligned for best performance报警

操做系统的sdb和sdc须要以lvm的方式给原来的分区扩容,因为是3T的磁盘,fdisk已经不能用了,只能用parted作成gpt格式。ide

parted  /dev/sdbgoogle

mklabel gptspa

用mkpart指令的时候,有个报警:操作系统

The resulting partition is not properly aligned for best performanceorm


google了一下,找到解决方法,mark一下it


# cat /sys/block/sdb/queue/optimal_io_size
1048576
# cat /sys/block/sdb/alignment_offset
0

(1048576 + 0) / 512 = 2048io

用这个公式得出2048form


因此用这条指令建立就好了class

mkpart primary 2048s 100%performance


原文连接:http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/

相关文章
相关标签/搜索