12

I was downloading a file while connecting over ssh using wget. The download failed:

Cannot write to `serviio-0.6.2-linux.tar.gz' (No space left on device).
pi@raspberrypi:~$ Write failed: Connection reset by peer

I can no longer communicate with the pi over ssh, and resetting it didn't seem to help. Do I need to flash the SD card and start again?

Darth Vader
  • 4,096
  • 24
  • 42
  • 67
Tom Medley
  • 3,909
  • 8
  • 30
  • 45

3 Answers3

11

I very much doubt it is irreparable, however this is a perfect example of why /var should not be on your root partition. Everytime your machine wants to log a message or start a process it makes small but significant writes To /var. Without these writes the system cannot function.

I'll say it again for everyone:

/var should not be mounted on your root partition!

As for solving your problem, you will need to do one of the following:

  • Mount the SD card on a Linux machine and delete uneccessary files.
  • Reflash the image.

For the future, an elegant solution is to mount var directly in RAM by adding this line to /etc/fstab:

tmpfs /var tmpfs nodev,nosuid,size=50M 0 0
Jivings
  • 22,208
  • 11
  • 88
  • 138
  • See my question here regarding this: http://raspberrypi.stackexchange.com/questions/882/mounting-var-in-memory-good-idea-on-an-rpi – Jon Egerton Jul 02 '12 at 09:15
  • Putting the whole /var on tmpfs (= blank at every boot) seems pretty extreme. Have you tested this? – XTL Apr 15 '13 at 13:17
  • @XTL Yes. As long as you don't care if your logs persist it doesn't have any adverse effects. – Jivings Apr 16 '13 at 06:35
3

Try booting into a Linux Live CD and plug in your SD card. You should be able to mount it and delete some files.

If you need to remove packages, you may need to install an emulator onto the SD card, or an image thereof.

Alex Chamberlain
  • 15,120
  • 13
  • 63
  • 112
-1

As others have suggested, you shouldn't need to wipe your card, you should be able to free up space; But if you do think it's easier just to wipe the card and start you can use the SD Formatting Tool The Secure Digital Standard has an official website!

it's a useful utility for your tool belt.

Dog Ears
  • 1,937
  • 6
  • 18
  • 27