[Resolved] Amazon EC2 Redhat 7 using 6GB for the root space

I create new server with 10GB of HDD, but when i check on the command line, the root space only show 6GB. I'm using t2.micto and Redhat 7.0, disk type: XFS.


- xvda1: boot partition
- xvda2: root partition

Fix Step:
We have instance A with the volume VA.

1) Stop the current instace A
2) Snapshot the current volume VA of the instance A
3) Start the instance A
4) Create new volume with 25GB by using the snapshot of volume VA then we have new volume VB
5) Attach the new volume VB to the instance A as default (/dev/sdf)
6) From the ssh console, i use the lsblk command to list the disk.
# lsblk
7) Using the xfs_repair to repair the /dev/xvdf2
( yum install xfsprogs)
# xfs_repair /dev/xvdf2


8) Continue as the image below


9) Remove the /dev/xvdf2, remember the start of this disk then we will create the new one with the same.


10) Using XFS command to repair the /dev/xvdf2 again.
# xfs_repair /dev/xvdf2
11) Use the lsblk command to test the disk space again.
12) Stop the instance A again
13) Deattach the volume VA from the instace A
14) Attach the volume VB to the instance A (/dev/sda1)
15) Start the instance then using the command to check the root space.
# df -lTh
# lsblk

Nhận xét

  1. Nice blog! Thanks for sharing your information. This blog is very useful to the users AWS Online Training

    Trả lờiXóa

Đăng nhận xét

Bài đăng phổ biến từ blog này

CLEANING UP THE ZABBIX DATABASE

Configuring DHCP Relay service on the FortiGate unit