Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fdisk and alignment



On Sun, 9 Jul 2023 at 17:41, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
>
> > I was using fdisk to setup a USB key on NetBSD-10 and noticed its
> > still defaulting to 63 sector offset, including when "1m" is entered:
>
> fdisk(8) man says:
> >      -A ptn_alignment[/ptn_0_offset]
> [..]
> >                                                                            If
> >              the first partition is not defined then the alignment and offset
> >              for disks larger than 128GB is set to 2048 (1MB).

Aha, thanks!

I can understand why 128GB was picked - as it's the ~largest
theoretically non-LBA accessible ATA size.

However, given than ATA-1, which maxed out at 2GB supported LBA, and
the earliest x86 machine NetBSD now supports is a 486, I suspect the
set of ATA/IDE machines that NetBSD supports that do not support LBA
is very small, and the set which do not support LBA but can take >2GB
drives is close to (if not) empty.

In practice I think it would be better not to penalise current use of
"small" (120GB SSD or 64GB or or CF/USB devices) for an edge case of
older hardware (note this is coming from someone with a NetBSD/vax
system :). If someone has a ST506/412 device somewhere, or a genuinely
ancient ATA drive then we could retain the current behaviour for small
(<=2GB) drives, but I think for at least >2GB we should default to
2048 sector alignment

David


Home | Main Index | Thread Index | Old Index