How to Resize EBS Volumes on AWS
Extend EBS volume size after that increase mount point size at OS level
[ec2-user@ip-172-31-22-126 ~]$ sudo su -
Last login: Sat Apr 4 19:47:38 UTC 2020 on pts/1
[root@ip-172-31-22-126 ~]#
[root@ip-172-31-22-126 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 640M 1.4G 32% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/xvda2 30G 29G 1.3G 96% /
tmpfs 379M 0 379M 0% /run/user/1000
[root@ip-172-31-22-126 ~]#
[root@ip-172-31-22-126 ~]# sudo growpart /dev/xvda 2
CHANGED: partition=2 start=4096 old: size=62910430 end=62914526 new: size=167768030 end=167772126
[root@ip-172-31-22-126 ~]#
[root@ip-172-31-22-126 ~]# xfs_growfs -d /
meta-data=/dev/xvda2 isize=512 agcount=20, agsize=393216 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=7863803, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 7863803 to 20971003
[root@ip-172-31-22-126 ~]#
[root@ip-172-31-22-126 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 640M 1.4G 32% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/xvda2 80G 29G 52G 36% /
tmpfs 379M 0 379M 0% /run/user/1000
[root@ip-172-31-22-126 ~]#
No comments:
Post a Comment