runtime/faq/larger storage disk

From JumpBox Documentation Wiki

Jump to: navigation, search

Can I have a larger data disk?

There are several different ways of expanding a JumpBox data disk. The first method is the easiest but must be performed prior to the first time you boot the JumpBox. The second method can be performed on an existing JumpBox but will require a little more work and a reboot. You must be aware of the limitations in the JumpBox backup mechanism for larger data sizes.

First Boot Method

Note This is the only officially supported method at the moment.

Note This method only works if performed PRIOR to the first time you boot the JumpBox.

The following is step-by-step instructions for getting an expanded data disk on VMware, a similar process on other virtualization platforms should work:

  1. Unzip a fresh JumpBox that its safe for you to experiment on. It must not have ever booted.
  2. Add it to VMware
  3. Edit the Virtual Machine Settings
  4. Select Hard Disk 2 (this is the 10GB storage disk in subdirectory disks/data/)
  5. Make note of which disk this is on the SCSI or IDE controller in your virtualization platform. For VMware it should be SCSI0:1.
  6. Click "Remove"
  7. Now Lets add that drive back by doing the following:
    1. Click Add
    2. Select "Hard Disk" then "Next"
    3. Select "Create New Virtual Disk" then "Next"
    4. Attach it in the same SCSI or IDE "slot" as the original drive.
    5. Choose whatever size and other options you want and click "Next"
    6. Name the disk NewStorage.vmdk (or whatever really) then "Finish"
    7. Keep the default selection of "SCSI" then "Next"
  8. Now Start the JumpBox for the first time. Startup will take a little while as it prepares the new empty disk.

If you have followed these instructions exactly then you should have a JumpBox just like any other JumpBox except the storage disk (it has your application, data, databases) is whatever size you chose above. The general idea is that if you remove our premade storage disk, and replace it with another disk of whatever size in its place, it will automatically be detected and formatted and used in place of the original disk. Once you have done this you can verify that it worked, after you set it up, enable SSH and SSH in as the admin use and run the command: "df -h -t ext3" you will see output like this:

 admin@lampda:~$ df -h -t ext3
 Filesystem            Size  Used Avail Use% Mounted on
 /dev/sda1             965M  507M  410M  56% /
 /dev/sdb1             8.0G  183M  7.4G   3% /storage

If you see both sda1 and sdb1 ... and sdb1 is the size you specified earlier you should be good. Also, it is advisable that you check the output of "mount | grep bind" you should have about half a dozen lines like:

 admin@lampdab:~$ mount | grep bind
 /storage/tmp on /tmp type none (rw,bind)
 /storage/backup on /jumpbox/application_portal/backup type none (rw,bind)
 /storage/mysql on /var/lib/mysql type none (rw,bind)
 /storage/jbhtml on /var/data/jbhtml type none (rw,bind)
 /storage/phpmyadmin on /var/data/phpmyadmin type none (rw,bind)
 /storage/private on /var/data/private type none (rw,bind)
 /storage/public on /var/data/public type none (rw,bind)
 /storage/webalizer on /var/data/webalizer type none (rw,bind)

If all of this appears as I have indicated, then you ought to have a functional JumpBox. Please be aware of the limitations of the JumpBox backup tool when the data starts getting into the several GB range. So you will have to deal with that if you care to back up your data. See the README.txt that came with your JumpBox.

Note: There are now some JumpBoxes that have three disks. The third disk is in disks/usr/ and should not be touched during this process. It is attached as the third disk by default, so following these instructions should still work. Just ensure that when you are removing the shipped disk in the above instructions, you are removing the data disk (in disks/data/) and attaching a disk in the same spot on the SCSI or IDE contoller (as indicated by your virtualization software).

Disk Swapping Method

Manual Disk Swap Method

Of course, you can do this all manually if you choose. The basic process is

  • add a larger disk
  • boot the JumpBox
  • stop all of the services with their init scripts (web server, application server, database server)
  • format the new disk
  • copy the contents of /storage to the new disk
  • label the new disk 'storage'
  • label the old disk something other than storage
  • reboot
  • validate that the JumpBox is using the new storage disk.

Manual Disk Expansion Method

Depending on your virtualization platform, you may be able to extend the disk file that was included with the JumpBox. The following disk files are in the subdirectory disks/data/ of the unzipped JumpBox:

  • data*.vmdk - Used by VMware Platforms, you can use vmware-vdiskmanager
  • data.hdd - Used by Parallels Platforms
  • data.vhd - Used by MS Virtual Server and Virtual PC
  • data.xen.tgz - Used by Xen

It is not sufficient to just increase the disk size (this is the equivalent of increasing the drive size), you must also expand the partition on that disk as well. This can be done by booting the JumpBox off of a Linux rescue CD that offers gparted or similar partition resizing tool. We hope to simplify this process in the future.

Basically, the process for manual disk expansion is:

  1. expand virtual disk file with your virtualization platforms disk expansion tools
  2. attach and boot from an Ubuntu desktop live boot CD
  3. start up gparted
  4. expand and or move appropriate partitions.

Getting more space in EC2

Users of JumpBoxes in Amazon's EC2 should use these instructions how to expand EBS root volumes.

Views
Personal tools