手机版
你好,游客 登录 注册
背景:
阅读新闻

RedHat 5.4安装pvfs-2.8.2全过程(集群)

[日期:2011-12-25] 来源:Linux社区  作者:amaowolf [字体:大 中 小]

5. 测试(在client端测试借助pvfs2-ping, pvfs-cp, pvfs-ls命令来测试)

[root@www.linuxidc.com ~]# ~/program/pvfs2-install/bin/pvfs2-ping -m /mnt/pvfs2/

  1. (1) Parsing tab file...  
  2.   
  3. (2) Initializing system interface...  
  4.   
  5. (3) Initializing each file system found in tab file: /etc/pvfs2tab...  
  6.   
  7.    PVFS2 servers: tcp://www.linuxidc.net:3334  
  8.    Storage name: pvfs2-fs  
  9.    Local mount point: /mnt/pvfs2  
  10.    /mnt/pvfs2: Ok  
  11.   
  12. (4) Searching for /mnt/pvfs2/ in pvfstab...  
  13.   
  14.    PVFS2 servers: tcp://www.linuxidc.net:3334  
  15.    Storage name: pvfs2-fs  
  16.    Local mount point: /mnt/pvfs2  
  17.   
  18.    meta servers:  
  19.    tcp://www.linuxidc.com:3334  
  20.   
  21.    data servers:  
  22.    tcp://www.linuxidc.com:3334  
  23.    tcp://www.linuxidc.net:3334  
  24.   
  25. (5) Verifying that all servers are responding...  
  26.   
  27.    meta servers:  
  28.    tcp://www.linuxidc.com:3334 Ok  
  29.   
  30.    data servers:  
  31.    tcp://www.linuxidc.com:3334 Ok  
  32.    tcp://www.linuxidc.net:3334 Ok  
  33.   
  34. (6) Verifying that fsid 1249973606 is acceptable to all servers...  
  35.   
  36.    Ok; all servers understand fs_id 1249973606  
  37.   
  38. (7) Verifying that root handle is owned by one server...  
  39.   
  40.    Root handle: 1048576  
  41.      Ok; root handle is owned by exactly one server.  
  42.   
  43. =============================================================  
  44.   
  45. The PVFS2 filesystem at /mnt/pvfs2/ appears to be correctly configured.  

[root@www.linuxidc.com ~]# ~/program/pvfs2-install/bin/pvfs2-ls /mnt/pvfs2

lost+found  //第一次ls,没任何东西

[root@www.linuxidc.com ~]# ~/program/pvfs2-install/bin/pvfs2-cp -t /usr/lib/libc.a /mnt/pvfs2/testfile

Wrote 2817820 bytes in 1.041003 seconds. 2.581436 MB/seconds     //cp了一些东西放进去

[root@www.linuxidc.com ~]# ~/program/pvfs2-install/bin/pvfs2-ls -alh /mnt/pvfs2

drwxrwxrwx    1 root     root            4.0K 2011-12-23 18:37 .       //果真有东西了

drwxrwxrwx    1 root     root            4.0K 2011-12-23 18:37 .. (faked)

-rw-r--r--    1 root     root            2.7M 2011-12-23 18:37 testfile

drwxrwxrwx    1 root     root            4.0K 2011-12-23 18:06 lost+found

[root@www.linuxidc.com /]# ~/program/pvfs2-install/bin/pvfs2-cp -t /mnt/pvfs2/testfile /tmp/testfile-out

Wrote 2817820 bytes in 0.157310 seconds. 17.082721 MB/seconds  //把放进去的东西再拷出来,放在/tmp下面

[root@www.linuxidc.com /]# diff /tmp/testfile-out /usr/lib/libc.a   //把考出来的文件和原来的文件比较,发现一模一样

6.总结

(1)client把I/O servers(不管I/O server有多少个节点)之一挂在到本地/mnt/pvfs2目录后,就可以像访问本地目录一样对其进行读/写/操作了

(2)唯一不同的是,不是用linux自带的读写命令(如ls, cp),而要用到pvfs2的命令(pvfs2-ls, pvfs2-cp),故在client上也应该把这些命令文件放置好

(3)为了在client上执行命令时,不用绝对路径或者相对路径,可以把防止pvfs2命令的目录加入到环境变量文件中

(4)通过client给/mnt/pvfs2写入一些文件后,分别在www.linuxidc.com和www.linuxidc.net两个节点上通过linux自带的ll查看本地存储目录/pvfs2-storage-space/

  1. [root@www.linuxidc.com /]# ls -l /pvfs2-storage-space/  
  2. total 20  
  3. drwxr-xr-x 4 root root 4096 Dec 23 18:30 4a811566  
  4. -rw------- 1 root root 8192 Dec 23 18:06 collections.db  
  5. -rw------- 1 root root 8192 Dec 23 18:06 storage_attributes.db  
  6. [root@www.linuxidc.com /]# ssh www.linuxidc.net ls -l /pvfs2-storage-space/  
  7. total 20  
  8. drwxr-xr-x 4 root root 4096 Dec 23 18:29 4a811566  
  9. -rw------- 1 root root 8192 Dec 23 18:06 collections.db  
  10. -rw------- 1 root root 8192 Dec 23 18:06 storage_attributes.db  

以上情况说明,文件是被均衡地放在了两个节点上???哪怕是非常小的文件??

linux
相关资讯       集群  redhat 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款