Date: Wed, 8 Jun 2011 01:29:43 -0400 From: Robert Simmons <rsimmons0@gmail.com> To: freebsd-fs@freebsd.org Subject: Re: GPT and disk alignment Message-ID: <BANLkTikuZRL=x1iZ8KXP0LHs4Ea6prAhZA@mail.gmail.com> In-Reply-To: <op.vwqpfipr34t2sn@skeletor.feld.me> References: <BANLkTik0MsD1fWcsshZ2u0Xj7t2gJOyBbg@mail.gmail.com> <op.vwqpfipr34t2sn@skeletor.feld.me>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 8, 2011 at 12:29 AM, Mark Felder <feld@feld.me> wrote: > On Tue, 07 Jun 2011 22:27:24 -0500, Robert Simmons <rsimmons0@gmail.com> > wrote: >> Do all HDDs that have 4KB per LBA present themselves to the OS as >> having 512 bytes per LBA? > > No Ok, but can I assume that all HDDs of this type expand each of the 4K sectors so that physically they take up the same space as eight 512 byte LBAs? AFAIK, the new 4K LBA has a smaller ECC area than the sum of 8 ECC areas in 512 byte LBAs, so if the data area was _not_ expanded slightly, you would never really be aligned except every x LBAs as the shifting approaches an LBA boundary, right? For any HDDs, do I need to worry about cylinder boundaries at all? Has the reported "disk geometry" become divorced from the physical reality in modern disks? If I do still need to worry about cylinder boundaries, should I basically ignore every reported geometry (BIOS, OS) and use what is written on the sticker on the drive? >> What about SSDs that have 1024 bytes per LBA? > > Not sure, but I do know that not all flash media have the same bytes per LBA > internally. Some are 1K, some 4K, some even 8K. GPT is definitely the way to > go if you want to make sure you're aligned. Ok, is there some way to tell gpart(8) what the LBA size is, or do I have to calculate the offset of each partition manually? In Linux it would be "fdisk -b 1024" for the example of SSDs or "fdisk -b 4096" for 4K HDDs. Can I just ignore the idea of "cylinder boundaries" completely when dealing with SSDs and flash memory?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikuZRL=x1iZ8KXP0LHs4Ea6prAhZA>