为什么gdisk的默认起始扇区与第一个不同?


2

在使用gdisk的空驱动器上创建新分区时,它告诉我默认的第一个扇区是2048.为什么不是34?
First sector (34-1953458142, default = 2048) or {+-}size{KMGTP}:

Answers:


3

来自man gdisk

   l      Change the sector alignment value. Disks with more logical sectors per physical  sec-
          tors  (such as modern Advanced Format drives), some RAID configurations, and many SSD
          devices, can suffer performance problems if partitions are not aligned  properly  for
          their  internal data structures. On new disks, GPT fdisk attempts to align partitions
          on 2048-sector (1MiB) boundaries by default, which optimizes performance for  all  of
          these disk types. On pre-partitioned disks, GPT fdisk attempts to identify the align-
          ment value used on that disk, but will set 8-sector alignment on  disks  larger  than
          300  GB  even  if  lesser  alignment  values  are detected. In either case, it can be
          changed by using this option.

要更改此值,可以在gdisk命令行上执行此操作:

x
l
1
m

x进入专家模式。 l更改对齐。1将其设置为1扇区。m返回主菜单。)

现在您可以创建一个新分区(命令n)。现在它可以从第34区开始。但如果你有一个现代的驱动器,那么最好不要这样做SSD。大多数现代驱动器具有4K块,这至少是8的对齐。这允许扇区40的开始。

如果您感到困惑,为什么在这种情况下你不能从第8区开始:

与“旧的传统分区”相比,GPT为分区数据保留了更多的空间。并且仍然存在MBR与旧分区保持一些兼容性。因此,每个驱动器的前34个扇区和最后33个扇区用于GPT,请参阅维基百科

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.