Question

No space left on device - Centos 7

Posted February 9, 2020 290 views
CentOS

Trying to restart crontab service and getting no space left on device, however there are plenty of space in the server. Any help appreciated.

[root@at-app-dev-01 backup]# service crond restart
Redirecting to /bin/systemctl restart crond.service
Error: No space left on device

[root@at-app-dev-01 backup]# df -i
Filesystem       Inodes  IUsed    IFree IUse% Mounted on
devtmpfs         995120    311   994809    1% /dev
tmpfs           1001102      1  1001101    1% /dev/shm
tmpfs           1001102    423  1000679    1% /run
tmpfs           1001102     16  1001086    1% /sys/fs/cgroup
/dev/vda1      83885504 568778 83316726    1% /
tmpfs           1001102      1  1001101    1% /run/user/0
[root@at-app-dev-01 backup]# 

[root@at-app-dev-01 backup]# df -H
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.1G     0  4.1G   0% /dev
tmpfs           4.2G     0  4.2G   0% /dev/shm
tmpfs           4.2G  404M  3.7G  10% /run
tmpfs           4.2G     0  4.2G   0% /sys/fs/cgroup
/dev/vda1       172G  8.9G  163G   6% /
tmpfs           821M     0  821M   0% /run/user/0

[root@at-app-dev-01 backup]# stat /tmp
  File: '/tmp'
  Size: 93          Blocks: 0          IO Block: 4096   directory
Device: fd01h/64769d    Inode: 4194379     Links: 7
Access: (1777/drwxrwxrwt)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-02-09 21:54:09.318089350 +0530
Modify: 2020-02-09 21:54:28.879016531 +0530
Change: 2020-02-09 21:57:54.578250783 +0530
 Birth: -

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @aalurdratek,

Please try and run the following command on /

du -sh /

It might take some time to complete however I feel like there might be something not being shown by the df -h command.

Usual Causes

There are a couple of main causes here. Occasionally, a file will be deleted, but a process is still using it. Linux won’t release the storage associated with the file while the process is still running. You just need to find the process and restart it.

Try to locate the process.

sudo lsof / | grep deleted

The problematic process should be listed, then just restart it.

sudo systemctl restart service_name

If this doesn’t help, then I’ll recommend trying to reboot the droplet and see what happens.

Regards,
KDSys

Submit an Answer