Re-share of SMB mountpoint - is it possible? How?

Status
Not open for further replies.

wumbaba

Cadet
Joined
May 22, 2013
Messages
3
Dear Forum,

i'm completely new to FreeNAS and want to understand if what i try to archive can be done with reasonable effort.

I want to know if it is possible to share a mountpoint as SMB/AFP/FTP share, that is itself mounted in the FreeNAS box through SMB from another server? If so, can someone outline how to best approach this?

I have mounted the other machines SMB share under /mnt/reshare on the FreeNAS box which, apart from some basic network and admin password setup, has seen nothing configured yet. I was assuming to just be able to select /mnt/reshare now under "Sharing:Windows (CIFS) Shares:Add Windows Share" but when i try to, i only get a "/" in the path browser and with this, or when manually entering /mnt/reshare/, it errors with a message "The path must reside within a volume mount point", which is what i though i had given. I could not find the answer to this in the manual.

It must be something very obvious to the experienced FreeNAS admin why this won't work and how it would have to be done. Can anybody give me the required nudge into the right direction?

Many thanks for your help.

Cheers,

- Stefan
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Can it be done? Yes.


Is it completely stupid to even consider such an option? Absolutely.

You don't share a share if you value your data at all.

But, if you still plan to do this illconceived method, you'll need to look up how to script your own mountpoints and samba config file to make it work. I will tell you that you will be fighting FreeNAS the whole way because it likes to control the config file and it won't let you share a share.
 

wumbaba

Cadet
Joined
May 22, 2013
Messages
3
Uhh, thanks for the reply i guess.

So the bottom line is, that FreeNAS won't let you share a share unless you hack your way around it, uphill, all the way?

For me this is then a 'No' for all practical purposes. Partially, because i have no clue what this hack would really involve and unable to assess the effort and risk, i'd rather drop the subject and stick with the status quo in the environment.

Cheers,

- Stefan
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Uhh, thanks for the reply i guess.

So the bottom line is, that FreeNAS won't let you share a share unless you hack your way around it, uphill, all the way?

For me this is then a 'No' for all practical purposes. Partially, because i have no clue what this hack would really involve and unable to assess the effort and risk, i'd rather drop the subject and stick with the status quo in the environment.

Cheers,

- Stefan

Good choice. Honestly, I'm not sure if I could even provide you help without trying to do it myself. It's one of those things that sounds great, but technically its ugly, and implementing it makes it worse.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
FreeNAS isn't really set up to mount something else's shares, it lacks the rigging to set that up. It was designed to be the thing providing the shares.

From a more general UNIX perspective, while you can do this, you're adding layers and complexity and points of failure and so it is generally considered a bad thing to do, even if you have something like FreeBSD where it could be made to work.

That being said, this sort of thing is generally possible on UNIX due to the compartmentalization aspects. CIFS (Samba) and AFP are both userland daemons that are really no different from a system point of view than any other userland program, they open and twiddle with files. It will be as strong as the weakest link, which usually ends up being something like file locking or concurrent access.
 

wumbaba

Cadet
Joined
May 22, 2013
Messages
3
I know it's ugly. I was not looking for technical execution brilliance but to show a concept. Re-sharing an SMB mount was borne out of the idea, that there is a win2k8 fileserver in that lab that i don't own, everyone in that lab accesses with a shared username/password and i sometimes need to let people across the organization use it for up- or downloading something (e.g. a VMWare OVF or somesuch). It currently means sharing this one set of lab credentials.

Now, without launching a full NAS-environment-port-it-to-something-proper-campaign first, i though to set up a FreeNAS box in the lab on a VM, mount the lab share (with the lab credentials) and temporarily share it out from FreNAS to whoever i want to give access to by having FreeNAS authenticate against the corporate directory and me having authorized that person manually on freeNAS.

By this, i'd not have to share the lab credentials, other people whoud not have to change the way they work for now, i get a proper access log i can tie to real people and i could show the rest of the lab users a working setup that might be the compelling artifact to plan and budget a transfer to a migration of the original fileshare to a proper, physical hardware based FreeNAS setup.

I'll probably set it up with local storage now and the authentication/authorization mechanism in place just for my own files and then try to make the 'sale' to the lab maintainers.

Thanks anyway for the answers, it helps me to cut my digging time.

- Stefan
 
Status
Not open for further replies.
Top