4

I have 25GB volume on EC2. OS is Ubuntu 12.04 LTS. I can connect to it, but cannot even write 1KB. I tried to delete some files and write again - the same result - not enough space.

I tried to check free space and got this error.

df -h
df: cannot read table of mounted file systems: No such file or directory

Then I tried to get directory sizes. It seems that only 13GB from 25GB is full:

du -h --max-depth=1
18M     ./boot
16K     ./lost+found
4.0K    ./tmp
83M     ./lib
192K    ./home
8.7M    ./bin
4.0K    ./selinux
4.0K    ./opt
100K    ./root
8.0K    ./dev
du: cannot access `./proc/1312/task/1312/fd/4': No such file or directory
du: cannot access `./proc/1312/task/1312/fdinfo/4': No such file or directory
du: cannot access `./proc/1312/fd/4': No such file or directory
du: cannot access `./proc/1312/fdinfo/4': No such file or directory
0       ./proc
7.9M    ./sbin
434M    ./usr
172K    ./run
13G     ./var
0       ./sys
4.0K    ./srv
4.0K    ./mnt
4.0K    ./lib64
4.0K    ./media
5.8M    ./etc
13G     .

Mounts

mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=1912272k,nr_inodes=478068,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=768100k,mode=755)
/dev/disk/by-label/cloudimg-rootfs on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /sys/kernel/debug type debugfs (rw,relatime)
none on /sys/kernel/security type securityfs (rw,relatime)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)

How can I solve this problem?

2

It looks like you have edited /etc/fstab manually or you have mounted/unmounted a device which didn't reflect in /etc/fstab and it doesn't resemble /proc/mounts entries.

Do a grep -v rootfs /proc/mounts to see the difference. Update the /etc/fstab accordingly and try the mount or df -h command.

If that didn't do the trick then try grep -v rootfs /proc/mounts > /etc/mtab.

If you still get a disk space issue then you may need to reboot.

  • grep -v rootfs /proc/mounts > /etc/mtab for me and df: cannot read table of mounted file systems: No such file or directory issue resolved also tried to reboot no issue till now. – Ramesh Chand Sep 7 '16 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.