NavigationContentFooter
Jump toSuggest an edit
Was this page helpful?

How to configure custom disk partitioning on Scaleway Elastic Metal servers

Reviewed on 25 March 2025Published on 01 October 2024

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.

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.

Before you startLink to this anchor

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An SSH key
  • An Elastic Metal server

Simplified partitioning (visual interface)Link to this anchor

During server installation, 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 partitioningLink to this anchor

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

  1. During server installation, 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.
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.

Example JSON configurationLink to this anchor

Tip

Refer to the Elastic Metal API documentation for valid file system types, RAID configurations, and partitioning parameters.

{
"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:Link to this anchor

  • 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 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)Link to this anchor

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 no RAID, declare just one disk with the partitions and file systems as shown below:

{
"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
}
}
See also
How to adjust the available bandwidthHow to order a flexible IP
Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2025 – Scaleway