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

Re: partman, growlight, discoverable partitions, and fun



Adam Borowski left as an exercise for the reader:
> I do have a different wish, though.  Could you please purge any references
> to drivemakers' units (stuff like MiB = million bytes, which current
> partitioner maliciously[1] swaps around with proper MB of 1048576B)? 

this really probably belongs over in the growlight bugtracker, but:

* i actually use the "memory units" for almost all interfaces,
  because that gives you the numbers you expect. for instance,
  my Seagate Exos 12TBs are 5859442688 4GB AF physical sectors,
  addressable as 23437770752 512B logical sectors. using
  tebibytes, this is 10.914TiB, as opposed to 12.000TB.

  as you can see at [0], we see 12T.

  there's only one place off the top of my head where they're
  *not* used, which is...

> Having them in the user interface is deeply harmful: people will get
> unoptimal alignment unless they 1. know about it, and 2. are careful enough. 

* alignment =] there we absolutely want to be using MiB etc.,
  and we do.

> >From your comments before I see that you try to do proper alignment, but in
> too many cases no matter how you try, the installer won't align well enough
> because the hardware might be newer than the version of growlight, hide its
> inner workings for marketing reason (like stealth SMR drives), etc.
> On the other hand, a completely oblivious user will get good alignment if
> you show numbers measured in gigabytes rather than gillionbytes.

so i'm not sure i necessarily buy that claim. if i'm overriding
the default alignment, i typically want to specify a value
that's independent of the disk size, and i always want it to be
in a *iB unit. oh, do you mean secondary and later partitions?
iirc, i accept (in addition to absolute sector numbers) a "+"
syntax where "+1M" would mean "the first possible 1MiB alignment
within this empty space", equal to the beginning of the empty
space when it happens to start on 1MiB multiple.

i don't know, mang; if i'm explicitly supplying sectors for
alignment purposes, i'm checking units pretty carefully.
preferably, i'm never doing that -- the only reason i can see
would be if i want to leave some large (larger than the
desirable alignment) chunk of empty space between two partitions.

and again, in any kind of alignment context, that's when you
*want* to be using MiB. and in such a context, "M" by itself is
interpreted that way.

> I know of only one case of multi-GB alignment (some early versions of ipmctl
> wanted a multiple of 32GB because certain vendor BIOSes had problems with
> smaller blocks), but the required alignment there is 1GB for years.

where here i assume you mean 1GiB aka 2³⁰ bytes, not 1GB aka 10⁹
bytes, correct? you could enter that as 1G, or 1GiB, or 1024MiB,
or 1048576KiB, or 1073741824. Using 1GB or 1000MB or 1000000KB
or 1000000000 would force undesirable behavior.

changes to the text/UI to gently nudge users to the correct
behavior will be cheerfully considered!

> And most importantly: thanks for this effort, it's greatly appreciated!

thank you for your kind words! i'd love to see this happen.

--nick

[0] https://nick-black.com/images/growlight-2021-09-26.png

-- 
nick black -=- https://www.nick-black.com
to make an apple pie from scratch,
you need first invent a universe.

Attachment: signature.asc
Description: PGP signature


Reply to: