<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>i just created a second raid1 swap device, with partitions identical
in size to the first, all are aligned on 8sector boundaries, however mdstat reports the size of the second as 1024bytes smaller. offhand my guess is raid1 is only using the portion of the underlying
partitions that line up with some larger blocksize. i wonder if it
doesn't even matter whether i've created the partitions on 8sector
boundaries, i wonder if raid1 just optimizes for that anyway. if i knew that to be true, i'd fuss less over how they're created. anyone got
the inside scoop? got a reference?</div><div><br></div><div>details:</div><div></div><div><span style="color:rgb(39,78,19)"><font size="1"><span style="font-family:monospace,monospace">>Disk /dev/sda: 3907029168s<br>>Sector size (logical/physical): 512B/512B<br>>Partition Table: msdos<br>>Disk Flags:<br></span></font></span></div><div><span style="color:rgb(39,78,19)"><font size="1"><span style="font-family:monospace,monospace">>Number Start End Size Type File system Flags<br>> 1 2048s 20989951s 20987904s primary raid<br>> 5 2539062512s 2560050415s 20987904s logical</span></font></span></div><div><span style="color:rgb(39,78,19)"><font size="1"><span style="font-family:monospace,monospace">>Disk /dev/sdb: 3907029168s<br>>Sector size (logical/physical): 512B/512B<br>>Partition Table: msdos<br>>Disk Flags: <br>>Number Start End Size Type File system Flags<br>> 1 2048s 20989951s 20987904s primary raid<br>> 5 2539062512s 2560050415s 20987904s logical</span></font></span><br></div><div><br></div><div>mdstat however reports their sizes thus:</div><div><span style="color:rgb(39,78,19)"><span style="font-family:monospace,monospace"><font size="1">>Personalities : [raid1] <br>>md5 : active raid1 sdb5[1] sda5[0]<br>> 10484736 blocks super 1.2 [2/2] [UU]<br>>md127 : active raid1 sdb1[1] sda1[0]<br>> 10485760 blocks super 1.2 [2/2] [UU]</font></span></span></div><div><br></div><div>and swapon -s reports their sizes as 4bytes less than mdstat:</div><div></div><div><span style="font-family:monospace,monospace"><font size="1"><span style="color:rgb(39,78,19)">>Filename Type Size Used Priority<br>>/dev/md127 partition 10485756 27968 -1<br>>/dev/md5 partition 10484732 0 -2</span></font></span><br></div></div></div></div></div></div></div>