R
R
ruboss2015-07-12 11:15:29
Amazon Web Services
ruboss, 2015-07-12 11:15:29

Amazon EC2, Ubuntu - No space left on device. 9.6 GB free, how to change disk size?

Good day. I apologize in advance for a possibly noob question. Dug in Google, found nothing.
There was a disk space issue on Amazon EC2 t2.micro. There is an Elastic Block Store for 25GB, after some file manipulations we get the following error: "cannot create temp file for here-document: No space left on device
" and the like - all related to lack of memory.
We check:

/# df -h
Filesystem      Size  Used Avail  Use% Mounted on
/dev/xvda1     25G    14G  9.6G   60% /
none         4.0K    0     4.0K    0% /sys/fs/cgroup
udev         492M  12K  492M  1% /dev
tmpfs         100M  336K 99M   1% /run
none         5.0M    0      5.0M   0% /run/lock
none          497M   0     497M   0% /run/shm
none          100M   0     100M   0% /run/user

As you can see, there are no problems. Next we look:
df -i
Filesystem      Inodes     IUsed  IFree IUse% Mounted on
/dev/xvda1     1638400  1638400      0  100% /
none           127042    2 127040    1% /sys/fs/cgroup
udev           125746     403 125343    1% /dev
tmpfs          127042     315 126727    1% /run
none           127042     3 127039    1% /run/lock
none           127042     1 127041    1% /run/shm
none           127042       2 127040    1% /run/user

Aha! Here is the familiar word Inodes and here is such a thing - 1638400.
How can I transfer all 25 GB to these 1638400? Who knows, please advise.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2015-07-12
@ruboss

you have too many small files or folders
in ext itself, if there is a limit on their number
, well, you completely scored it,
you can simply clean the extra file
, and the second way is to connect a new disk to the server and create a file there with a large supply of inodes and transfer all this terrible file on a new disk
and inodes they are not in gigabytes they are in pieces, one inode per file or folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question