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]

If GPT:
[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.

1

 

References:

MBR partition document:
https://en.wikipedia.org/wiki/Master_boot_record

GPT partition document:
https://en.wikipedia.org/wiki/GUID_Partition_Table
http://ntfs.com/guid-part-table.htm

SCSI document:
http://www.seagate.com/staticfiles/support/disc/manuals/scsi/100293068a.pdf

Handy tool:
http://www.sweetscape.com/010editor/

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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