AWS EFS Centos
My FOG version currently is 1.5.5 and works perfectly fine. However I have attached an AWS EFS on my CentOS Linux release 7.6.1810 (Core) FOG server and able to cd into it fine. I am trying to change the default directory /images to this EFS lets call it /efs-aws and store all the images that were on /images on this /efs-aws directory.
Things I have done so far is change the settings on the FOG web interface under storage to 2 tabs the “image path” and “FTP path” to /efs-aws.
Change the settings under “/opt/fog/.fogsettings”. Specifically these 2 lines.
At first one log I saw from /var/log/messages is this
- list itemfog rpc.mountd: Cannot export /efs-aws, possibly unsupported filesystem or fsid= required
- But puzzling part of this log I saw was after I put the directory “/efs-aw” in “/etc/exports”. All I did here is replace “/images” with “/efs-aws”
I get this error below
- list itemlist itemfog rpc.mountd: refused mount request from 10.3.4.86 for /efs-aws (/): not exported
- when I try to image to a test laptop I get this picture (note I just copied and pasted this picture from another forum in FOG but this is exactly what kind of error I get).
if anyone has ever tried using EFS to store all images I’d appreciate the help!
To say it in a MS Windows terms (which also doesn’t support this). Lets say you have server A and you share a directory. On server B you connect Server A’s share to the W: drive. On server B you are try to share the W: drive. The share fails because you are trying to reshare a mounted share. Again this is a file level share. You may be able to do this with a block level share (as an iSCSI volume), but I haven’t tried.
@spidajon That looks like an NFS mount. You can’t export something that’s mounted onto your system. (you can’t daisy-chain)
So in other words, you need to try and do it directly, by for example creating a storage node in the web UI and adding the address there directly.
The EFS is mounted already to my VM, its mounted via DNS and the EFS is mounted to the /efs-aws directory. This is how it looks when you type “df -h”. I moved the images over to the directory hence the 9.2G data/images that is in the directory. So its mounted and accessible I just get the “Mounting File system … failed” and the permission denied under the reason in the picture.
fs-xxxxxx.efs.us-east-1.amazonaws.com:/ 8.0E 9.2G 8.0E 1% /efs-aws
I’ll try some of your suggestions. Not sure you can create a iSCSI target in AWS tho
@spidajon How is the EFS AWS mounted? I think George is right in that you are trying to export a location that is mounted from elsewhere already, which is not possible as far as I know.
If so, you should follow his advice on how to handle the situation, if that is possible.
This is what I get after making changes in /etc/exports and running “exportfs -ra”
exportfs: /efs-aws/dev does not support NFS export
exportfs: /efs-aws does not support NFS export
After you update /etc/exports, you have to make sure they’re loaded.
I’m unfamiliar with AWS EFS, though.
You are at a point of trying to reshare a mounted share. At this point nfs is complaining its not a local file path. You would have the same issue if you mounted a NAS directory over and then expected FOG to image to that mounted NAS directory.
(first I’m ignorant with AWS) It would be better if you created a FOG Storage node in AWS and connect your AWS storage as the boot drive to the is AWS storage, or mount the AWS drive over /images so its a block level device and not a file level device.
There is an nfs option to crossmount shares. I’ve never used it since its generally a bad idea in most cases. But you can look into that option too.
Once last idea would be a iscsi mounted volume. That should appear to nfs as a block level file system. Is it possible to create a iSCSI target in AWS?