解決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/

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