RedHat5.4 pvfs-2.8.2 installation process (cluster)

Source: Internet
Author: User
1. Configure the environment (root User) (1) Configure/etc/hosts202.117.10.37www.linuxidc.com202.117.10.50www.linuxidc.net (2) Configure password-less login (on www.linuxidc.com) [root@www.linuxidc.com

1. Configure the environment (root User)

(1) Configure/etc/hosts on the two machines respectively

202.117.10.37 www.linuxidc.com

202.117.10.50 www.linuxidc.net

(2) Configure logon without a password (on www.linuxidc.com)

Root@www.linuxidc.com ~ # Ssh-keygen-t rsa

Root@www.linuxidc.com ~ # Cp ~ /. Ssh/id_rsa.pub ~ /. Ssh/authorized_keys

Root@www.linuxidc.com ~ # Scp ~ /. Ssh/* root@www.linuxidc.net :~ /. Ssh/

(3) machine role assignment

Www.linuxidc.com serves as the metadata server

Www.linuxidc.com and www.linuxidc.net are both I/O servers.

Both www.linuxidc.com and www.linuxidc.net serve as clients at the same time.

2. Install the pvfs-2.8.2 (the root user allocates the compilation and installation on www.linuxidc.com and www.linuxidc.net)

(0) Preparation

Create the program/pvfs2-install directory under/root as the installation directory

Softdirectory (set pvfs-2.8.2.tar.gz)

(1) Extract

[Root@www.linuxidc.com soft] # tar-zxvf pvfs-2.8.2.tar.gz

(2) Compile and install

[Root@www.linuxidc.com pvfs-2.8.2] #./configure-prefix =/root/program/pvfs2-install/

Root@www.linuxidc.com pvfs-2.8.2 # make

[Root@www.linuxidc.com pvfs-2.8.2] # make install

3. Server Configuration

(1) www.linuxidc.com serves as the metadata server, www.linuxidc.com and www.linuxidc.net serves as the I/O node.

(2) generate a configuration file on www.linuxidc.com

Root@www.linuxidc.com ~ #~ /Program/pvfs2-install/bin/pvfs2-genconfig/etc/pvfs2-fs.conf

  1. **************************************** ******************************
  2. Welcome to the PVFS2 Configuration Generator:
  3. This interactive script will generate configuration files suitable
  4. For use with a new PVFS2 file system. Please see the PVFS2 quickstart
  5. Guide for details.
  6. **************************************** ******************************
  7. You must first select the network protocol that your file system will use.
  8. The only currently supported options are "tcp", "gm", "mx", "ib", and "portals ".
  9. (For multi-homed invocations, use e.g. "ib, tcp ".)
  10. * Enter protocol type [Default is tcp]:
  11. Choose a TCP/IP port for the servers to listen on. Note that this
  12. Script assumes that all servers will use the same port number.
  13. * Enter port number [Default is 3334]:
  14. Choose a directory for each server to store data in.
  15. * Enter directory name: [Default is/pvfs2-storage-space]:
  16. Choose a file for each server to write log messages.
  17. * Enter log file location [Default is/tmp/pvfs2-server.log]:
  18. Next you must list the hostnames of the machines that will act
  19. I/O servers. Acceptable syntax is "node1, node2,..." or "node {#-#,#,#}".
  20. * Enter hostnames [Default is localhost]: amao99 {1-2}
  21. Use same servers for metadata? (Recommended)
  22. * Enter yes or no [Default is yes]: no
  23. Now list the hostnames of the machines that will act as Metadata
  24. Servers. This list may or may not overlap with the I/O server list.
  25. * Enter hostnames [Default is localhost]: www.linuxidc.com
  26. Configured a total of 2 servers:
  27. 2 of them are I/O servers.
  28. 1 of them are Metadata servers.
  29. * Wocould you like to verify server list (y/n) [Default is n]? Y
  30. * ***** I/O servers:
  31. Www.linuxidc.com
  32. Www.linuxidc.net
  33. * ***** Metadata servers:
  34. Www.linuxidc.com
  35. * Does this look OK (y/n) [Default is y]? Y
  36. Writing fs config file... done

(3) copy the configuration file from www.linuxidc.com to www.linuxidc.net and place it in the same path.

Root@www.linuxidc.com ~ # Scp/etc/pvfs2-fs.conf (www.linuxidc.net:/etc/

(4) set the service on www.linuxidc.com and www.linuxidc.net respectively, and start the service upon startup.

Root@www.linuxidc.com ~ # Cp ~ /Soft/pvfs-2.8.2/examples/pvfs2-server.rc/etc/rc. d/init. d/pvfs2-server

Root@www.linuxidc.com ~ # Chmod a + x/etc/rc. d/init. d/pvfs2-server

Root@www.linuxidc.com ~ # Chkconfig pvfs2-server on

The execution on www.linuxidc.net is the same as that on www.linuxidc.com. You can also perform the following operations on www.linuxidc.net:

Root@www.linuxidc.com ~ # Scp ~ /Soft/pvfs-2.8.2/examples/pvfs2-server.rc www.linuxidc.net:/etc/rc. d/init. d/pvfs2-server

Root@www.linuxidc.com ~ # Ssh www.linuxidc.net/bin/chmod a + x/etc/rc. d/init. d/pvfs2-server

Root@www.linuxidc.com ~ # Ssh www.linuxidc.net/sbin/chkconfig pvfs2-server on

(5) create a bucket (on two IO servers respectively)

Root@www.linuxidc.com ~ #~ /Program/pvfs2-install/sbin/pvfs2-server/etc/pvfs2-fs.conf-f

Root@www.linuxidc.com ~ # Ll/will find more/pvfs2-storage-space

Also executed on www.linuxidc.net

Root@www.linuxidc.net ~ #~ /Program/pvfs2-install/sbin/pvfs2-server/etc/pvfs2-fs.conf-f

Root@www.linuxidc.net ~ # Ll/will find more/pvfs2-storage-space

(6) manually start metadata server and I/O server (that is, execute on www.linuxidc.com and www.linuxidc.net)

Root@www.linuxidc.net ~ #~ /Programs/pvfs2-install/sbin/pvfs2-server/etc/pvfs2-fs.conf

[S 12/23] PVFS2 Server on node www.linuxidc.net version 2.8.2 starting...

You can use netstat-nplt to check that the service has been started and occupies port 3344.

Also executed on www.linuxidc.net

Root@www.linuxidc.net ~ #~ /Programs/pvfs2-install/sbin/pvfs2-server/etc/pvfs2-fs.conf

4. Client Configuration

Also, use www.linuxidc.com as the client (any other machine can be used as the client), create a mount point, and set the mount point to the pvfs2tab file.

Root@www.linuxidc.com ~ # Mkdir/mnt/pvfs2

Root@www.linuxidc.com ~ # Touch/etc/pvfs2tab

Root@www.linuxidc.com ~ # Chmod a + r/etc/pvfs2tab

Root@www.linuxidc.com ~ # Vi/etc/pvfs2tab

Root@www.linuxidc.com ~ # Cat/etc/pvfs2tab

Tcp: // www.linuxidc.net: 3334/pvfs2-fs/mnt/pvfs2 pvfs2 defaults, noauto 0 # noauto on mount-

Note:

(1) In fact, it is also possible to put the above line into/etc/fstab, and there is no need to create the/etc/pvfs2tab file.

(2) In this example, there are two storage nodes: www.linuxidc.com and www.linuxidc.net. when the client is attached to the server, the server can be any one of them because the server is of an equal identity, in this example, tcp: // www.linuxidc.net: 3334/pvfs2-fs

(3) When multiple clients exist, different clients should not be mounted on the same server as much as possible, which can distribute the input/output load.

(4) After the configuration is complete, restart the client and the client will be automatically mounted. Then you can test it.

Related Article

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.