0

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)

Added:

cat /etc/mtab
cat: /etc/mtab: No such file or directory

How can I solve this problem?

3
  • Check the existence and contents of /etc/mtab. Aug 30, 2013 at 22:50
  • cat /etc/mtab cat: /etc/mtab: No such file or directory
    – freento
    Aug 31, 2013 at 8:48
  • cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults 0 0
    – freento
    Aug 31, 2013 at 9:04

3 Answers 3

1

Maybe your inode table is full; check this with df -i.

1
  • df -i df: cannot read table of mounted file systems: No such file or directory
    – freento
    Aug 31, 2013 at 8:47
0

Did you format the space with a filesystem? For example if your volume is SDF and you want to use ext4:

mkfs.ext4 /dev/xvdf

Then you mount it to a directory:

mkdir /mnt
mount /dev/xvdf /mnt
  • These commands need to be executed as root
2
  • Yes, this server worked before tomorrow for several months. As you can see it has 13GB of info
    – freento
    Aug 30, 2013 at 21:10
  • You may check filesystem from mount command result. I cannot execute df -T because of error - df: cannot read table of mounted file systems: No such file or directory
    – freento
    Aug 30, 2013 at 21:17
0

Try this command first (as root or with sudo):

ln -s /proc/mounts /etc/mtab

Then repeat the df commands that have been failing.

2
  • ln: failed to create symbolic link `/etc/mtab': No space left on device
    – freento
    Aug 31, 2013 at 9:14
  • Your root filesystem is apparently the one that is full. In common AWS setups it is the only filesystem. 25GB is odd for a root filesystem. Is this your own AMI this instance is launched from? You might need to put this instance in STOP state and move its root volume to a new instance you can diagnose it from (it will be a data volume there).
    – Skaperen
    Aug 31, 2013 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .