Solved

Can Freenas use storage on another server

Posted on 2014-03-12
11
1,267 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 26

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 26

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 26

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

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now