No space left on device (28)

August 9, 2017 86 views
WordPress DigitalOcean

Hi, I tried logging into my wordpress account and I receive this error:

Warning: sessionstart(): open(/srv/users/serverpilot/tmp/creativesob/sessf3cf1cf81fcbd2e6cd29356c8555f074, O_RDWR) failed: No space left on device (28) in /srv/users/serverpilot/apps/creativesob/public/wp-content/plugins/mainwp/class/class-mainwp-system.php on line 3

Warning: session_start(): Failed to read session data: files (path: ) in /srv/users/serverpilot/apps/creativesob/public/wp-content/plugins/mainwp/class/class-mainwp-system.php on line 3

I rebooted the server and it didn't free up anything Here's the results when I run df -i

Filesystem Inodes IUsed IFree IUse% Mounted on
udev 60017 402 59615 1% /dev
tmpfs 62727 320 62407 1% /run
/dev/disk/by-label/DOROOT 1310720 1310720 0 100% /
none 62727 2 62725 1% /sys/fs/cgroup
none 62727 1 62726 1% /run/lock
none 62727 1 62726 1% /run/shm
none 62727 3 62724 1% /run/user

I'm running a couple wordpress and static sites that receive very little traffic on DO's smallest droplet. I'm also using Server Pilot as my control panel.

Any help or advice would be greatly appreciated. Thanks!!!

1 Answer

An inode is a data structure on linux that contains information about file system objects like files and directories. This usually means that if you have a large number of inodes on your server then you have a large number of files. Therefore, the easiest way to resolve this is to remove unneeded files from your server.

The easiest way to start will be to remove old update files for Ubuntu and Debian run:

apt-get clean

For Fedora and CentOS:

dnf clean all

Next, you should clear the caches of your WordPress sites. Doing both of these will get your sites back up and running as they will free up some inodes.

However, you still need to find what is creating so many files as the problem will reoccur unless you stop so many files being created. The following command:

find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

Will print out a list of directories and the number of files they contain with the largest at the bottom. With that information, you should be able to work out what is creating all the files and remove them and stop them from getting created.

Have another answer? Share your knowledge.