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

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

parted  /dev/sdb

mklabel gpt

用mkpart指令的时候,有个报警:

The resulting partition is not properly aligned for best performance


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


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

(1048576 + 0) / 512 = 2048

用这个公式得出2048


所以用这条指令创建就行了

mkpart primary 2048s 100%


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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章