add GUID Partition Table (GPT) support in diskless server

Cafes start to use disks in 4TB, however, diskless server can support MBR partition table only which cannot handle partitions larger than 2TB. We need to add GPT partition table support to handle this, in addition, also need to support disk i/o with offset beyond 32bit.

First of all, add GPT at image management level, use a 300MB VHDX file to do the partition layout verification.

A diskless server actually writes several bytes at the beginning of the partition data(in RAM) when we mount a partition in diskless server. it can not work when we need to use GPT, because GPT has a bigger header. By append 1MB in front of real partition data, we can write either MBR header or GPT header.

if MBR:
[MBR][Partition Data]

[GPT header][Partition array][Partition Data][Backup Partition array][Backup GPT header]

Secondly, add large offset support at SCSI level(iSCSI is based on SCSI). Thanks to Seagate’s documents, I added following SCSI command: Read_Capacity_16,Read_16,Write_16

That’s all.

The two 6TB partitions are from real disks, mounted on the server.
The 30TB partition is from a VHDX disk, also mounted on the server.




MBR partition document:

GPT partition document:

SCSI document:

Handy tool:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s