Fog Images Folder move
-
Hi,
So on my server where I Ubuntu loaded the drive is almost full. Is there any ways I can place the images folder on a different drive within that folder? I can easily move the folder, however I know that fog is set up to point to the images folder. Is there a way that I can change the location of the images folder for it to point to a different hard drive on the server? I have an empty 1.7tb drive I can storage the folder on. I would like to do this rather than completely wipe Ubuntu and reinstall it on a bigger drive.
Thanks!
-
@bartont126 On Linux systems you can easily mount drives anywhere in the filesystem. So you can just hock up the huge drive to your machine, check the name it came up with, mount that, move your images and remount it in
/images
location.Hint: Please be very careful with those commands and make sure you understand every step before proceeding! There is a chance that you wipe all your data from the server if you don’t know what you do and things go wrong! I am not liable for any actions done blindly following the steps posted here.
That said, shutdown the server, connect the new drive and boot it up again.
sudo -i fdisk -l
That should print out all the disks, where quite often
/dev/sda
is your system disk and the new one might be/dev/sdb
. See if it is partitioned properly yet. If not, go ahead:aptitude install parted parted /dev/sdb mklabel gpt mkpart primary ext4 1MiB 100% mkfs.ext4 /dev/sdb1 mkdir /newdisk mount /dev/sdb1 /newdisk service nfs-kernel-server stop mv /images/* /newdisk mv /images/.mntcheck /newdisk umount /newdisk rmdir /newdisk mount /dev/sdb1 /images service nfs-kernel-server start
You should see the new bigger disk space in the FOG web UI now. But to make this change persistent you need to add an entry to
/etc/fstab
so the big disk will be mounted automatically on boot. Add the following line./dev/sdb1 /images ext4 defaults 0 0
Now reboot you FOG server and see if everything is up to your needs.
-