# Disks

Disks are available to be mounted to instances. This is done by drive index with the first disk starting with index 0. When creating a disk it can be left unpartitioned, cloned from an existing disk image or initialized with a file system. By default the qcow2 disk files are stored in `/var/lib/pritunl-cloud/disks` . Refer to **Disk Pools** for information on shared storage with LVM.

### Image

This allows selecting an available image to clone to the disk. This can be used to write an operating system to the disk and boot that operating system from an instance if it is attached with the index at 0. Typically a disk and disk image will be selected when creating an instance although this option is available to handle in-place upgrades of existing instances. It can also be used to recover an existing instance by moving the instances disk to index 1 and creating a new boot disk.

### File System

Multiple file system options are available to create disks that include partitioning and a file system. All disks should be created using one of these options as this stores the partition UUID in the database. This allows the disk to be used in pod specs as persistent storage and with the UUID it can be automatically mounted by Pritunl Cloud. Disks that are manually partitioned cannot be automatically mounted by Pritunl Cloud.

### Resize Disk

Resizing a disk allows increasing the size but will not allow decreasing the size. All Linux distributions included with Pritunl Cloud are configured to have cloud-init automatically expand the root file system partition on boot. If it is a secondary mount or on FreeBSD the file system will need to be manually expanded from the system.

### Disk Backups

There is support for online and offline backups although it is recommended to only use offline backups with the instance turned off. Backups require a *Backup Storage* to be configured in the datacenter settings. Generally there are better options for system backup. This feature was primarily added as an extension to the already existing snapshot feature used for creating pod images.

### Delete Protection

Delete protection will both prevent deleting the disk and unmounting it from an instance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pritunl.com/kb/cloud/components/disks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
