Added changes brought up in PR discussion.

Signed-off-by: Hollie Teal <hollie@docker.com>
This commit is contained in:
Hollie Teal 2014-08-28 11:04:53 -07:00
parent 77ca0ae9de
commit ce73a3bcf7
1 changed files with 36 additions and 30 deletions

View File

@ -2,15 +2,17 @@ page_title: Resizing a Boot2Docker Volume
page_description: Resizing a Boot2Docker Volume in VirtualBox with GParted page_description: Resizing a Boot2Docker Volume in VirtualBox with GParted
page_keywords: boot2docker, volume, virtualbox page_keywords: boot2docker, volume, virtualbox
# Getting “no space left on device” Errors with Boot2Docker? # Getting “no space left on device” errors with Boot2Docker?
If you're using Boot2Docker with a large number of images, or the images you're working If you're using Boot2Docker with a large number of images, or the images you're
with are very large, your pulls might start failing with "no space left on device" errors when working with are very large, your pulls might start failing with "no space left
the Boot2Docker VM's volume fills up. The solution is to increase the volume size by on device" errors when the Boot2Docker volume fills up. The solution is to
first cloning it, then resizing it using a disk partitioning tool. increase the volume size by first cloning it, then resizing it using a disk
partitioning tool.
We recommend [GParted](http://gparted.sourceforge.net/download.php/index.php)-- the ISO We recommend [GParted](http://gparted.sourceforge.net/download.php/index.php).
is a free download and works well with VirtualBox. The tool comes as a bootable ISO, is a free download, and works well with
VirtualBox.
## 1. Stop Boot2Docker ## 1. Stop Boot2Docker
@ -20,8 +22,9 @@ Issue the command to stop the Boot2Docker VM on the command line:
## 2. Clone the VMDK image to a VDI image ## 2. Clone the VMDK image to a VDI image
Boot2Docker ships with a VMDK image, which cant be resized by VirtualBoxs native tools. We will Boot2Docker ships with a VMDK image, which cant be resized by VirtualBoxs
instead create a VDI volume and clone the VMDK volume to it. native tools. We will instead create a VDI volume and clone the VMDK volume to
it.
Using the command line VirtualBox tools, clone the VMDK image to a VDI image: Using the command line VirtualBox tools, clone the VMDK image to a VDI image:
@ -29,8 +32,9 @@ Using the command line VirtualBox tools, clone the VMDK image to a VDI image:
## 3. Resize the VDI volume ## 3. Resize the VDI volume
Choose a size that will be appropriate for your needs. If youre spinning up a lot of containers, Choose a size that will be appropriate for your needs. If youre spinning up a
or your containers are particularly large, larger will be better: lot of containers, or your containers are particularly large, larger will be
better:
`$ vboxmanage modifyhd /full/path/to/<newVDIimage>.vdi —-resize <size in MB>` `$ vboxmanage modifyhd /full/path/to/<newVDIimage>.vdi —-resize <size in MB>`
@ -38,9 +42,11 @@ or your containers are particularly large, larger will be better:
To resize the volume, we'll use [GParted](http://gparted.sourceforge.net/download.php/). To resize the volume, we'll use [GParted](http://gparted.sourceforge.net/download.php/).
Once you've downloaded the tool, add the ISO to the Boot2Docker VMs IDE bus. Once you've downloaded the tool, add the ISO to the Boot2Docker VMs IDE bus.
You might need to create the bus before you can add the ISO. **Note:** It's You might need to create the bus before you can add the ISO.
important that you choose a partitioning tool that is available as an ISO so that
the Boot2Docker VM can be booted with it. **Note:**
It's important that you choose a partitioning tool that is available as an ISO so
that the Boot2Docker VM can be booted with it.
<table> <table>
<tr> <tr>
@ -53,41 +59,41 @@ the Boot2Docker VM can be booted with it.
## 5. Add the new VDI image ## 5. Add the new VDI image
In the settings for the Boot2Docker image in VirtualBox, remove the VMDK image from In the settings for the Boot2Docker image in VirtualBox, remove the VMDK image
the SATA contoller and add the VDI image. from the SATA contoller and add the VDI image.
<img src="/articles/b2d_volume_images/add_volume.png"> <img src="/articles/b2d_volume_images/add_volume.png">
## 6. Verify the boot order ## 6. Verify the boot order
In the **System** settings for the Boot2Docker VM, make sure that **CD/DVD** is at In the **System** settings for the Boot2Docker VM, make sure that **CD/DVD** is
the top of the **Boot Order** list. at the top of the **Boot Order** list.
<img src="/articles/b2d_volume_images/boot_order.png"> <img src="/articles/b2d_volume_images/boot_order.png">
## 7. Boot to the disk partitioning ISO ## 7. Boot to the disk partitioning ISO
Manually start the Boot2Docker VM in VirtualBox, and the disk partitioning ISO should start up. Manually start the Boot2Docker VM in VirtualBox, and the disk partitioning ISO
Using GParted, choose the **GParted Live (default settings)** option. Choose the should start up. Using GParted, choose the **GParted Live (default settings)**
default keyboard, language, and XWindows settings, and the GParted tool will start option. Choose the default keyboard, language, and XWindows settings, and the
up and display the VDI volume you created. Right click on the VDI and choose GParted tool will start up and display the VDI volume you created. Right click
**Resize/Move**. on the VDI and choose **Resize/Move**.
<img src="/articles/b2d_volume_images/gparted.png"> <img src="/articles/b2d_volume_images/gparted.png">
Drag the slider representing the volume to the maximum available size, click **Resize/Move**, Drag the slider representing the volume to the maximum available size, click
and then **Apply**. **Resize/Move**, and then **Apply**.
<img src="/articles/b2d_volume_images/gparted2.png"> <img src="/articles/b2d_volume_images/gparted2.png">
Quit GParted and shut down the VM. Remove the GParted ISO from the IDE controller for Quit GParted and shut down the VM. Remove the GParted ISO from the IDE controller
the Boot2Docker VM in VirtualBox. for the Boot2Docker VM in VirtualBox.
## 8. Start the Boot2Docker VM ## 8. Start the Boot2Docker VM
Fire up the Boot2Docker VM manually in VirtualBox. The VM should log in automatically, but Fire up the Boot2Docker VM manually in VirtualBox. The VM should log in
if is doesn't, the credentials are `docker/tcuser`. Using the `df -h` command, verify automatically, but if it doesn't, the credentials are `docker/tcuser`. Using
that your changes took effect. the `df -h` command, verify that your changes took effect.
<img src="/articles/b2d_volume_images/verify.png"> <img src="/articles/b2d_volume_images/verify.png">