> For the complete documentation index, see [llms.txt](https://docs.synteq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synteq.com/virtualization-platform/other/how-to-partition-the-hdd-storage/partitioning-the-hdd-storage-on-centos-based-os.md).

# Partitioning the HDD storage on CentOS based OS

### 1. SSH into your server

Start by connecting to your server via SSH. If you've used SSH keys, please take a look at the following article: [How to SSH into your server using SSH keys](https://docs.crunchbits.com/system-administration/ssh-keys/how-to-ssh-into-your-server-using-ssh-keys)

### 2. Find the HDD disk

Next up, you'll have to find the HDD disk. You can do this by executing the following command:

```
lsblk
```

And you'll be presented with an output similar to the one below:

```
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0  368K  1 disk 
sr0     11:0    1 1024M  0 rom  
vda    252:0    0   14G  0 disk 
├─vda1 252:1    0    1M  0 part 
├─vda2 252:2    0  128M  0 part /boot/efi
└─vda3 252:3    0 13.9G  0 part /
vdb    252:16   0    2T  0 disk 
```

Within that output, looks at the capacities of the drives to determine which disk the your HDD one. In our case, it's a 2TB one, which is the `vdb` one. Please either remember this, or note this down somewhere.&#x20;

### 3. Format the drive

Next up, you'll have to format the drive to the `ext4` format with the following command:

{% hint style="info" %}
Change `vdX` to the name of the drive above
{% endhint %}

```
mkfs.ext4 /dev/vdX
```

### 4. Mount the drive

Afterward, please make a new directory, where you'll mount your disk:

```
mkdir /hdd
```

Then mount that formatted drive there:

```
mount /dev/vdX /hdd
```

Then verify that it's mounted via:

```
df -h
```

The output of that command should have a line similar to the following:

```
/dev/vdb        2.0T   28K  1.9T   1% /hdd
```

### 5. Permanently mounting the HDD drive

Start by getting the UUID of the drive from the following command:

```
blkid /dev/vdX
```

Which will output something like the following:

```
/dev/vdb: UUID="c47903e9-90f1-459a-af41-eeabaa717659" TYPE="ext4"
```

Please copy everything that is inside the quotation marks after `UUID=`.&#x20;

Then you'll need to edit fstab:

```
vi /etc/fstab
```

{% hint style="warning" %}

#### Using `vi` (vim) Editor

* To get to edit mode, press `I` on your keyboard.
* To exit edit mode, press `Esc` on your keyboard.
* You can use arrow keys to navigate.
* To save changes, first make sure you're not in the edit mode and then, press `:` on your keyboard,  then type `w` and then press `Enter` .
* To exit the editor, press `:`  on your keyboard, then type `q`  and then press `Enter` .
  {% endhint %}

And within, on a new line at the bottom add the following:

```
UUID=your-uuid-here /hdd ext4 defaults 0 2
```

And your drive now will be permanently mounted.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.synteq.com/virtualization-platform/other/how-to-partition-the-hdd-storage/partitioning-the-hdd-storage-on-centos-based-os.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
