• For the users who have experienced all the problems when mounting a new hard drive to your fog server, this is a tutorial which worked well for me!

    My setup:

    • XenServer as Dedicated OS
    • Ubuntu 12.04 (fully updated at June 20th 2013) as VPS (this is the FOG server)
    • A primary 10GB Storage at [B]/dev/xvda[/B] (on the fog server)
    • A second Virtual Storage of 300GB at [B]/dev/xvdb[/B] (on the fog server)
    • FOG 0.32 installed
    • Webmin 1.630 installed

    When installation of the FOG server is completed:

    To create a new partition on /dev/xvdb:
    sudo fdisk /dev/xvdb
    type n (new partition)
    type p (primary partition)
    type 1 (to create /dev/xvdb1)
    press enter (to set the first sector)
    press enter (to set the last sector)
    type t (to edit the system id)
    type 83 (to set the system id to LINUX)
    type w (to write the changes to the disk)

    The partition /dev/xvdb1 has been created
    To format the device:
    sudo mkfs.ext3 /dev/xvdb1

    The partition is being formatted as ext3 (in my case the problem of read only file systems started here, because there occur some errors at this point)

    If errors occur first try to show the errors:
    sudo dmesg | less
    scroll down to see if any errors occur (in my case there were problems with the “EXT3-fs (xvdb1) journal”
    you can quit this by typing q

    To fix these errors be sure the new partition is NOT mounted and do:
    sudo fsck /dev/xvdb1
    Some errors on the hard disk are being recoverd. [I]To be sure, reboot after this command![/I]

    The partition has been created and is working well. Now you need to mount the /images/ folder to the created partition. But move the /images/ folder first to be sure like:
    sudo mv /images/ /images.old/
    sudo mkdir /images/

    Now create the mount in /etc/fstab to be sure the partition is mounted on a reboot. I did not use the full path but the hard drive UUID:
    sudo blkid /dev/xvdb1 (copy the UUID="#####" without the TYPE=“ext3”)
    sudo nano /etc/fstab (paste the UUID="####" at the bottom of this file and remove the quotes so UUID=##### remains)
    be sure the full line looks like this (my setup):
    UUID=b414fb0a-70ed-462e-93ad-e7bd90c40a8c /images ext3 defaults 0 0

    exit and save by pressing [B]ctrl+x[/B] and type [B]Y[/B] to overwrite and press [B]enter[/B] to save changes
    now type the next command to mount the partition:

    sudo mount -a
    test if the mount is created by typing:
    sudo mount
    the /images/ folder should be in that list

    now the permissions of that folder need to be changed like:
    sudo chown -R fog.root /images
    sudo chmod 777 /images -R

    Now copy the old files from /images.old/ to /images/
    sudo cp /images.old/* /images/
    sudo touch /images/.mntcheck

    reboot and the mount should be ready to use!

  • Moderator

    Do you also need to
    [code]sudo touch /images/dev/.mntcheck[/code]