1

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.

Joe
  • 11,983
  • 31
  • 109
  • 183
  • Whats the console say, is it done resizing the volume? – Brandon Miller Jun 13 '18 at 11:55
  • Yes, console says 500GB. – Joe Jun 13 '18 at 12:15
  • your lsblk output says your disk is 500G but your partition is 200G. You could either expand your xvda1 partition (which is a risky operation on a live primary filesystem) or create a second partition and mount it in the location you need. – RaGe Jun 13 '18 at 13:38
  • @RaGe - do you have exact procedure step-by-step for these operations? Thanks. – Joe Jun 13 '18 at 13:45

1 Answers1

2
  1. Snapshot all ebs volumes you care about before doing any resize operations on them.

  2. Install growpart sudo yum install cloud-utils-growpart

  3. Resize partiongrowpart /dev/xdva 1

  4. Reboot reboot now

  5. Run lsblk and verify that the partition is now the full disk size

  6. You may still have to run sudo resize2fs /dev/xvda1 to expand the filesystem

RaGe
  • 22,696
  • 11
  • 72
  • 104