NFS shares - directories involved

Hi all,

I’m accessing the contents in Mycloud from my mediacenter via NFS without problems, but I don’t know if I’ve been lucky or what, and I’d like to to understand some things. I hope someone can give me some light on this.

Let’s say I create a new share AAA from the dashboard, doesn’t matter if private or public. Then using SSH I can see that it has been created as /DataVolume/shares/AAA, in the symlink shares/AAA, and also under /nfs/AAA.
First question… Why and how got this directory AAA into /nfs/? Automagically?

Other issue. I had a share called BBB. It was used and some time after it was renamed to CCC with the dashboard. Now in the directory structure I see

  • /DataVolume/shares/CCC
  • /shares/CCC
  • /nfs/BBB

When I update the contents in CCC, those new items appear also into /nfs/BBB, and that’s what I don’t understand.

Based in both cases I could think that /nfs/ directory is also a link to /DataVolume/shares, but in putty it seems like a normal directory.

Sorry if these are too basic or even silly questions, but I’d like to understand what I’m doing instead of just copy/paste commands from forums (as I normally do!)

Thanks in advance.

Hi there,

I have not tried this, lets see if another user can clear this out for you with some tips and information.

Hi there ruben :slight_smile:
so you have tried this right? Because last time I was trying to mount my shares via NFS I had to actually SSH into the device and manually edit /etc/exports so that my shares would be visible via /nfs/ sou either you have some other device, or you did actually turn it on, or my device is faulty because unless I edit that specific file I cannot see any shares mounted as /nfs/, or I am retard because Ive spent 2 days trying to figure out how to get it working :smiley: :smiley:

Hi mefistos,

I think I didn’t make it clear, of course I had to work on /etc/exports file, I had to add lines like /nfs/AAA * (rw,all_squash)

But my question is: Where are physically my data? In /nfs/AAA or /DataVolume/Shares/AAA?

What I’d like to understand is the link between those two directories.

(the only retard here is me, that I’m doing things without having a clue of what I’m doing…)

oh right:D well why dont you think of it as a link… your data are in /DataVolume/shares/AAA and /nfs/AAA is just a symbolic link where your data can be accessed… do you know how router works? port forwarding? its the same thing… behind the router you have device A, B, C and D… they are still there but if you want to access it from the internet you have to setup port forwarding and you connect to he routers IP not A directly because you cant see the A IP address…

EDIT: does it make sense?:smiley: nfs is not automatically enabled and you just cant connect directly to the share… you have to make a link between the nfs and share so when you connect to the nfs the device knows to which share it has to send you… and since the links are hardcoded in exports even when you change the shares name from AAA to BBB the /nfs/ link is still the same… unless you change it in the exports file…

1 Like

It totally make sense, mefistos!

That’s what I suspected in the beginning but I wasn’t able to identify /nfs/whateverdirectory as symlinks. I ran ‘readlink /nfs/AAA’ in order to identify it’s target (expecting /shares/AAA) but I got nothing. Probably I did it wrong, and it lead me to this confussion. I’ll try again when I get home.

Thanks for the help!

I used symbolic link as a word not an actual Linux term… symlinks are far beyond me… Nazar would probably give you better explanation…

PS: from what I understand symlinks are other way to connect two directories together not the same thing as nfs connection… therefore when you tried to read the link you didnt get anything as nfs is not equal to symlink… but dont take it as granted its just my understanding of it

To make links between files you need to use ln command. A symbolic link (also known as a soft link or symlink) consists of a special type of file that serves as a reference to another file or directory.