FreeNAS ftp command question
mrwb last edited by mrwb
- FOG Version: Running Version 1.3.5
SVN Revision: 6067
- OS: Ubuntu 14.04 LTS
- Service Version: N/A
So I have read the wiki entry on Troublshooting FTP and the posts and wiki on using FreeNAS with FOG. The last part of the FreeNAS wiki describes how the rename does not work and you have to manually move the image from dev to the actual image folder.
Using FOG with FreeNAS
The files are uploaded and then stuck in the dev folder. I looked into the problem from the FreeNAS side of things since I did not see much on here about it. I am running FreeNAS-9.10-STABLE. This appears in the log (xferlog)
Apr 4 12:02:09 FreeNAS01 proftpd: 127.0.0.1 (10.132.7.25[10.132.7.25]) - FTP session opened. Apr 4 12:02:09 FreeNAS01 proftpd: 127.0.0.1 (10.132.7.25[10.132.7.25]) - USER FOG: Login successful. Apr 4 12:02:09 FreeNAS01 proftpd: 127.0.0.1 (10.132.7.25[10.132.7.25]) - warning: cannot copy source '/images/dev/004045363e48': Is a directory Apr 4 12:02:09 FreeNAS01 proftpd: 127.0.0.1 (10.132.7.25[10.132.7.25]) - FTP session closed.
So it looks like fog wants to move the whole directory but the ftp server in FreeNAS (proftpd) does not support that. If that is the case, is this the missing link that would allow someone to make fog work with FreeNAS - changing the ftp commands that move the files from dev?
- FOG Version: Running Version 1.3.5
Sometimes you just feel a little slow on the uptake. I put the pieces together and realized something. In the wiki entry on using FOG with FreeNAS, the instruction is to create 2 separate datasets --> images and images/dev. This is what sets up the different mount points that gives a problem with ftp in FreeNAS.
I deleted the 2nd dataset from FreeNAS and then went into the shell in FreeNAS to recreate the dev directory under images. I recreated the .mntcheck file and set the permissions for the FOG user. The rename of a directory from the windows ftp client now works to rename from images/dev/test to images/test so now the FOG image should work.
Would someone please update the wiki to not create 2 datasets, please?
Here is the test result I have come up with so far.
Windows ftp client to FOG server running Ubuntu:
I can successfully issue a rename command to move a directory from images/dev to images.
It looks like the windows ftp client work that as RNFR / RNTO
ftp> rename /images/dev/00142240c820 /images/0014test 350 Ready for RNTO. 250 Rename successful.
The same thing connecting to the FreeNAS server gives the error initially noted.
ftp> rename /images/dev/004045363e48/ /images/TEST/ 350 File or directory exists, ready for destination name 550 Rename /images/TEST/: Is a directory
On the FreeNAS I can rename a directory as long as I am moving it within the same parent directory.
ftp> rename TEST TST2 350 File or directory exists, ready for destination name 250 Rename successful
The ProFTPD document I listed initially does state at the bottom that you cannot move directories across mount points. That would indicate that the only way to get FOG to work with FreeNAS to do this would be to move the files one at a time.
I don’t know if that would ever be implemented. I don’t know if there are enough people that really need it to make that happen. For now I will just go back and grow the vm disk.
rather than having to grow the vmdk on the vm or spinning up another vm to be a storage node
I hate to be that guy, but that is what I get paid for.
Your logic if flawed. You are adding in a second failure domain (another server i.e. freenas) to eliminate a problem that isn’t really a problem. Growing a vmdk is trivial. I would setup your images on a second vmdk that just uses simple partitions then growing it and expanding the filesystem is almost as easy as windows now. I agree that LVM adds a bit of complexity, but a vmdk with a simple partition is pretty easy.
But to each their own (soapbox has now been stowed).
Our fog server is a vm and we are looking at using nfs storage rather than having to grow the vmdk on the vm or spinning up another vm to be a storage node. And sometimes you start down a path and find an obstacle and you just can’t leave it alone until you solve it.
I’m not sure what the command would be but I can run some tests if you’ll help me out. I can’t tell exactly what you’re sending now to move the directory currently. It’s been a while since I’ve done much with ftp commands but a little nudge should clear things up. Here is the page I found on proftpd supported commands:
ProFTPD supported commands
I’ll start checking into the proftpd.conf file to see if there are any items that could be changed there to allow better compatibility and maybe turn on some tracing.
I would have to ask; if you are going with FreeNAS, why not just deploy a fog storage node and be done with it?
FreeNAS is a marginal system at best (yes I’m anti-freenas for other reasons than fog).
Do we know what FTP command would allow this to move from /images/dev/ into /images/imgname