Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using gzip 1.3.12 / ubuntu 64bit I am getting "No space left on device" yet there appears to be plenty of disk space remaining.

gunzip 03-05-2012--22-52-01.tar.gz

gzip: 03-05-2012--22-52-01.tar: No space left on device

If you run the above gunzip twice in a row the first time it takes a while before showing the error, the second time it happens straight away.

On the other hand if I use tar it works to start with for a certain number of files before giving errors. After the errors I can see some of the files on disk.

tar -zxvf 03-05-2012--22-52-01.tar.gz

<snip>
tar: root/backups/project_x/03-05-2012--22-52-01/data/contentstore/2012/3/29/10/11: Cannot mkdir: No space left on device
tar: Exiting with failure status due to previous errors

Diskspace:

sudo du -sh /* | sort -gr | head -n 5
752M    /usr
424M    /var
160K    /run
78M     /lib
48K     /tmp

df -i -h
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/xvda1              640K     75K    566K   12% /
udev                    932K     381    932K    1% /dev
tmpfs                   934K     255    934K    1% /run
none                    934K       2    934K    1% /run/lock
none                    934K       1    934K    1% /run/shm
/dev/xvdb                27M      11     27M    1% /mnt

df -h --total
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            9.9G  6.3G  3.1G  68% /
udev                  3.7G  4.0K  3.7G   1% /dev
tmpfs                 1.5G  160K  1.5G   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                  3.7G     0  3.7G   0% /run/shm
/dev/xvdb             414G  199M  393G   1% /mnt
total                 432G  6.5G  405G   2%

sudo blkid
/dev/xvda1: LABEL="cloudimg-rootfs" UUID="46e0a6b7-bb53-4d56-aba0-a2a6202d9787" TYPE="ext4" 
/dev/xvdb: UUID="a7534fe5-1538-4ebc-b553-7dfc6a37df02" TYPE="ext3" 
/dev/xvdc: UUID="a7534fe5-1538-4ebc-b553-7dfc6a37df02" SEC_TYPE="ext2" TYPE="ext3" 
share|improve this question
3  
how big is the compressed file (or rather, how big is supposed to be when it's uncompressed?) –  Marcus_33 Jun 25 '12 at 12:09

2 Answers 2

"No space left on device"

This error can also indicate permission issues. Check that your are executing the command as the appropriate user. Obviously /root/ requires root permissions.

share|improve this answer

What is the question you are asking exactly?

“No space left on device”

Would indicate that you've run out of disk space. Change the current working directory to another directory mounted on a larger partition and try again ...

Also, bear in mind that du won't always match df. It is possible for files to be deleted but the handles still remain in use by an application, so df can show less disk space available than du reports.

share|improve this answer
    
I have updated the question to actually ask a question, thanks. I'm in the root users home directory, I also tried copying and unzipping from /tmp with the same error. If I reboot the machine that should close any handles? –  Kris Jun 25 '12 at 12:06
    
Yes that is likely (but restarting a server should be a last resort). You could find the application that is still holding it open using lsof - then you just need to restart/kill that application. –  MageStackDay Needs You ... Jun 25 '12 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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