After Adding Storage for Images / deploy image mounting failed
- 
 OK so I added new storage called images2, followed the documentation: 
 https://wiki.fogproject.org/wiki/index.php/Adding_Storage_to_a_FOG_ServerCaptured an image perfectly. Trying to deploy an image and getting the error: 
 Mounting File System: Error
 Could not mount images folder (/bin/fog.download)
 Reason: mount: mounting 192.168.177.101:/images2/ on /images failed: permission denied.- Checked permissions and have fogproject root access.
 
- 
 @sourceminer I didn’t look at the wiki so I’m guessing here (well kind of). From the command prompt of the fog server. If you run the command showmount -e 127.0.0.1does it show both /images and /images2 exported? If no then you need to edit the /etc/exportfs file. Once the file has been updated then you want to run the commandexportfs -ato reshare the shares. Check with the showmount command.
- 
 Boom that was it… Interesting I thought I did this already, I thought It was in the documentation but doesn’t seem like it was. 
- 
 I spoke too soon still complaining about Unable to locate image store /bin/fog.download. 
 From what I see all the other parameters are correct.exports file: 
 /images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
 /images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
 /images2 *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
 /images2/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
- 
 @sourceminer What does showmount command tell you? 
- 
 root@FogServer:/bin# sudo showmount -e 127.0.0.1 
 Export list for 127.0.0.1:
 /images2/dev *
 /images2 *
 /images/dev *
 /images *
