• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device

February 25, 2014 by Sharad Chhetri 2 Comments

Today,while working in cloud server.I faced an issue.I was copying some files to s3bucket,which I have mounted by using s3fs package. One every copy command(i.e cp),I was getting error – fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device.

The problem was not new for me.I have seen this problem earlier also.The problem occur when any service/program uses the /tmp file.And the /tmp is not writable.

Reason for this fatal error
(1) The Disk space of /tmp partition might be full
(2) /tmp got a new mounted partition, which was not actually earlier. Means,/tmp itself get its partition.

Solution : For this problem ,follow the given below troubleshooting steps

Step 1: First run the df -h command. The command will show,disk space to mounted partition.
In case /tmp is full (100%). Remove the files/directory from /tmp .


rm -fr /tmp/*

After this, check again. If still issue persist go for Step 2 as given below

Step 2: Sometimes the server do very unusual behavior. Because of continuous file writing in /tmp and because of some other partition issue/ memory issue.
The /tmp will mount to spool partition overflow.

See the below given detail from my server

root@server:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda         20G   13G  6.5G  66% /
udev            494M  4.0K  494M   1% /dev
tmpfs           200M  212K  199M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            498M     0  498M   0% /run/shm
overflow        1.0M     0  1.0M   0% /tmp
root@server:~#

Here,I found that /tmp is mounted to spool partition overflow .
In this case,simply unmount the /tmp .

Use given below two command :

umount /tmp

mount -a

Now run again df -h command.To check,all mounted partition are correctly matched . Now the problem should be solved.

NOTE:

In case,even after removing file and directory from /tmp . Your partition is still showing full disk space.
Run lsof command and get the DELETED item PID no. and kill it.

lsof | grep deleted|grep tmp|while read abc;do kill -9 $abc;done

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
  2. df command not showing correct free space in linux
  3. How to read logs which are writing continuously : LINUX/UNIX
  4. Convert new line to space by using sed command
  5. error: The requested URL returned error: 403 Forbidden while accessing Github repo
  6. dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu
  7. Linux enable or disable multiple swap space
  8. How to know how many swap space exist in linux system
  9. convert space into new line using sed command
  10. vi : remove space at beginning and end of each line

Filed Under: Linux, Tips And Tricks Tagged With: troubleshooting

Reader Interactions

Comments

  1. EhsanKia says

    June 8, 2016 at 8:56 am

    Thank you for this post. I had this exact issue today, and every other post talked about iNodes, this is the right answer though, not sure what could’ve caused this wrong mounting, but that was it.

    Reply
    • sharad chhetri says

      June 8, 2016 at 4:45 pm

      Thank you for providing feedback. It really helps other to try this method too.

      Best Regards
      Sharad

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to hide php version information in header

How to install korn shell ksh in Linux

df command not showing correct free space in linux

safest method to remove softlink in linux

Convert hyphen to underscore in between all filenames shell script

How to see line numbers in file through cat command

sed: -e expression #1, char 24: Invalid range end

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy