build-ubuntu-ami icon indicating copy to clipboard operation
build-ubuntu-ami copied to clipboard

No space left on device (again)

Open andresriancho opened this issue 11 years ago • 2 comments

My EC2 system log looks like:

++ tee /var/log/user-data.log
user-data: + image=/mnt/trusty-server-cloudimg-amd64.img
user-data: + imagedir=/mnt/trusty-server-cloudimg-amd64
user-data: + tar xzf - -C /mnt
user-data: + wget -qO- http://uec-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64.tar.gz
user-data: + dd if=/dev/zero bs=1024k count=4096
user-data: dd: error writing 'standard output': No space left on device
user-data: 3143+0 records in
user-data: 3142+0 records out
user-data: 3295084544 bytes (3.3 GB) copied, 23.468 s, 140 MB/s

Nothing else happens after that. Related with the fix applied for #15

I'm using build-ubuntu-ami-2.1.1 and running like:

build-ubuntu-ami setup.sh --group=build --key_name=build --brand=collector --codename=trusty --flavor=m3.medium

andresriancho avatar Jan 20 '15 14:01 andresriancho

Confirmed in /var/lib/gems/1.9.1/gems/build-ubuntu-ami-2.1.1/data/user_data.sh.erb that the fix for #15 is there.

Trying to fix this issue with:

# The image is 1.4GB by default
# Add 8GB for good measure
dd if=/dev/zero bs=1024k count=8192 >> $image
e2fsck -p -f $image
resize2fs $image

andresriancho avatar Jan 20 '15 14:01 andresriancho

df -h output before running the dd command:

user-data: + df -h
user-data: Filesystem      Size  Used Avail Use% Mounted on
user-data: /dev/xvda1      7.8G  774M  6.6G  11% /
user-data: none            4.0K     0  4.0K   0% /sys/fs/cgroup
user-data: udev            1.9G   12K  1.9G   1% /dev
user-data: tmpfs           375M  184K  375M   1% /run
user-data: none            5.0M     0  5.0M   0% /run/lock
user-data: none            1.9G     0  1.9G   0% /run/shm
user-data: none            100M     0  100M   0% /run/user
user-data: /dev/xvdb       3.9G  817M  2.9G  22% /mnt

andresriancho avatar Jan 26 '15 22:01 andresriancho