When using parted to create disk partions you may recieve the following warning message
Warning: The resulting partition is not properly aligned for best performance
Th parameters required to align the partition should be found in the physical disk device files.
The parameters for the block device sdb, can be retrieved with the following commands
cat /sys/block/sdb/queue/optimal_io_size
cat /sys/block/sdb/queue/minimum_io_size
cat /sys/block/sdb/queue/physical_block_size
cat /sys/block/sdb/alignment_offset
To calculate the sector on which to align the partition
optimal_io_size + alignment_offset / physical_block_size
For example, an SD card with a 512 byte block size
512 + 0 / 512 = 1
The parted command to create the partition using all available space, is then
mkpart primary 512s 100%
« Go back
Powered by Help Desk Software HESK, in partnership with SysAid Technologies