Changing the directory where Fog images are stored question
-
@PageTown /opt/fog/.fogsettings —the file is hidden under that directory, but with nano (which I prefer and will need installed) or vi, it can be edited and resaved.
If you google mounting in linux it will give you an idea of how I mounted the volume with /etc/fstab, there’s a lot out there on the subject
-
Here are the contents of my fogsettings folder. I’m not sure which parameter I need to change to redirect where my images are stored:
Created by the FOG Installer
Version: 1.2.0
Install time: Mon 01 Feb 2016 08:57:55 AM CST
ipaddress=“10.1.8.10”;
interface=“eth0”;
routeraddress=“# option routers x.x.x.x;”;
plainrouter=“”;
dnsaddress=“# option domain-name-servers x.x.x.x; “;
dnsbootimage=””;
password=“0cac54”;
osid=“2”;
osname=“Debian”;
dodhcp=“n”;
bldhcp=“0”;
installtype=“N”;
snmysqluser=“”
snmysqlpass=“password”;
snmysqlhost=“”;
installlang=“0”;
donate=“0”;
fogupdateloaded=“1” -
@PageTown It appears that 1.2.0 doesn’t have the settings that @Hanz was talking about.
You’ll have to do it manually.
You’ll need to edit /etc/exports
and you’ll need to change the web interface in storage management to reflect the new location
You’ll need to configure permissions on the new location, and you’ll need to create the subdirectory dev and the (hidden and empty) .mntcheck files. -
How do I create the .mntcheck files? Can I copy them from the default images/dev locations that was created when I did the original Fog install?
-
@PageTown You can create them like this, but substitute your new path for
/images
touch /images/.mntcheck
touch /images/dev/.mntcheck
that’s it. They are literally just blank files. You don’t need to do any copying.
-
I think I did everything correctly, but I am receiving this error when I try to upload an image:
-
@PageTown Check your firewall, and set 777 permissions recursively on /media/bfd/images
chmod -R 777 /media/BFD/images
-
The chmod command didn’t work.
If it was a firewall issue, wouldn’t that block my being able to register the host?
-
@PageTown d you run chmod as sudo?
sudo chmod -R 777 /media/BFD/images
-
@PageTown said:
The chmod command didn’t work.
It might not have solved the issue, but I promise it’s a necessary step.
You’re
/etc/exports
should look like this:/media/BFD/images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0) /media/BFD/images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
You’re .mntcheck file creation would be:
touch /media/BFD/images/.mntcheck touch /media/BFD/images/dev/.mntcheck
Then to recursively set that directory and the mntcheck files permissions:
chmod -R 777 /media/BFD/images
You’d need to reset the nfs and rpc service next (or just reboot).
sudo service nfs-kernel-server restart sudo service rpcbind restart
Seeing how you have an NFS related issue with uploading, you might want to look through this wiki and try some of these things manually:
https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_NFS -
Yes.
-
@PageTown So what error did you see when trying to
chmod
?? We need information to be able to help! -
There was no message when I ran the chmod command. It looked to me like it took it, but I am still getting the same error that is in the screen shot I posted when I try to pull an image.
-
@PageTown There has to be something wrong somewhere. Can you take more pictures of the upload process? A lot of information is displayed during the upload and that would help us solve this. Also, can you give us a screen shot of your storage node settings area? What is your FOG Server’s IP address?
-
@PageTown The path /media/BFD sounds a bit like this is an external drive mounted into that path. What filesystem is on that drive? Run
mount | grep media
to check and post the output here in the forums. -
I have Ubuntu and Fog installed on a 120GB SSD. I am trying to save my images to a separate 1TB HDD drive. The 1TB drive is an internal drive, connected to the mother board via SATA.
The filesystem is NTFS. See screenshot.
The result of running the mount | grep was : /dev/sdb1 on /media/BFD type fuseblk (rw, nosuld,nodev,allow_other,default_permissions,blksize=4096)
-
I am not sure if NFS on a NTFS partition is a good idea? Anyone ever tried this? I haven’t so far. Permission issue might be because of this but I am not sure.
-
@PageTown You don’t want to use NTFS on an NFS share. It is best if you reformat the drive to Ext4 and then go back through the steps outlined by @Wayne-Workman
-
@Sebastian-Roth I never got it to work at all. I ended up swapping to a different solution.
-
Ok, I am up and running! I was following your instructions regarding the exports file and creating the mntcheck files and went into my BFD drive to look at the /images and /images/dev folder when I right clicked on a folder and noticed that the path was not BFD but BFD_. I renamed the path in exports and in storage management and it started pulling an image from my test machine.
I feel foolish that it was something so simple, but I don’t recall naming the drive with an underscore. The only place the additional underscore even shows up is when you right click on a file or folder on it and look at the path.
Thanks everyone for your time and patience!