Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Installing HDP Sandbox on Docker for AWS gives "no space left on device" error

avatar
Explorer

I tried to install the HDP Sandbox on Docker in AWS (Amazon Linux). When loading the Docker image, I am seeing this error.

I edited the "/etc/sysconfig/docker" to provide the "-g" option to increase the storage space (free space is about 500 GB), but I am still getting this error. Please help.

# docker load <HDP_2.5_docker.tar
b1b065555b8a: Loading layer [==================================================>] 202.2 MB/202.2 MB
3901568415a3: Loading layer [=====================================>             ] 10.37 GB/13.85 GB
ApplyLayer exit status 1 stdout:  stderr: write /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.111.x86_64/jre/lib/amd64/server/libjvm.so: no space left on device
1 ACCEPTED SOLUTION

avatar
Explorer

@Michael Young You are right. The root cause was that the default Docker maximum container size was 10 GB. The HDP Sandbox size is about 13.5 GB. So there was not enough space to create the image.

I made the changes below and it worked.

1. Modify the docker config in /etc/sysconfig/docker-storage to add the line:

  DOCKER_STORAGE_OPTIONS= "--storage-opt dm.basesize=20G"

2. Restart Docker.

3. Load the Hortonworks Sandbox Docker image again.

View solution in original post

3 REPLIES 3

avatar
Super Guru

@Shankar P

Running out of space for Docker seems to be a common problem and there doesn't seem to be a single good answer on how to solve that. I created a VirtualBox CentOS 7 VM via Vagrant. This is a 40GB disk image. I then increased the disk size to 100GB via VirtualBox tools. Even with 100GB, I get a similar error when I try to import the sandbox. I haven't yet tried to use the -g option.

The problem is that Docker still uses a virtual machine behind the scenes to run containers. The default storage size for that VM appears to be 20GB. I've found a number of threads from people wanting to see that increased to 100 or 200GB, which seems reasonable to me. Unfortunately, I don't think that has been changed/released.

Having said all of that, Amazon Linux uses upstart at the init system. Have you tried making your changes to /etc/default/docker instead of /etc/sysconfig/docker?

This thread details some of the hassles people have gone through to figure out which configuration file to use: https://github.com/docker/docker/issues/9889

avatar
Explorer

@Michael Young You are right. The root cause was that the default Docker maximum container size was 10 GB. The HDP Sandbox size is about 13.5 GB. So there was not enough space to create the image.

I made the changes below and it worked.

1. Modify the docker config in /etc/sysconfig/docker-storage to add the line:

  DOCKER_STORAGE_OPTIONS= "--storage-opt dm.basesize=20G"

2. Restart Docker.

3. Load the Hortonworks Sandbox Docker image again.

avatar
Super Guru

Awesome! Thank you for sharing the steps you followed.