Install NFS and share file

Source: Internet
Author: User

introduce NFS the installation, as well as shared files

nfs ( net FileSystem ), by using Span lang= "en-US" style= "FONT-SIZE:12.0PT; Font-family: "georgia", serif; Color:black ">nfs You can access remote files as you would with a local file.

Installation configuration

1. linux ubuntu nfsserver machine and nfs client machine installed separately

"NFSServer"

1

sudo apt-get install Nfs-kernel-server

"NFSClient"

1

sudo apt-get install Nfs-common

2.ConfigurationNFSA directory that needs to be shared, /etc/exportsAdd the directories you want to share at the bottom /home/hadoop/yxlshare

/etc/exports

1

/home/ Hadoop/yxlshare * (Rw,sync,no_root_squash)

3. restart Portmap and NFS server

1
2

sudo/ Etc/init.d/portmap Restart
sudo/etc/init.d/nfs-kernel-server restart

4. run the command to see what can be mounted

1

SHOWMOUNT-E

5. at this point, on the client, mount a local directory to nfs

You can add the fstab , let linux boot auto mount

Usage: Sudomount NFSServer of the IP: shared directory Local directory

Example

1

sudo Mount 192.168 1.111 :/home/hadoop/.ssh/home/hadoop/.ssh

4. at this point, both on the client and on the server , the modification of this directory can be reflected, so that multiple machines share a directory.

Instance

1. sharing hadoopssh authorization Files

when the wholeHadoopcluster, share aAuthorized_keys, so thatSSHJump. You can add a local directory~/nfs_share/, mounted onNFSon.

Then a soft connection is established so that the share is realized.

1

Ln-s ~/nfs_share/authorized_keys ~/.ssh/authorized_keys

2.namenodeha metadata Save

We all know hadoop namenode Zookeeper nfs , you can automatically switch the function.

will beNamenodethe metadata is saved in theNFS, whenNamenodeThe machine has been hung off, usingZookeeperFind another replacement machine, and then the replacement machine readsNFSmetadata on the data, which becomes theNamenode.

here is a diagram that illustrates the situation . Reference from http://www.cnblogs.com/commond/archive/2009/07/28/1533223.html

Nfs



From for notes (Wiz)

Install NFS and share file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.