# 3. Mở rộng dung lượng đĩa cho các node trong Kubernetes Cluster trên HI GIO Portal

## <mark style="color:green;">**Tổng quan**</mark> <a href="#overview" id="overview"></a>

* Hướng dẫn từng bước để tăng dung lượng đĩa của mỗi node trong cluster nhằm đáp ứng nhu cầu lưu trữ ngày càng tăng.
* Không cần downtime.

## <mark style="color:green;">Quy trình</mark> <a href="#id-2.-guidance" id="id-2.-guidance"></a>

* Đảm bảo oVDC có đủ dung lượng lưu trữ khả dụng.
* Đảm bảo bạn có quyền truy cập vào node (ssh, node-shell…).

{% stepper %}
{% step %}
**Bước 1:** Đăng nhập vào HI GIO portal > **Virtual Machines** > Chọn node bạn muốn mở rộng dung lượng đĩa > **Hard Disks** > **EDIT**

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/XIWMGL5rIINNZOZqqo4d/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bước 2:** Nhập dung lượng đĩa mới > **SAVE**

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/2KqQwbQoF3XLSX94EIC9/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bước 3:** SSH vào node và thực hiện các lệnh dưới đây để mở rộng dung lượng đĩa trên hệ điều hành.

* Kiểm tra điểm mount của root:

```
df -h
```

Ví dụ `/dev/sda4`

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/Ur9SUTJq56exspzwZjcM/image.png" alt=""><figcaption></figcaption></figure>

* Chạy các lệnh dưới đây để mở rộng dung lượng cho **/dev/sda4**:

```
echo 1 > /sys/block/sda/device/rescan 
growpart /dev/sda 4 
resize2fs /dev/sda4
```

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/CqKjO7Xq7meJU4ZfjkYV/image.png" alt=""><figcaption></figcaption></figure>

* Chạy lệnh để xác minh dung lượng đĩa sau khi mở rộng:

<pre><code><strong>fdisk -l
</strong></code></pre>

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/OeOEAISq9uEadtRZezVB/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
