Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2964477
  • 博文数量: 674
  • 博客积分: 17881
  • 博客等级: 上将
  • 技术积分: 4849
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-17 10:15
文章分类

全部博文(674)

文章存档

2013年(34)

2012年(146)

2011年(197)

2010年(297)

分类: LINUX

2011-06-22 10:18:34

 前些天,处理中心安装的那套Lustre1.6.4.3,其中一个机柜的client不能mount文件系统。 当时记录了一些信息,又在lustre discuss网站查找一番, 找到了一个解决办法,怎么说呢,这应该算是1.6.4.3版本的一个Bug。

    昨天,机器全部停机重启,所有的client都无法挂载文件系统了。 于是就按照前些天在网上找到的方法去解决问题。

        umount所有的Client、OST以及MDS,登陆MDS节点f114n23f

        mount -t ldiskfs /dev/sdb1 /lustre/mds
        cp /lustre/mds/last_rcvd /lustre/mds/last_rcvd.sav
        cp /lustre/mds/last_rcvd /tmp/last_rcvd.sav
        dd if=/lustre/mds/last_rcvd.sav of=/lustre/mds/last_rcvd bs=8k count=1
        umount /lustre/mds

        mount -t lustre /dev/sdb1 /lustre/mds

   以上的方法主要是把last_rcvd里面的client信息清除掉, 这样mds启动时就不会再recovery。

   重新启动后发现client仍然不能mount。

   心里隐隐有种不好的感觉,这下可麻烦了,因为这些数据急着要用。Lustre 1.6.4.3 客户端不能mount文件系统解决实例

   mount时错误信息如下:

       [root@f111n04f ~]# mount -a
        mount.lustre: mount at /l2data1 failed: Invalid argument
        This may have multiple causes.
        Is 'data' the correct filesystem name?
        Are the mount options correct?
        Check the syslog for more info.

  再看dmesg的信息:有这么几条值得注意

    LustreError: 10129:0:(obd_config.c:897:class_process_proc_param()) data-client-000001011c093800: unknown param stripecount=1
    LustreError: 10129:0:(obd_config.c:1062:class_config_llog_handler()) Err -22 on cfg command:
    Lustre:    cmd=cf00f 0:data-client  1:llite.stripecount=1
    LustreError: 15b-f: : The configuration from log 'data-client' failed (-22). Make sure this client and the MGS are running compatible versions of Lustre.
    LustreError: 15c-8: : The configuration from log 'data-client' failed (-22). This may be the result of communication errors between this node and the MGS, a bad configuration, or other errors. See the syslog for more information.
    LustreError: 10129:0:(llite_lib.c:1021:ll_fill_super()) Unable to process log: -22

 

   看了以上的信息,又咨询了科大周老师,估计是MDS的参数配置有问题。 因此有必要把MDS重新配置一下。

   于是,在MDS节点做如下设置:

       tunefs.lustre --erase-params  --writeconf --mgs --mdt --fsname=data /dev/sdb1

       (注:与当时mkfs.lustre时的参数基本一致,多了 --erase-params  --writeconf,意思是要删除以前的参数,重写新参数)

   执行tunefs.lustre只是改变配置参数,不会影响MDS和OST的数据。

   然后重启MDS, 这次Client端终于能挂载上了,心里一阵欢喜。Lustre 1.6.4.3 客户端不能mount文件系统解决实例

   但是,经过试验,写数据特别慢,读数据的速度基本正常。所有的OST上都发现了不少以下的信息

       slow commitrw commit 176s

       slow i_mutex 121s

       slow brw_start 121s

       slow direct_io 121s

    没办法了,只好把所有的OST参数也重新配置一下(按说不会是OST参数的问题,看来只能活马当死马医了)。只用tunefs.lustre对OST设置时,命令提示e2fsprogs版本不对,RHEL4上自带的tune2fs是1.35,必须使用1.40以上版本才行。去cfs网站下载了e2fsprogs-1.40.4.tar.gz,解压,执行./configure;make;make install, 后再使用tune2fs命令查看其版本,终于是1.40了。

    于是对所有的OST进行参数重新设置(假如MDS的地址变化了,也必须用此命令重新配置),以f114n23f上的两个OST为例:

      tunefs.lustre --erase-params --writeconf --ost --fsname=data /dev/sdb2

      tunefs.lustre --erase-params --writeconf --ost --fsname=data /dev/sdc1

   然后再对mds进行一下设置,解决一下1.6.4.3的一个bug

        lctl conf_param data.llite.statahead_max=0

   如果要对条带进行设置,执行以下命令即可(默认是单条带)

        lctl conf_param data-MDT0000.lov.stripecount=条带数   (-1为写所有条带)  

   经过以上设置, 重新启动Lustre文件系统,挂载了两个client, 经过多次试验, 刚开始时写速度还是不很稳定,经过一段时间的测试, 后来速度基本稳定,仅有一个节点的OST报出slow的信息,可以交付使用了。

   接下来再查查那个单独的OST的有没有什么异常。

http://blog.sina.com.cn/s/blog_53855c700100bsck.html

阅读(2819) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~