> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/elastic-compute/local-disk.md).

# Local Disk

{% hint style="warning" %}
Local disks offer no data durability guarantee. Data cannot be recovered after a hardware failure.
{% endhint %}

## Overview

A Local NVMe SSD (local disk) is an NVMe SSD attached directly to the physical server that hosts your instance and used exclusively by that instance. It is designed for workloads that need high storage IOPS, high throughput, and low latency, and that provide their own data redundancy at the application layer.

Compared with cloud disks (Basic NVMe SSD / Standard NVMe SSD), local disks trade data reliability for higher performance:

| Item                       | Local NVMe SSD                                        | Cloud Disk                           |
| -------------------------- | ----------------------------------------------------- | ------------------------------------ |
| Physical location          | Local to the host of the instance                     | Distributed storage cluster          |
| Data redundancy            | None (single disk, no RAID)                           | Multiple replicas                    |
| Data after a disk failure  | Permanently lost, unrecoverable                       | Not affected                         |
| Snapshot / backup          | Not supported                                         | Supported                            |
| Attach / detach separately | Not supported; created and released with the instance | Supported                            |
| Performance                | High IOPS, high throughput, microsecond-level latency | Affected by the network storage path |

## Features

* **High performance**: Each local disk is dedicated to its instance, and I/O does not traverse the network storage path. Suitable for highly concurrent random reads/writes and high-throughput sequential reads/writes.
* **Low latency**: Microsecond-level access latency with stable performance, unaffected by other tenants' storage traffic.
* **Provided with the instance**: The number and capacity of local disks are determined by the instance type. Local disks are created and released together with the instance.
* **Delivered as single disks**: Each local disk is presented to the instance as a separate block device. Partitioning, file systems, and whether to build software RAID are up to you.

## Use Cases

| Type         | Scenario                                                                                                                                    |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Suitable     | Distributed systems with application-layer replication: Kafka, Elasticsearch, Cassandra, ClickHouse, HDFS, TiKV, MongoDB replica sets, etc. |
| Suitable     | Caches, temporary compute data, and rebuildable intermediate results (such as big data shuffle and build caches)                            |
| Suitable     | Dataset caches for AI training/inference (with the source data persisted elsewhere)                                                         |
| Not suitable | Single-instance databases, or primary databases without replicas                                                                            |
| Not suitable | The only copy of business data, user-uploaded files, or archived data                                                                       |
| Not suitable | Any data that cannot be rebuilt once lost                                                                                                   |

## Data Reliability and Limitations

The data reliability of a Local NVMe SSD depends on that of a single physical disk, which is a single point of failure. The following table shows how each event affects data on local disks:

| Event                                                             | Local disk data                                                                                           |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Reboot from within the instance / from the console                | Retained                                                                                                  |
| Stop and then start                                               | Retained                                                                                                  |
| Failure of a single local disk                                    | Data on that disk is permanently lost                                                                     |
| Host failure (disk not damaged)                                   | Usually retained and accessible again after repair, but neither retention nor recovery time is guaranteed |
| Instance reinstallation                                           | Retained                                                                                                  |
| Instance type change                                              | Retained                                                                                                  |
| Instance release, or reclamation after expiration/overdue payment | Lost; the physical disk is reclaimed and wiped                                                            |

Limitations:

* Snapshots, image backups, and cloning are not supported.
* Local disks cannot be attached, detached, or resized separately, and cannot be moved to another instance.
* The data durability commitment for cloud disks does not apply.

## Recommendations

You are responsible for the redundancy, backup, and disaster recovery of data on local disks. We recommend that you:

* Keep multiple replicas at the application layer and spread them across different instances, so that a single disk or host failure does not lose or take down all replicas at once.
* For redundancy within a single instance, build software RAID 1/10 across multiple local disks yourself. This reduces usable capacity and does not prevent service interruptions caused by host failures.
* Back up important data regularly to cloud disks or object storage.
* On Linux instances, mount local disks by UUID in `/etc/fstab` and add the `nofail` option, so that a single disk failure does not prevent the instance from booting.
* If a local disk behaves abnormally (such as I/O errors or a missing disk), contact our support team promptly.
