问题
I created EMR on AWS and ssh to a name node.
Noticed there was a space issue and increased volume in AWS console from 200GB -> 500GB.
Then rebooted instance and it is showing that there is no change:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 197G 187G 3.1M 100% /
tmpfs 32G 0 32G 0% /dev/shm
cm_processes 32G 0 32G 0% /var/run/cloudera-scm-agent/process
Tried to check partitions and this is what is showing:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 500G 0 disk
└─xvda1 202:1 0 200G 0 part /
Then did resize2fs but is showning nothing to do:
sudo resize2fs /dev/xvda1
resize2fs 1.41.12 (17-May-2010)
The filesystem is already 52428544 blocks long. Nothing to do!
Size did not change.
What should I do next?
Thanks.
回答1:
Snapshot all ebs volumes you care about before doing any resize operations on them.
Install growpart
sudo yum install cloud-utils-growpartResize partion
growpart /dev/xdva 1Reboot
reboot nowRun
lsblkand verify that the partition is now the full disk sizeYou may still have to run
sudo resize2fs /dev/xvda1to expand the filesystem
来源:https://stackoverflow.com/questions/50836533/how-to-resize-volume-on-ec2-centos