Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to update opensuse from version 11.4 to 12.1. The required download size is more than 1.0 GB, but my filesystem /var is precisely 1.0 GB, that's why zypper stops while downloading .rpm packages because of lack of space in /var.

What solutions are there to this problem?

share|improve this question

Increase the space in /var by re-sizing things.

Figure out where the download is going to /var/tmp,/var/cache/, or somewhere else. Mount-bind or symlink it over to somewhere else with enough space while you do the upgrade (you may have to copy some files over.

If you had lots of space in /srv and no space in /var, and the downloads go to /var/cache, then you might do something like this.

lsof -n | grep '/var/cache'
# stop anything using that folder
rsync -va /var/cache /srv/tmp_var_cache/
mount -o bind /srv/tmp_var_cache /var/cache/
# restart anything you stopped.
share|improve this answer
Thanks a lot for the answer! Downloading (.rpm packages) is going to /var/cache. I made rsync and mount, but /srv/tmp_var_cache has the same size as /var (1.0 GB) :) i.e. we got two input points for /var. And I tried updating, but got the same problem again( – user1088224 Dec 22 '11 at 14:04

I'm sorry, while the idea is sound (use space in /srv instead of in /var), the suggested solution is majorly wrong.

mount  --bind 

makes a directory alternatively available in a new place. It's effectively a hard link for a directory (that also doesn't need to stay in the same filesystem, as hard links have to do). You still don't get any more space in either /var/cache or /srv/tmp_var_cache with that, as they're the same thing after the mount --bind.

What you want is use /srv/tmp_var_cache instead of /var/cache. And you only need to do this for package management, that is /var/cache/zypp, not for the whole of /var/cache, and you can just use a symbolic link, not a mount --bind. Therefore the solution is like this:

# move content (will take a while)
mv /var/cache/zypp /srv/tmp_var_cache_zypp
# Create pointer
ln -s /srv/tmp_var_cache_zypp /var/cache/zypp

If you wanted to use mount --bind, what you need is

# move content (as above)
# create mount point
mkdir /var/cache/zypp
# mirror directory
mount --bind /srv/tmp_var_cache_zypp /var/cache/zypp

You need to run the mount --bind after every reboot and before the automatic update check starts, or there'll be hell's bells. I'd try the symlink first...

Of course the other thing to look at is whether to just change the location of the package cache in /etc/zypp/zypp.conf ...

share|improve this answer

Your Answer


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.