TAR failed! cat: write error: No space left on device

11 posts / 0 new
Last post
#1 Fri, 08/14/2009 - 05:25
Jbates

TAR failed! cat: write error: No space left on device

Hi guys and first of all let me thank you for this great piece of software :)

I'm trying to backup 2 sites on 2 different servers but I always run into the same problem so I figure I'm not doing something right: this is the mail report of the backup

Copying virtual server configuration ..
.. done

Backing up Cron jobs ..
.. none defined.

Saving mail aliases ..
.. done

Saving mail and FTP users ..
.. done

Backing up mail and FTP user Cron jobs ..
.. none to backup

Copying Apache virtual host configuration ..
.. done

Copying Apache log files ..
.. done

Copying Logrotate configuration ..
.. done

Dumping MySQL database amnish ..
.. done

Backing up Webmin ACL files ..
.. done

Backing up AWstats configuration file ..
.. done

Creating backup of Mailman mailing lists ..
.. no lists found

Creating incremental TAR file of home directory ..
.. TAR failed! cat: write error: No space left on device

gzip: stdout: Broken pipe /bin/tar: -: Cannot write: Broken pipe /bin/tar: Error is not recoverable: exiting now

Backing up Virtualmin settings (Module configuration, Server templates, New mailbox email messages, Custom fields, links and shells, Scheduled Virtualmin backups) ..
.. done

Backup failed! See the progress output above for the reason why. Total backup time was 23 minutes, 41 seconds

Now, I'm pretty sure I have lots of free space on the disk (my site uses like 5gb and the disk is 250gb), I tried disabling quotas (totally) but the result is the same...any idea why this happens?

Thanks in advance and have a good day!

Fri, 08/14/2009 - 09:04
andreychek

Howdy,

By default, the tar command would be using /tmp in order to write the backups. Your tmp drive isn't by chance on a separate partition, is it?

What output do you get when typing:

df -h

That'll show available space, as well as your partition layout.

Thanks!

-Eric

Fri, 08/14/2009 - 10:45
Jbates

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 222G 11G 200G 6% /

/dev/sda3 2.0G 36M 1.9G 2% /tmp

/dev/sda1 99M 13M 82M 14% /boot

tmpfs 505M 0 505M 0% /dev/shm

By the looks of it, it seems to be on a separate partition :) Isn't it a good practice?

Fri, 08/14/2009 - 10:56
andreychek

There's a bazilion points of view on how to handle partitioning; one of those points of view suggests using different partitions to avoid any one user from filling up all the available space, as you're doing :-)

Personally, I have everything on one big partition -- and just make sure all non-system users are setup with a quota.

Beyond that, I use monitoring tools to keep track of available disk space, and I get notified when disk space availability reaches certain thresholds.

To solve your current issue though, I'd go into Webmin -> Webmin -> Webmin Configuration -> Advanced, and change what the "Temporary files directory" is set to... perhaps something like /var/tmp, but anything other than /tmp would work.

Have a good one,

-Eric

Fri, 08/14/2009 - 18:48
Jbates

Thank you so much Eric, it looks like that little change solved the problem :)

Since you seem to be very knowledgeable of webmin's inner workings, do you know where I can "nice" (set the priority) for the backup process to something low, so I can still serve web pages decently while doing a backup? :)

Fri, 08/14/2009 - 22:25
andreychek

Howdy,

In the same area that you changed the Virtualmin tmp directory, look a little lower, you'll see an option labeled "CPU Priority for Scheduled Jobs".

It defaults to 10, but you can make that whatever you like.

Have a good one!

-Eric

Sun, 08/16/2009 - 20:25
Jbates

Thanks for helping, it worked :)

Fri, 10/14/2011 - 14:48
neorf

hi, i've had this problem too... i've changed tmp directory to /var/tmp and everything is fine... but every other process, for example php, are now using /var/tmp or have i to edit other configuration file? Thanks

Fri, 10/14/2011 - 14:56 (Reply to #8)
andreychek

By changing the Webmin variable for what tmp directory to use -- that only affects the Webmin/Virtualmin processes, not all the other components running on the server.

So, it'll just be Webmin/Virtualmin pieces that use /var/tmp -- other things, such as PHP, will use whatever tmp directory they're setup to use (which may be /tmp).

-Eric

Fri, 10/14/2011 - 22:27 (Reply to #9)
neorf

Ok thanks... I've changed the tmp upload dir for Php to /var/tmp. I'd like also to change tmp for MySQL... But, is it needed? I means that it maybe was just an error for backup, and other services could works well... Is there a way to check it? Thanks

Fri, 10/14/2011 - 22:33
andreychek

It's unlikely that you'd need to change anything other than the backup -- the backup can use a rather huge amount of space. The other tools using /tmp don't require anywhere near as much space.

-Eric

Topic locked