Solved

Can Freenas use storage on another server

Posted on 2014-03-12
11
1,323 Views
Last Modified: 2014-05-07
I have a Freenas box running on the same network as a Ubuntu Linux box. The Freenas box provides an FTP service and files are stored locally. I have a requirement for one user to use the same FTP service but store their files on the Ubuntu Linux box (it's a web server so I want them to be able to amend their web site).
Can the Freenas box address storage on the Ubuntu box?
0
Comment
Question by:ClintonK
  • 5
  • 3
  • 3
11 Comments
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39924281
Are you asking if you can mount Ubuntu server in Freenas so FTP are send to ubuntu instead?
0
 

Author Comment

by:ClintonK
ID: 39924288
yes, exactly but only for one user.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39924301
Sure. I see no reason why it won't work.

You can setup NFS in Ubuntu and export the path then mount Ubuntu in freenas. If it works, add it to fstab so it will remount on boot.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:ClintonK
ID: 39924901
I've created a NFS share on Ubuntu and successfully mounted in through the shell on freenas. The next step was to make the new mapped share the home directory of the ftp user but when I give the share to the user I get the error "The path must reside within a volume mount point"
Not sure what that means.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39925257
Do you get the error from the GUI? What error of freeNas are you using?

Can you provide the exact commands or steps you have done?
0
 
LVL 27

Assisted Solution

by:skullnobrains
skullnobrains earned 500 total points
ID: 39932522
freenas apparently does not allow you to create a share on something that is not listed in it's volumes

you need to create a volume from the GUI, and mount your nfs share in a directory inside that mount point or possibly create a nullfs mount to map a directory to the nfs share. i think it will also work on the root of the volume you create from the gui

obviously, you can rely on an existing volume. it is likely much simpler to simply mount the nfs volume inside an existing volume
0
 

Author Comment

by:ClintonK
ID: 39936413
Yes, Freenas doesn't see anything that it didn't create through the GUI. What I've done is to look at it from another angle and create a NFS share on the Freenas box and then mount that from the Web server and put the web site on the share. I think this is a better solution anyway because now the website resides on a RAID5 array.
0
 
LVL 27

Assisted Solution

by:skullnobrains
skullnobrains earned 500 total points
ID: 39936670
create a NFS share on the Freenas box and then mount that from the Web server and put the web site on the share. I think this is a better solution anyway because now the website resides on a RAID5 array.

if you did that, you are using freenas as the file store and not the web server so the raid5 array does not come to play

as a general rule serving a web site over NFS is not a very good idea

no idea what you are comparing raid5 with since i have no idea about your freenas setup, but it is unlikely that the raid5 is faster or even more secure in terms of data integrity

---

did you give a try to the solution i suggested above ? create a share on the freenas and then mount your nfs on or inside the corresponding location  on the freenas ?
0
 

Author Comment

by:ClintonK
ID: 39936681
The NFS share is created on the RAID 5 array and mounted by the web server so the data does reside on the RAID 5.
I did wonder about the integrity of the solution and whether it was a good idea to do what I've done - it does work but maybe it's not the best way.
I will try your suggestion (skullnobrains) this evening and report back. Cheers.
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 39936849
The NFS share is created on the RAID 5 array and mounted by the web server so the data does reside on the RAID 5.
oups i misread. the raid5 is the nas and not the server, my bad

btw, if you're using zfs with freenas, you're using raidz and not raid5... hopefully

I did wonder about the integrity of the solution and whether it was a good idea to do what I've done - it does work but maybe it's not the best way.
try and emulate packet loss or worse by blocking the nfs flow in either host's firewall or killing tcp sessions if your nfs is over tcp. last time i checked this at least required tweaking in order to prevent accumulation of stale file handles, unkillable httpd threads (at least with apache) and similar problems. it is also likely to be much slower even considering os-level and server-level caches... but them some folks do run production servers like this and they're not all crazy
0
 

Author Closing Comment

by:ClintonK
ID: 40048390
I've been running the nginx web server with a NFS mounted file system hosted on the FreeNas server and all seems good. It's only a very low volume site so performance is not really an issue so I'm happy with this solution.
Thanks all for the input.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question