---
title: How to configure custom disk partitioning on Scaleway Elastic Metal servers
description: Learn how to configure custom disk partitions on Scaleway Elastic Metal servers
tags: attach detach flexible-ip elastic-metal
dates:
  validation: 2026-07-31
  posted: 2024-10-01
---
import Requirements from '@macros/iam/requirements.mdx'


Scaleway Elastic Metal servers come with a default partition layout designed for most users, optimizing installation speed and ease of use.
However, if you have specific requirements, you can define a custom partition layout. Partitioning can be configured using either a simplified visual interface or an advanced JSON configuration during server installation.

<Message type="tip">
    You can change the partitioning of your server only during installation or reinstallation.
    Be aware that all data will be deleted if you reinstall your server.
</Message>


<Requirements />
- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/)
- An [Elastic Metal server](/elastic-metal/quickstart/#how-to-create-an-elastic-metal-server) compatible with custom partitioning

<Message type="important">
  Custom partitioning of an Elastic Metal server is only possible if:
  - The server configuration includes faster installation and custom partitioning.
  - It is done during the first installation or a reinstallation.
  - Once installed, partitioning cannot be changed without a reinstallation.
</Message>

## Offers supporting custom disk partitioning

Below is a comparison of Elastic Metal server offers and their compatibility with custom disk partitioning across specific datacenters.

<Accordion>
  <h2 id="offers-compatibility">
    <span>
    Offers compatibility
    </span>
  </h2>
  <div className="table-container">
    | Offer                   | Global             | PAR-1       | PAR-2       | AMS-1       | AMS-2       | WAW-2       | WAW-3       |
    |-------------------------|--------------------|-------------|-------------|-------------|-------------|-------------|-------------|
    | A110X / A111X / A115X / A116X | Partly available | Available   | Unavailable | Unavailable | Available   | Available   | Available   |
    | A210R / A215R           | Available          | N/A         | Available   | Available   | N/A         | N/A         | N/A         |
    | A315X                   | Partly available   | Unavailable | Unavailable | Unavailable | N/A         | Available   | Available   |
    | A410X                   | Partly available   | Unavailable | Unavailable | Unavailable | N/A         | Available   | N/A         |
    | A510X                   | Unavailable        | N/A         | Unavailable | N/A         | N/A         | N/A         | N/A         |
    | A610R                   | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | B111X                   | Unavailable        | Unavailable | Unavailable | N/A         | N/A         | N/A         | N/A         |
    | B112X                   | Unavailable        | Unavailable | Unavailable | Unavailable | N/A         | N/A         | N/A         |
    | B211X                   | Unavailable        | N/A         | Unavailable | N/A         | N/A         | N/A         | N/A         |
    | B212X                   | Unavailable        | Unavailable | Unavailable | Unavailable | N/A         | N/A         | N/A         |
    | B220E                   | Available          | Available   | Available   | N/A         | N/A         | Available   | Available   |
    | B311X                   | Unavailable        | N/A         | Unavailable | N/A         | N/A         | N/A         | N/A         |
    | B312X                   | Unavailable        | N/A         | Unavailable | N/A         | N/A         | N/A         | N/A         |
    | B320E                   | Available          | Available   | Available   | N/A         | N/A         | Available   | Available   |
    | B420E                   | Available          | Available   | Available   | N/A         | N/A         | Available   | Available   |
    | B520E                   | Available          | Available   | Available   | N/A         | N/A         | Available   | Available   |
    | I210E                   | Unavailable        | Unavailable | Unavailable | N/A         | N/A         | N/A         | N/A         |
    | I215E                   | Available          | Available   | Available   | N/A         | N/A         | N/A         | N/A         |
    | I120E                   | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | I220E / I226E           | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | I320E                   | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | I420E                   | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | I520E                   | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | I620E                   | Available          | Available   | Available   | Available   | Available   | Available   | Available   |
    | L101X                   | Partly available   | Unavailable | Unavailable | Unavailable | N/A         | Available   | Available   |
    | L105X                   | Partly available   | Unavailable | Unavailable | Unavailable | N/A         | Available   | Available   |
    | L110X                   | Partly available   | Unavailable | Unavailable | Unavailable | N/A         | N/A         | Available   |
    | L220E                   | Available          | Available   | Available   | N/A         | N/A         | N/A         | N/A         |
    | L420E                   | Available          | Available   | Available   | N/A         | N/A         | N/A         | N/A         |
    | T220E                   | Available          | N/A         | Available   | N/A         | N/A         | N/A         | N/A         |
    | T620E                   | Available          | N/A         | Available   | N/A         | N/A         | N/A         | N/A         |

    *N/A*: This offer is not available in the specified datacenter.  
    *Partly available*: Custom disk partitioning is supported only in select datacenters for this offer.
    <Message type="note">
      Scaleway is currently working on enabling custom partitioning in more datacenters. Check this page regularly for updates to the table.
    </Message>
  </div>
</Accordion>

## Simplified partitioning (visual interface)

<Message type="note">
    Simplified partitioning is temporarily unavailable. Use [advanced JSON partitioning](#advanced-json-partitioning) while maintenance is underway.
</Message>

During [server installation](/elastic-metal/how-to/install-server/), navigate to step 5 of the creation wizard and click **Custom Configuration** > **Simplified Partitioning**.

- Enable or disable partitions for SWAP and the secondary `/data` partition by selecting or deselecting checkboxes.
- Define the mount point for the secondary `/data` partition as needed.

This method is ideal for users who prefer a simplified setup without manually specifying partition details.

## Advanced JSON partitioning

For users requiring granular control, Scaleway offers an advanced partitioning method using JSON.

1. During [server installation](/elastic-metal/how-to/install-server/), navigate to step 5 and click **Custom Configuration** > **Advanced JSON**.
2. Edit the partition schema directly in the browser-based editor.
3. Use JSON to define disk partitions, RAID arrays, and file systems.

<Message type="important">
    - Disk Type Naming: HDD/SSD devices use `/dev/sdXXX`, while NVMe devices use `/dev/nvmeXXX`.
    - UEFI Partition: The EFI partition should only exist if the server uses UEFI. Omit this partition if UEFI is not used.
    - ZFS and LVM: ZFS is optional, but LVM should not be used due to functionality issues.
</Message>

### Example JSON configuration

<Message type="tip">
    Refer to the [Elastic Metal API documentation](https://www.scaleway.com/en/developers/api/elastic-metal/#path-partitioning-schemas-get-default-partitioning-schema) for valid file system types, RAID configurations, and partitioning parameters.
</Message>

```json
{
    "partitioning_schema": {
        "disks": [
            {
                "device": "/dev/nvme0n1",
                "partitions": [
                    {
                        "label": "uefi",
                        "number": 1,
                        "size": 536870912
                    },
                    {
                        "label": "swap",
                        "number": 2,
                        "size": 4294967296
                    },
                    {
                        "label": "boot",
                        "number": 3,
                        "size": 536870912
                    },
                    {
                        "label": "root",
                        "number": 4,
                        "size": 64424509440
                    },
                    {
                        "label": "data",
                        "number": 5,
                        "size": 1850588790784
                    }
                ]
            },
            {
                "device": "/dev/nvme1n1",
                "partitions": [
                    {
                        "label": "swap",
                        "number": 1,
                        "size": 4294967296
                    },
                    {
                        "label": "boot",
                        "number": 2,
                        "size": 536870912
                    },
                    {
                        "label": "root",
                        "number": 3,
                        "size": 64424509440
                    },
                    {
                        "label": "data",
                        "number": 4,
                        "size": 1850588790784
                    }
                ]
            }
        ],
        "raids": [
            {
                "name": "/dev/md0",
                "level": "raid_level_1",
                "devices": [
                    "/dev/nvme0n1p3",
                    "/dev/nvme1n1p2"
                ]
            },
            {
                "name": "/dev/md1",
                "level": "raid_level_1",
                "devices": [
                    "/dev/nvme0n1p4",
                    "/dev/nvme1n1p3"
                ]
            }
        ],
        "filesystems": [
            {
                "device": "/dev/nvme0n1p1",
                "format": "fat32",
                "mountpoint": "/boot/efi"
            },
            {
                "device": "/dev/md0",
                "format": "ext4",
                "mountpoint": "/boot"
            },
            {
                "device": "/dev/md1",
                "format": "ext4",
                "mountpoint": "/"
            }
        ],
        "lvm": null,
        "zfs": {
            "pools": [
                {
                    "name": "zpve",
                    "type": "mirror",
                    "devices": [
                        "/dev/nvme0n1p5",
                        "/dev/nvme1n1p4"
                    ],
                    "options": [
                        "ashift=12"
                    ],
                    "filesystem_options": []
                }
            ]
        }
    }
}
```

## Explanation of key sections

- Disks:
    - Each disk is specified with its device path (e.g., `/dev/nvme0n1` or `/dev/nvme1n1`).
    - Partitions are defined with labels. The default value is `unknown_partition_label`, and possible values are: `uefi`, `legacy`, `root`, `boot`, `swap`, `data`, `home`, `raid`. Refer to the [API documentation](https://www.scaleway.com/en/developers/api/elastic-metal/#path-servers-install-an-elastic-metal-server) for full details.
    - Each partition has a `number` and `size` in bytes.

- RAID (Optional):
    - If RAID is required, declare the disks and the desired RAID level. In this example, we are configuring two RAID-1 arrays, one for the boot partition and one for the root partition.
    - Devices participating in each RAID array are specified by their partition paths (e.g., `/dev/nvme0n1p3` for partition 3 of the first NVMe disk).

- File systems:
    - Each partition is assigned a file system type and a mount point.
    - For example, the `/boot/efi` partition is formatted with `fat32`, while `/boot` and `/` are formatted with `ext4`.

- ZFS (Optional):
    - ZFS can be configured if wished. In this example, a ZFS mirror is created using partitions from two NVMe devices.
    - ZFS options such as `ashift=12` can be included for performance tuning, but they are optional.

### Simple configuration (No RAID or ZFS)

If you prefer a simpler configuration without RAID or ZFS, you can remove the `raids` and `zfs` sections. For example, if you only need a single disk setup with Unavailable RAID, declare just one disk with the partitions and file systems as shown below:

```json
{
    "partitioning_schema": {
        "disks": [
            {
                "device": "/dev/nvme0n1",
                "partitions": [
                    {
                        "label": "swap",
                        "number": 1,
                        "size": 4294967296
                    },
                    {
                        "label": "boot",
                        "number": 2,
                        "size": 536870912
                    },
                    {
                        "label": "root",
                        "number": 3,
                        "size": 64424509440
                    }
                ]
            }
        ],
        "filesystems": [
            {
                "device": "/dev/nvme0n1p2",
                "format": "ext4",
                "mountpoint": "/boot"
            },
            {
                "device": "/dev/nvme0n1p3",
                "format": "ext4",
                "mountpoint": "/"
            }
        ],
        "raids": [],
        "zfs": null,
        "lvm": null
    }
}
```
