Adding Storage to a FOG Server

Overview
This tutorial will cover how to add an additional hard disk to a server and mount it as /images. For example if you installed the host operating system on a drive that was 80GB, now you wish to add a new 1TB hard disk to mount as /images keeping the rest of the OS on the 80GB disk.

In this tutorial we are assuming you are using Ubuntu and that the disk you are installing is not formatted. If the drive is formatted, it may mount automatically, if you does, right click on it and select dismount.

Preparing new disk
sudo fdisk -l It should look something like /dev/sdb (without a number after it), we will refer to this as [yourdevice].
 * Connect the new drive to the host system.
 * Determine device name by typing

Make sure this is correct because we will be destroying everything on this device, so make sure the disk capacity matches, etc.

sudo dd if=/dev/zero of=[yourdevice] count=20 bs=512
 * Lets wipe out the MBR and then some, type

Partitioning
sudo fdisk [yourdevice] n p 1 1 [press enter] t 83 a 1 w
 * Now lets partition it

Formating and Mounting
sudo mkfs.ext3 [yourdevice]1 (add a 1 to the end of your device name!) sudo mv /images /images.old sudo mkdir /images sudo mount -t ext3 /dev/sdb1 /images mount You are looking for [yourdevice] on /images sudo cp -av /images.old/* /images/ sudo touch /images/.mntcheck sudo gedit /etc/fstab [yourdevice]1	/images 	ext3  defaults   0   0 [yourdevice] should have the number 1 at the end of it. sudo chmod 777 -R /images
 * Put a filesystem on it
 * Your device is setup! Lets move your old images directory.
 * Create the new mountpoint
 * Now lets mount your new driver as /images
 * Make sure the new driver is mounted
 * Copy your old images and data to the new device
 * Create the .mntcheck file in the new images folder
 * Now make sure your new device gets mounted at system startup
 * Add the following line:
 * Change permissions on the device
 * Now restart and make sure the new image volume mounts.