amazon linux extend partition
Last updated
Was this helpful?
Last updated
Was this helpful?
Ở đây mình có ổ xvda mới thêm vào nhưng ổ xvda3 không tăng size Dẫn đến phải tăng partition 3 lên và mình gõ cách lệnh dưới: chi tiết đọc doc của amazon
[root@ip-172-31-2-225 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 55G 0 disk
├─xvda1 202:1 0 1M 0 part
├─xvda2 202:2 0 500M 0 part /boot
└─xvda3 202:3 0 9.5G 0 part /
[root@ip-172-31-2-225 ~]# sudo growpart /dev/xvda 3
no tools available to resize disk with 'gpt'
FAILED: failed to get a resizer for id ''
[root@ip-172-31-2-225 ~]# ^C
[root@ip-172-31-2-225 ~]# yum -y install gdisk
Loaded plugins: fastestmirror, priorities, product-id, search-disabled-repos, subscription-manager, versionlock
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: d36uatko69830t.cloudfront.net
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: d36uatko69830t.cloudfront.net
* remi-php74: mirror.telkomuniversity.ac.id
* remi-safe: mirror.telkomuniversity.ac.id
* updates: d36uatko69830t.cloudfront.net
106 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package gdisk.x86_64 0:0.8.10-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================
Installing:
gdisk x86_64 0.8.10-3.el7 anchor-centos 190 k
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total download size: 190 k
Installed size: 660 k
Downloading packages:
gdisk-0.8.10-3.el7.x86_64.rpm | 190 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : gdisk-0.8.10-3.el7.x86_64 1/1
Verifying : gdisk-0.8.10-3.el7.x86_64 1/1
2021-05-15 00:28:06,575 [WARNING] yum:1786:MainThread @logutil.py:142 - logging already initialized
Installed:
gdisk.x86_64 0:0.8.10-3.el7
Complete!
[root@ip-172-31-2-225 ~]# sudo growpart /dev/xvda 3
CHANGED: partition=3 start=1028096 old: size=19941376 end=20969472 new: size=114315230 end=115343326
[root@ip-172-31-2-225 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 55G 0 disk
├─xvda1 202:1 0 1M 0 part
├─xvda2 202:2 0 500M 0 part /boot
└─xvda3 202:3 0 54.5G 0 part /