GPTパーティションテーブルに拡張パーティションがありますか?

GPTパーティションテーブルに拡張パーティションがありますか?

MBRモデルでは、4つの基本パーティションを作成できます。そのうちの1つは拡張パーティションにすることができ、拡張パーティションは論理パーティションにさらに細分化されます。

WikipediaのGPT回路図を考えてみましょう。

GPT

パーティション項目の範囲は、LBA 1からLBA 34までです。おそらくスペースが足りなかったでしょう。このパーティションの数はかなり多いことがわかっています。ディスクがGPTを使用してパーティション化されている場合は、拡張パーティションを作成できますか?可能であれば、GPTパーティションテーブルごとにいくつかの拡張パーティションを作成できますか?

これがLBA 1からLBA 34までのパーティションエントリの標準であるかどうかはわかりません。たぶんこの範囲を超えてパーティションエントリを拡張できますか?

実際、それはかなりの量の分割であり、私はそうするつもりはありません。

ベストアンサー1

128のパーティションはGPTの基本的な制限であり、半分のパーティションを使用することは実際には痛いかもしれません。

Linux自体には、最初にデバイスの名前空間にいくつかの制限がありました。 /dev/sdXの場合、パーティションの数は15個以下とします(sdaの場合は8,0、sdbの場合は8,16など)。より多くのパーティションがある場合は、ブロック拡張ベースとも呼ばれる259,Xを使用して表示されます。

もちろん、さまざまな方法でより多くのパーティションを作成できます。ループデバイス、LVM、GPT内のGPTまで。場合によっては、パーティションが仮想マシンにブロックデバイスとして提供され、パーティションを仮想ディスクドライブとして表示してパーティションを分割すると、この現象が自然に発生します。

パーティション内のこれらのパーティションが自動的に選択されることを期待しないでください。


gdisk@fpmurphy1がコメントで指摘したように、私は間違っていました。 、、、expert menuを使用して制限を変更できますresize partition table。ドライブの先頭と末尾に未パーティション領域がある場合は、既存のパーティションテーブルを使用してこれを実行できます(512バイトセクタは4つの追加パーティションエントリを受け入れることができます)。しかし、これがどれほど広くサポートされているかはよくわかりません。parted私が試した他のパーティショナーにはこれにはオプションがないようです。


設定できる最大制限はgdisk次のとおりですが、65536これには問題があります。

Expert command (? for help): s   
Current partition table size is 128.
Enter new size (4 up, default 128): 65536
Value out of range

それから...

Expert command (? for help): s   
Current partition table size is 128.
Enter new size (4 up, default 128): 65535
Adjusting GPT size from 65535 to 65536 to fill the sector

Expert command (? for help): s
Current partition table size is 65536.

何と言う?何を言っても構いません。

ただし、そのパーティションテーブルを保存しようとすると、gdisk数分間ループに閉じ込められます。

Expert command (? for help): w

--- gdisk gets stuck here ---
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND    
    22253 root      20   0   24004  11932   3680 R 100.0  0.1   1:03.47 gdisk      
--- unstuck several minutes later ---

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Your option? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/loop0.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

以下は、parted正常に完了した操作の説明です。

# parted /dev/loop0 print free
Backtrace has 8 calls on stack:
  8: /usr/lib64/libparted.so.2(ped_assert+0x45) [0x7f7e780181f5]
  7: /usr/lib64/libparted.so.2(+0x24d5e) [0x7f7e7802fd5e]
  6: /usr/lib64/libparted.so.2(ped_disk_new+0x49) [0x7f7e7801d179]
  5: parted() [0x40722e]
  4: parted(non_interactive_mode+0x92) [0x40ccd2]
  3: parted(main+0x1102) [0x405f52]
  2: /lib64/libc.so.6(__libc_start_main+0xf1) [0x7f7e777ec1e1]
  1: parted(_start+0x2a) [0x40610a]


You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:

    http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:

    http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (3.2)
along with the error message below, the output of

    parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion (gpt_disk_data->entry_count <= 8192) at gpt.c:793 in function
_parse_header() failed.

Aborted                                                                   

したがって、parted8192を超えるパーティションエントリを持つGPTは拒否されます。これは誰もしないので腐ったのでしょう?

これはデフォルト値に従わない場合に発生します。

おすすめ記事