Skip to content

Custom Partitioning & Raid (CPR)

Custom Partitioning & Raid (CPR) is a powerful and yet easy to use feature that helps you configure the disk configuration of Reserved Hardware instances during deployment.

Please note: this feature is not available for on-demand instances. A reserved device is required. This is because with reserved devices, our system knows the exact drive scheme to allow such customization. However, all of our machine types can be converted to reserved hardware, so just reach out to support@equinixmetal.com to arrange a reservation.

Getting Started

First things first, you should be familiar with the API calls available for device provisioning, you'll need them! You can find examples for deploying reserved hardware here.

You should also be aware of our standard disk configurations for each server type. With a few hardware-specific exceptions, generally speaking, this looks like:

  • c3.small.x86: 2 x 480 GB (1 for Boot)
  • s3.xlarge.x86: 2 × 960 GB SSD (1 for Boot), 96 TB HDD (12 x 8 TB) & 480 GB of NVMe Flash
  • m3.large.x86: 2 × 240 GB SSD (Boot) & 7.6 TB of NVMe Flash (2 x 3.8 TB)

Some servers are UEFI only and require an extra step for the CPR configuration. Please check the last section of this article for the details of UEFI only servers.

Using CPR During Provisioning

Let's say you are going to deploy one of your reserved instances. An example call to the API might look like this:

curl -X POST -H "X-Auth-Token: token" -H "Content-Type: application/json" -d '
{
  "hardware_reservation_id": "string",
  "hostname": "string",
  "billing_cycle": "string",
  "operating_system": "string",
  "storage": {JSON Object},
  "userdata": "string",
  "tags": ["string"]
}' "https://api.equinix.com/metal/v1/projects/{ID}/devices"

Note: 'storage' and 'JSON Object' are where you would specifically state your storage configuration requirements.

Drive Type Name Differences (SATA HDDs, SATA SSDs, and NVMe Flash)

It's worth noting that the OS will use a different naming scheme for NVMe drives compared to standard SSDs and HDDs which are usually seen in the format of sda, sdb etc. On the other hand, NVMe drives usually follow the naming scheme of nvme0n1, nvme1n1 etc. To get accurate drive names, we suggest that you deploy the server and go into rescue mode (Alpine OS). Then run fdisk -l to list all drives.

When partitioning, standard drives are usually followed by a number, so sda1 and sda2 while NVMe drives are usually followed by a p and number, so it would be nvme0n1p1 and nvme0n1p2.

c3.small.x86 CPR Example

Using a simple c3.small.x86 to start, the following example shows you how to:

  • State which disks you want to format.
  • How you want these disks formatted.
  • What filesystem should be created.
  • Where to mount the partition once created.
{
  "disks": [
    {
      "device": "/dev/sda",
      "wipeTable": true,
      "partitions": [
        {
          "label": "BIOS",
          "number": 1,
          "size": 4096
        },
        {
          "label": "SWAP",
          "number": 2,
          "size": "3993600"
        },
        {
          "label": "ROOT",
          "number": 3,
          "size": 0
        }
      ]
    }
  ],
  "filesystems": [
    {
      "mount": {
        "device": "/dev/sda3",
        "format": "ext4",
        "point": "/",
        "create": {
          "options": [
            "-L",
            "ROOT"
          ]
        }
      }
    },
    {
      "mount": {
        "device": "/dev/sda2",
        "format": "swap",
        "point": "none",
        "create": {
          "options": [
            "-L",
            "SWAP"
          ]
        }
      }
    }
  ]
}