1

I am a linux newbie and I have a very basic question. I have three machines -

machineA
machineB
machineC

and all those machines have Ubuntu 12.04 installed in it and I have root access to all those three machines.

Now I am supposed to do below things -

Create mount point /opt/exhibitor/conf
Mount the directory in all servers.
 sudo mount <NFS-SERVER>:/opt/exhibitor/conf /opt/exhibitor/conf/

I have already created /opt/exhibitor/conf directory in all those three machines as mentioned above. Now I am not sure how to create Mount Point /opt/exhibitor/conf and then Mount the directory in all three servers?

Any thoughts?

0

2 Answers 2

1

I'm using Samba on my servers, since staff uses Windows on their machines. Sample entry in /etc/smb.conf:

[Projects]
    comment = Projects share
    read only = true
    path = /home/kovica/Projects
    browsable = yes
    writable = no
    valid users = kovica
    create mask = 0644

This entry shares directory /home/kovica/Projects. No one can write/delete/change files in it. The client has to authenticate and the only valid user is kovica. You add users to samba using

smbpasswd -a kovica

With this command you set a password to user kovica. This is the password client has to use while authenticating.

0

With NFS, it is something like this:

mount -t nfs machine2:/path/to/data /opt/exhibitor/conf/

This supposes that machine2 is defined in your /etc/host or DNS or you have to enter its IP address (assuming it is static.)

By editing your /etc/fstab, you can make it "permanent" as in each time you reboot it is there:

machine2:/path/to/data    /opt/exhibitor/conf   nfs    rsize=8192,wsize=8192,timeo=14,intr

The parameters are defined in the manual for nfs and mount:

man mount
man nfs

Note that I would imagine that one of the machines does not use the NFS mount since it itself has the "exhibitor" data.

One possible drawback from NFS, I have not used it in a long time, but when I did a while back, if a target machine goes down, reading or writing on that mount point blocks the application trying. And that's a low level kernel block which completely prevents even a KILL from terminating the process accessing the NFS. I would hope that was fixed with time, but you'd want to test to see what happens. The Samba solution is safer in that respect as it makes use of Network traffic and it is non-blocking, however, I find it hard to setup on my end... Another things I never used is an SSH based connection (opposed to NFS). I have never used it, I tested once, it works... You can create a tunnel and then use the tunnel to mount a directory. Very practical and also does not block like NFS. Plus all the traffic is encrypted. However it may be slower (Frankly with the fast servers we have today... you should be fine.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .