
Russell Coker wrote:
On Tue, 24 Jul 2012, Colin Fee <tfeccles@gmail.com> wrote:
Logical Sector size: 512 bytes Physical Sector size: 4096 bytes
So if you have a drive like that (as some of my drives return the same numbers) then how do you make sure that the partitions are correctly aligned? Or does parted just do the right thing?
Current generation parted has options which amount to "none", "some" and "lots" of alignment. The manual has the actual details. Also, using e.g. "0%" instead of "0" or "0b" seems to result in parted interpreting your request more loosely, i.e. with better alignment. Anything 2TiB or higher (note: this does not include 2*TB*) will not have 512b blocks. Anything below 2TiB might, but usually doesn't. The FTLs on SSDs (and SD/MMC readers) tend to hide the underlying block size, so parted's built-in optimagic doesn't know about it. In these cases you have to do it by hand, which is... tedious. Especially when the FTL vendor targets Windows and silently shifts everything a sector to the right, so that windows' default 63-sector (?) alignment will line up with the erase blocks. ...dunno if 3TiB HDDs have that issue. I have deployed a couple of 3TiB disks but my main concern was getting BIOS/GPT hybrid booting working under extlinux, not block alignment. I can't remember if I solved the latter. Re. doing it by hand, Ty Tso had a blog post about it on Intel SSDs with LVM and ext4, which may be applicable. I can't find it just now.