rPi install keeps saying no space left on device


#1

It’s probably just me, but Home-Assistant just won’t install on RaspberryPi with EmonSD image as base.
It kept throwing errors after Cleaning up… ending in OSError: [Errno 28] No space left on device.
Here’s example of when I try to force reinstall:

[email protected](rw):data$ sudo pip3 install --upgrade --force-reinstall homeassistant
Downloading/unpacking homeassistant
  Downloading homeassistant-0.35.0-py2.py3-none-any.whl (6.3MB): 6.3MB downloaded
Downloading/unpacking requests>=2,<3 (from homeassistant)
  Downloading requests-2.12.4-py2.py3-none-any.whl (576kB): 576kB downloaded
Downloading/unpacking jinja2>=2.8 (from homeassistant)
  Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB): 263kB downloaded
Downloading/unpacking pyyaml>=3.11,<4 (from homeassistant)
  Downloading PyYAML-3.12.tar.gz (253kB): 253kB downloaded
  Running setup.py (path:/tmp/pip-build-j6c6g7qt/pyyaml/setup.py) egg_info for package pyyaml

Downloading/unpacking async-timeout==1.1.0 (from homeassistant)
  Downloading async_timeout-1.1.0-py3-none-any.whl
Downloading/unpacking pytz>=2016.7 (from homeassistant)
  Downloading pytz-2016.10-py2.py3-none-any.whl (483kB): 483kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1198, in prepare_files
    do_download,
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1376, in unpack_url
    self.session,
  File "/usr/lib/python3/dist-packages/pip/download.py", line 582, in unpack_http_url
    unpack_file(temp_location, location, content_type, link)
  File "/usr/lib/python3/dist-packages/pip/util.py", line 640, in unpack_file
    unzip_file(filename, location, flatten=not filename.endswith(('.pybundle', '.whl')))
  File "/usr/lib/python3/dist-packages/pip/util.py", line 529, in unzip_file
    fp.write(data)
OSError: [Errno 28] No space left on device

Storing debug log for failure in /root/.pip/pip.log

I ended up installing the various pip module individually, last one missing afaict was sqlalchemy
When I try to install that I get similar OSError: [Errno 28] No space left on device error:

I’m confused as there seems to be plenty of space available:

I was going to following instructions to integrate Emon with Home-Assistant but can’t get to past install https://github.com/openenergymonitor/oem_home-assistant

Many thanks!


#2

My wild guess is your /tmp is running out of space. If you unmount /tmp you will use your sd card and that might have sufficient space available


#3

Thanks that fixed it!


#4

I’m trying to install Home Assistant into an Onion Omega2+. I’m having the same error message when I run hass for the first time and it tries to install SQLAlchemy 1.1.5. This renders the entire recorder module offline.

I tried to install this dependencies (SQLAlchemy, record, ExtensionClass) manually using pip3 and all ends up throwing this error on ExtensionClass:

[email protected]:~# pip3 install ExtensionClass
Collecting ExtensionClass
  Using cached ExtensionClass-4.2.1.tar.gz
Installing collected packages: ExtensionClass
  Running setup.py install for ExtensionClass ... error
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mtx95w8c/ExtensionClass/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-h6rlqngd-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mtx95w8c/ExtensionClass/

I have plenty of disk space:

[email protected]:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 5.5M      5.5M         0 100% /rom
tmpfs                    61.4M      5.6M     55.8M   9% /tmp
/dev/mmcblk0              1.8G    398.0M      1.3G  23% /overlay
overlayfs:/overlay        1.8G    398.0M      1.3G  23% /
tmpfs                   512.0K         0    512.0K   0% /dev

When I try to unmount /tmp, I get a resource busy error (even with -f).

I tried to install it using easy-install and I have the same problem.

I’ll post this in the Onion forums too. In the mean time, any suggestions?
Thanks in advance.


#5

Use -l to unmount, “sudo umount -l /tmp”


#6

You can try doing a remount to increase the partition’s size.

sudo mount -o remount,size=100M /tmp

Other option is to comment out temporarily the respective line in /etc/fstab, reboot, install and then uncomment and reboot again to restore tmp to be in-memory file system.