File Server for arbitrary directory

I’d like to use nethserver as a file server, but I want to store the data “somewhere else” - and not in /var/lib/nethserver/ibay.

Is it ok (and possibly supported?) if I do the following

  • cd /home

  • mkdir /myexternaldata (in reality, I want to use an iSCSI-NAS here)

  • cd /var/lib/nethserver/ibay

  • mkdir myNASshare

  • mount -B /home/myexternaldata /var/lib/nethserver/ibay/myNASshare

  • then I go to nethserver’s web interface and “create” a share named “myNASshare”.

At first sight, this seems to work - but I want to rule out that this procedure can collide with anything running invisibly,

Hi Ralf welcome here!

Check these posts:

Thanks, Alessio, and I had found these two before, too.
As I am quite new to Unix (including CentOS, of course), I am a bit weary still.

But I guess that I may take your links as a “Yes” to my main question?
This means, the way I described is “quite ok”, is it?

Almost :slight_smile: Just invert the 2 last steps:

  • go to nethserver’s web interface and “create” a share named “myNASshare”.
  • mount -B /home/myexternaldata /var/lib/nethserver/ibay/myNASshare (you can it to the fstab also)

This is not the best solution. but should work for most scenarios.

Why so? (Of course, I’d like to learn how things work :wink: …)

“My way” did work apparently, so why should I do it the other way around?
Can it be a problem if I create a share with the GUI if the directory already exists?
Or, why do you recommend “your way”?

Because the system takes care to correctly set all permissions.
“Your way” doesn’t break anything right now, but it may change in the future :wink: