[Yandex Cloud documentation](../../index.md) > [Yandex MPP Analytics for PostgreSQL](../index.md) > [Concepts](overview.md) > Yandex MPP Analytics for PostgreSQL storage > Disk types

# Disk types in Yandex MPP Analytics for PostgreSQL



Yandex MPP Analytics for PostgreSQL allows you to use network and local storage drives for database clusters. Network drives are based on network blocks, i.e., virtual drives in the Yandex Cloud infrastructure. Local disks are physically located on the cluster servers.

When creating a cluster, you can select the following disk types for data storage:

* **Network SSDs** (`network-ssd`): Compromise solution: slower than local SSDs, network SSDs ensure data integrity in the event of Yandex Cloud hardware failure.
* **Non-replicated SSDs** (`network-ssd-nonreplicated`): Network disks with higher performance achieved by eliminating redundancy.

  You can only expand this type of storage in 93 GB increments. It is available for clusters with up to four segment hosts.


* **Ultra high-speed network SSDs with three replicas** (`network-ssd-io-m3`): Network disks that deliver performance equivalent to non-replicated SSDs while ensuring redundancy.

  You can only increase the size of these disks in 93 GB increments.


* **Local SSDs** (`local-ssd`): Highest-performing disks.

  You can expand such a storage as follows:

  * For **Intel Cascade Lake**: Only in 100 GB increments.
  * For **Intel Ice Lake** and **AMD Zen 4**: Only in 368 GB increments.

  For clusters with hosts residing in the `ru-central1-d` [availability zone](../../overview/concepts/geo-scope.md), local SSD storage is not available if using Intel Cascade Lake.

[Block](https://en.wikipedia.org/wiki/Block_(data_storage)) size for all disk types is 4 KB.

{% note info %}

Up to 5% of disk space is reserved for system use, so the disks may have less available space than indicated when creating a cluster.


For more information about sizes and performance of different disk types, see [this Yandex Compute Cloud guide](../../compute/concepts/limits.md#compute-limits-disks).


{% endnote %}

Your master hosts and segment hosts may use different disk types.

{% note info %}

When using standard **Intel Ice Lake** hosts, access to local SSD storage is provided on request. Contact [support](https://center.yandex.cloud/support) or your account manager.

{% endnote %}

## Specifics of local SSD storage {#local-storage-features}

Local SSDs do not provide fault-tolerant storage and impact the cost of the entire cluster: you are charged for a cluster with this type of storage even if it is stopped. You can find more information in the [pricing policy](../pricing/index.md).


## Managing disk space {#manage-storage-space}

When the storage of any host is more than 95% full, Yandex MPP Analytics for PostgreSQL switches the cluster to `read-only` mode. All DBs get the `DEFAULT_TRANSACTION_READ_ONLY = TRUE` setting through the `ALTER DATABASE` query.

In this mode, the `INSERT`, `DELETE`, or `UPDATE` queries result in an error.


### Monitoring the transition to read-only mode {#read-only-monitor}

To monitor storage usage on cluster hosts, configure alerts in Yandex Monitoring:

1. Navigate to the folder dashboard and select **Monitoring**.
1. Select **Yandex MPP Analytics for PostgreSQL**.
1. [Create a notification channel](../../monitoring/operations/alert/create-channel.md).
1. [Create an alert](../../monitoring/operations/alert/create-alert.md) with the following settings:

    1. **Metric**: Configure the following metric settings:

        * Cloud
        * Folder
        * **Yandex MPP Analytics for PostgreSQL** service
        * Yandex MPP Analytics for PostgreSQL cluster ID

            You can get the cluster ID from the [folder’s cluster list](../operations/cluster-list.md#list-clusters).

        * `disk.free` label

    1. **Condition**: Define the `Less than or equals` condition for disk usage percentage that will trigger the alert:

        * 95% of the storage size for `Alarm`
        * 90% of the storage size for `Warning`

    1. **Advanced settings**:

        * **Aggregation function**: `Minimum` (metric’s minimum value over the period).
        * **Evaluation window**: Preferred metric update period.

    1. Add the notification channel you created earlier.


### Recovering a cluster from read-only mode {#read-only-solutions}

If the cluster switched to read-only mode:

* [Increase the storage capacity](../operations/update.md#change-disk-size) to exceed the threshold value. Yandex Cloud will then disable read-only mode automatically.

* Disable read-only mode manually and free up storage space by deleting some data.

    {% note alert %}

    When doing so, make sure the amount of free disk space never reaches zero. The fail-safe mechanism being disabled, this will cause Yandex MPP Analytics for PostgreSQL to crash and render the cluster inoperable.

    {% endnote %}

To disable read-only mode manually, contact [support](https://center.yandex.cloud/support) or follow the steps below:

1. [Connect to the database](../operations/connect/index.md) using any method of your choice.

1. Start a transaction and run the following statement within it:

   ```sql
   SET LOCAL transaction_read_only TO off;
   ```

1. In the same transaction, clean up the data you no longer need using the `DROP` or `TRUNCATE` statements. Avoid the `DELETE` statement because it marks rows as deleted without physically purging them from the database.

1. Commit the transaction and restart all database connections.

> For example, to remove the `ExcessDataTable1` table you no longer need, use the following transaction:
>
> ```sql
> BEGIN;
> SET LOCAL transaction_read_only TO off;
> DROP TABLE ExcessDataTable1;
> COMMIT;
> ```

## Use cases {#examples}

* [Loading data from Yandex Object Storage to Yandex MPP Analytics for PostgreSQL using Yandex Data Transfer](../tutorials/object-storage-to-greenplum.md)
* [Exporting Greenplum® data to a cold storage in Yandex Object Storage](../tutorials/yezzey.md)

_Greenplum® and Greenplum Database® are registered trademarks or trademarks of Broadcom Inc. in the United States and/or other countries._