- 
 @sourceminer OK that’s great. The shares are published. The next thing is to compare the permissions on /images and /images2 ls -la /images
 ls -la /images2Also there are hidden check files in the /images and /images/dev directories. You can view them with: 
 ls -la /images/*
 ls -la /images/dev/*
 ls -la /images2/*
 ls -la /images2/dev/*They should be called .mntcheck(yes with the preceding dot, that makes them hidden.If you want to recreate them (if they don’t exist) use 
 touch /images2/.mntcheck
- 
 @george1421 said in After Adding Storage for Images / deploy image mounting failed: ls -la /images2/* Looks like everything is correct. root@FogServer:/# ls -la /images2 
 total 36
 drwxrwxrwx 6 fogproject root 4096 Jul 26 10:15 .
 drwxr-xr-x 23 root root 4096 Jul 26 14:25 …
 drwxrwxrwx 2 fogproject root 4096 Jul 26 10:15 Design-Image-7-26-22
 drwxrwxrwx 3 fogproject root 4096 Jul 26 10:15 dev
 drwxrwxrwx 2 fogproject root 16384 Jul 26 08:02 lost+found
 -rwxrwxrwx 1 fogproject root 0 Jul 27 10:52 .mntcheck
 drwxrwxrwx 2 fogproject root 4096 Jul 26 08:08 postdownloadscripts
 root@FogServer:/# ls -la /images
 total 16
 drwxrwxrwx 4 fogproject root 4096 Jul 18 12:15 .
 drwxr-xr-x 23 root root 4096 Jul 26 14:25 …
 drwxrwxrwx 3 fogproject root 4096 Jul 18 12:15 dev
 -rwxrwxrwx 1 fogproject root 0 Jul 18 12:15 .mntcheck
 drwxrwxrwx 2 fogproject root 4096 Jul 18 12:15 postdownloadscripts
 root@FogServer:/# ls -la /images/*
 /images/dev:
 total 12
 drwxrwxrwx 3 fogproject root 4096 Jul 18 12:15 .
 drwxrwxrwx 4 fogproject root 4096 Jul 18 12:15 …
 -rwxrwxrwx 1 fogproject root 0 Jul 18 12:15 .mntcheck
 drwxrwxrwx 2 fogproject root 4096 Jul 18 12:15 postinitscripts/images/postdownloadscripts: 
 total 12
 drwxrwxrwx 2 fogproject root 4096 Jul 18 12:15 .
 drwxrwxrwx 4 fogproject root 4096 Jul 18 12:15 …
 -rwxrwxrwx 1 fogproject root 235 Jul 18 12:15 fog.postdownload
 root@FogServer:/# ls -la /images/dev/*
 total 12
 drwxrwxrwx 2 fogproject root 4096 Jul 18 12:15 .
 drwxrwxrwx 3 fogproject root 4096 Jul 18 12:15 …
 -rwxrwxrwx 1 fogproject root 249 Jul 18 12:15 fog.postinit
 root@FogServer:/# ls -la /images2/*
 /images2/Design-Image-7-26-22:
 total 80466000
 drwxrwxrwx 2 fogproject root 4096 Jul 26 10:15 .
 drwxrwxrwx 6 fogproject root 4096 Jul 26 10:15 …
 -rwxrwxrwx 1 fogproject root 2 Jul 26 09:28 d1.fixed_size_partitions
 -rwxrwxrwx 1 fogproject root 1048576 Jul 26 09:29 d1.mbr
 -rwxrwxrwx 1 fogproject root 265 Jul 26 09:29 d1.minimum.partitions
 -rwxrwxrwx 1 fogproject root 30 Jul 26 09:29 d1.original.fstypes
 -rwxrwxrwx 1 fogproject root 0 Jul 26 09:28 d1.original.swapuuids
 -rwxrwxrwx 1 fogproject root 9314309 Jul 26 09:29 d1p1.img
 -rwxrwxrwx 1 fogproject root 81962057319 Jul 26 10:15 d1p2.img
 -rwxrwxrwx 1 fogproject root 424717965 Jul 26 10:15 d1p3.img
 -rwxrwxrwx 1 fogproject root 265 Jul 26 09:28 d1.partitions/images2/dev: 
 total 12
 drwxrwxrwx 3 fogproject root 4096 Jul 26 10:15 .
 drwxrwxrwx 6 fogproject root 4096 Jul 26 10:15 …
 -rwxrwxrwx 1 fogproject root 0 Jul 27 10:52 .mntcheck
 drwxrwxrwx 2 fogproject root 4096 Jul 26 08:08 postinitscripts/images2/lost+found: 
 total 20
 drwxrwxrwx 2 fogproject root 16384 Jul 26 08:02 .
 drwxrwxrwx 6 fogproject root 4096 Jul 26 10:15 …/images2/postdownloadscripts: 
 total 12
 drwxrwxrwx 2 fogproject root 4096 Jul 26 08:08 .
 drwxrwxrwx 6 fogproject root 4096 Jul 26 10:15 …
 -rwxrwxrwx 1 fogproject root 235 Jul 26 08:08 fog.postdownloadroot@FogServer:/# ls -la /images2/dev/** 
 total 12
 drwxrwxrwx 2 fogproject root 4096 Jul 26 08:08 .
 drwxrwxrwx 3 fogproject root 4096 Jul 26 10:15 …
 -rwxrwxrwx 1 fogproject root 249 Jul 26 08:08 fog.postinit
- 
 @george1421 
 Im wondering if its not anything to do with FOG?
 It gets to the preparing Partition layout and then prompts:
 **An error has occurred. 
 Init version xxx 
 Unable to locate image store (/bin/fog.download)
 Args passed:Kernel variables and settings: 
 bzimage loglevel=4 initrd=init.xz root=/deu/ranO ru randisk_size=2?5000 ueb-http://192.168.177.101/fog/ consoleblank-0 rootfstype=ext4 nvme_core.default_ps_max_legacy_us=0 mac=XX:XX:XX:XX:XX:XX ftp=192.168.177.101 storage=192.168.177.101:/images2/ storageip=192.168.177.101 osid=9 irqpol1 hostnane=c025a53f5bdd chkdsk=0 bla bla bla…
 No errors seem to be in the parameters.
 The parameters all seem goodComputer will reboot in 1 minute 
- 
 @sourceminer Not exactly sure but maybe the duplicated fsid=Xparameter in your /etc/exports is causing the issue.
- 
 @sebastian-roth 
 OMG that was it!!
 Thank you…
- 
 @sebastian-roth said in After Adding Storage for Images / deploy image mounting failed: fsid=X I totally overlooked that. Great catch because the file systems seem to be setup correctly from a file permissions standpoint. 
- 
 @george1421 
 Ok so I was able to deploy 1 image.
 Captured a new image and trying to deploy it (from the same storage group) Getting same error again…
- 
 @sourceminer said in After Adding Storage for Images / deploy image mounting failed: Getting same error again… You get the same error on capture or capture and deploy? If you look into /images2/dev do you see a directory with a mac formatted name? If you look at /images/dev do you see this directory? You should only see a mac address looking directory when you are doing an active upload to the fog server. Any other times that is an indication of a botched upload. You are still getting a permission denied message? 
- 
 @george1421 
 I captured the image no problem.
 Im getting the error on deploying the image.
 Neither directory has a formatted Mac name
 I don’t see anything saying permission denied… just the same message above “Unable to locate image store (/bin/fog.download)”
- 
 @george1421 
 OK sorry, I just noted that the capture never completed… its starting over again.
 Going to watch to see what happens.
- 
 OK Confirmed its all working as expected. The Ultimate solution was the duplicate fsid=x issue. 
 Perhaps flag the wiki document on installing additional storage pools to ensure that the fsid=x value is not duplicated from a copy and paste.
- 
 @sourceminer Interesting I think the wiki pages needs to be updated to based on my tutorial here: https://forums.fogproject.org/topic/10450/adding-additional-image-storage-space-to-fog-server/2 I specifically do mention changing the fsid. 
- 
 @george1421 
 Yes your Tutorial is spot on.One thing I have observed though, is if you reinstall Fog (I did this morning troubleshooting the Secure boot post) I noted that the exports file is replaced with default. I lost all my settings from prior. I had to append the file. 
- 
 @sourceminer said in After Adding Storage for Images / deploy image mounting failed: I lost all my settings from prior. I had to append the file. Yes I saw this too when I was developing NFSv4 for FOG. That uses a really different exports file. So now I keep a exportfs.sav file with the correct settings in case I forget in the future. 
