I have an EC2 instance with 2 EBS volumes. On the root volume, I increased the volume size.

First I modified the [volume size on console](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/console-modify.html). Then followed this instruction to [extended the partition following this instruction](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html).

However, when running any command, I get No space left on device.

```
echo "Hello" > hello.txt
-bash: hello.txt: No space left on device

```

The df -h correctly shows, the total space correctly.

```
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           395M  596K  394M   1% /run
/dev/xvda1       30G   19G  9.6G  67% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/xvdg        10G  6.2G  3.9G  62% /data2
tmpfs           395M     0  395M   0% /run/user/1001

$ lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  30G  0 disk 
└─xvda1 202:1    0  30G  0 part /
xvdg    202:96   0  31G  0 disk /data2

```

The bottom of the [guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html) said,

> 
> If the increased available space on your volume remains invisible to
>  the system, try re-initializing the volume as described in
>  Initializing Amazon EBS Volumes.
> 
> 
> 

So I followed [the instruction to reinitialize the volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-initialize.html).

I used dd to reinitialize.

```
sudo dd if=/dev/xvda of=/dev/null bs=1M

30720+0 records in
30720+0 records out
32212254720 bytes (32 GB, 30 GiB) copied, 504.621 s, 63.8 MB/s

```

However, I still get "No space left on device" error. I have done multipe reboot of the instance, I still see the same error.

Update 1: I have a large number of small files 4-10KB. So, I am running out of inodes. Please let me know how to increase the inodes (on ext4 partition)? Thanks. 

```
df -i
Filesystem      Inodes   IUsed   IFree IUse% Mounted on
udev            497270     371  496899    1% /dev
tmpfs           504717     539  504178    1% /run
/dev/xvda1     1966080 1966080       0  100% /
tmpfs           504717       1  504716    1% /dev/shm
tmpfs           504717       4  504713    1% /run/lock
tmpfs           504717      18  504699    1% /sys/fs/cgroup
/dev/xvdg      5242880   39994 5202886    1% /data2
tmpfs           504717      10  504707    1% /run/user/1001

```

Please let me know how to resolve this error.