# Initialize New Volume in Linux Server

***

#### **Prerequisites**

Before starting:

* You are logged in as a **root** user or a user with **sudo privileges**.
* The **external disk** has been attached to your Linux VM via the **NeevCloud console**. [Link](https://docs.neevcloud.com/neevcloud-products/volumes/attach-volume-to-instance)
* You can verify the disk under **“Attached Volumes”** in your NeevCloud panel.

***

#### **Step-by-Step Instructions**

***

**List Available Disks**

Run the following command to check all available disks:

```bash
lsblk
```

Example Output:

```
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda      252:0    0 40G  0 disk /
vdc      252:16   0 100G 0 disk
```

* Here, `vda` is your **root disk**.
* `vdc` is the **newly attached external disk** (unmounted).

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2FMvlnU2GgYXGgvdNuT9GH%2Fimage.png?alt=media&#x26;token=227ea5a9-1238-4d13-b602-edde32f8f599" alt=""><figcaption></figcaption></figure>

***

**Create a Partition on the New Disk**

Use the `fdisk` command to create a partition:

```bash
sudo fdisk /dev/vdc
```

Then inside `fdisk`:

```
n     → Create a new partition
p     → Choose primary partition
1     → Partition number 1
<Enter> → Default first sector
<Enter> → Default last sector (use full size)
w     → Write changes and exit
```

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2FSB94IDJlVxmLFmmsxSLH%2Fimage.png?alt=media&#x26;token=ae0b376f-92ec-494e-901e-fcd862b99581" alt=""><figcaption></figcaption></figure>

**Format the New Partition**

After partition creation, format it with the **ext4** filesystem:

```bash
sudo mkfs.ext4 /dev/vdc1
```

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2FiuUBUr9WZLrNuF6YnAH5%2Fimage.png?alt=media&#x26;token=f4076a5c-6859-4803-abed-dd3e87785853" alt=""><figcaption></figcaption></figure>

**Create a Mount Directory**

Create a directory where you want to mount the disk:

```bash
sudo mkdir /mnt/data
```

You can replace `/mnt/data` with any folder name (e.g., `/data`, `/backup`).

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2FUAZojxVObuLJ0cw1BCLU%2Fimage.png?alt=media&#x26;token=ae71464b-fea9-49d8-b1ed-ba7956295e8f" alt=""><figcaption></figcaption></figure>

***

**Mount the Disk**

Now mount the new partition to the folder:

```bash
sudo mount /dev/vdc1 /mnt/data
```

Check if mounted successfully:

```bash
df -h
```

You should see an entry like:

```
/dev/vdc1   99G   60M   94G   1% /mnt/data
```

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2F2Ozjt1dgGQDdJL9ICD86%2Fimage.png?alt=media&#x26;token=e9913229-03d7-40cd-acb1-ea8131ba33eb" alt=""><figcaption></figcaption></figure>

**Make Mount Persistent (After Reboot)**

Edit the `/etc/fstab` file:

```bash
sudo nano /etc/fstab
```

Add the following line at the end:

```
/dev/vdc1   /mnt/data   ext4   defaults   0   0
```

Save and exit ( Enter, Ctrl + X, then press y and enter).

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2FyLnFL1KMxUAS4CShUcqN%2Fimage.png?alt=media&#x26;token=9cf3aa0a-e8a6-4b31-ba34-63504dc52710" alt=""><figcaption></figcaption></figure>

***

**Verify Configuration**

Test your fstab entry to ensure no syntax errors:

```bash
sudo mount -a
```

If no errors appear, the mount is configured correctly and will persist across reboots.

<figure><img src="https://68979320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbG7OCFy7bphDWnjtENh1%2Fuploads%2FQLsPwcoHJdbFE5B3TDAZ%2Fimage.png?alt=media&#x26;token=d2986917-0f9f-4133-bd7d-5270716b7edb" alt=""><figcaption></figcaption></figure>

***

#### **Result**

You have successfully mounted and configured an external disk on your **NeevCloud Linux Server**.

The new storage is now available at `/mnt/data` (or your chosen directory).


---

# 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.neevcloud.com/neevcloud-products/volumes/initialize-new-volume-in-linux-server.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.
