Chinaunix首页 | 论坛 | 博客
  • 博客访问: 103734185
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-02 08:55:59

                                                     Redhat GFS Configuration

                                                                         Part Two

1.           啟動Cluster服務并檢查狀態

            [root@test1 scrīpt]# service cman start

            Starting cluster:

            Loading modules... done

            Mounting configfs... done

          Starting ccsd... done

          Starting cman... done

            Starting daemons... done

          Starting fencing... done

[  OK  ]

 

[root@test2 ~]# service cman start

Starting cluster:

Loading modules... done

Mounting configfs... done

Starting ccsd... done

Starting cman... done

Starting daemons... done

Starting fencing... done

[  OK  ]

 

[root@test1 scrīpt]# service rgmanager  start

Starting Cluster Service Manager: [  OK  ]

 

[root@test2 scrīpt]# service rgmanager  start

Starting Cluster Service Manager: [  OK  ]

 

[root@test2 ~]# clustat

Member Status: Quorate

 

   Member Name                        ID   Status

  ------ ----                             ---- ------

  test1                                 1 Online, rgmanager

  test2                                 2 Online, Local, rgmanager

 

  Service Name         Owner (Last)                 State

  ------- ----             ----- ------                   -----

  service:gfs             test1                      started

 

2.        [root@test1 scrīpt]# sh gnbd_import.sh

            gnbd_import: created gnbd device lvol2

gnbd_recvd: gnbd_recvd started

Device name : lvol1

----------------------

             Minor # : 0

sysfs name : /block/gnbd0

           Server : 10.148.54.122

             Port : 14567

             State : Close Connected Clear

              Readonly : No

           Sectors : 20971520

 

Device name : lvol2

----------------------

          Minor # : 1

 sysfs name : /block/gnbd1

             Server : 10.148.54.122

             Port : 14567

             State : Close Connected Clear

   Readonly : No

             Sectors : 20971520

.   

             [root@test1 scrīpt]# df

Filesystem           1K-blocks  Used   Available Use%  Mounted on

/dev/cciss/c0d0p1     964028280  3821168 910447384  1%  /

tmpfs               481212 0    0      481212   0%  /dev/shm

/dev/gnbd/lvol1       10222816   20  10222796     1%  /sky

/dev/gnbd/lvol2       10222816   20  10222796      1%  /sky1

 

[root@test2 scrīpt]# sh gnbd_import.sh

           [root@test2 scrīpt]# df

 

3.        動態增加LV空間并擴展GFS文件系統

         [root@test1 scrīpt]# lvscan

            ACTIVE            '/dev/vg01/lvol1' [10.00 GB] inherit

 ACTIVE            '/dev/vg01/lvol2' [10.00 GB] inherit

 

             [root@test1 scrīpt]# df

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/cciss/c0d0p1    964028280   3821180 910447372   1% /

tmpfs              481212         0    481212   0% /dev/shm

/dev/gnbd/lvol1       10222816        20  10222796   1% /sky

/dev/gnbd/lvol2       10222816        20  10222796   1% /sky1

 

[root@test1 scrīpt]# lvextend -L +10G /dev/vg01/lvol1

 Extending logical volume lvol1 to 20.00 GB

 Logical volume lvol1 successfully resized

 

[root@test1 scrīpt]# lvscan

  ACTIVE            '/dev/vg01/lvol1' [20.00 GB] inherit

  ACTIVE            '/dev/vg01/lvol2' [10.00 GB] inherit

 

[root@test1 scrīpt]# gfs_grow /dev/gnbd/lvol1 /sky

FS: Mount Point: /sky

FS: Device: /dev/gnbd/lvol1

FS: Options: rw,hostdata=jid=0:id=196609:first=1

FS: Size: 2621439

DEV: Size: 5242880

Preparing to write new FS information...

Done.

Device has grown by less than 100 blocks.... skipping

 

[root@test1 scrīpt]# df

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/cciss/c0d0p1    964028280   3821208 910447344   1% /

tmpfs                   481212         0    481212   0% /dev/shm

/dev/gnbd/lvol1       20707920        28  20707892   1% /sky

/dev/gnbd/lvol2       10222816        20  10222796   1% /sky1

 

4.         維護注意事項:

 1>        重啟系統時候注意:

卸載Mount à GFS服務 à Cluster服務 à  reboot

 

      2>     GFS Hang﹐停掉Cluster服務后﹐直接去重啟主機開關﹐否則可能無法正常啟動。

 

 5.  GFS常用維護命令 gfs﹐詳細用法請參考man :

        #gfs_mkfs -h

        #gfs_grow -h

        #gfs_tool -h    

        #gfs_quota –h

        #gfs_debug –h

 

6.    LVM常用命令man lvm﹐詳細用法請參考man

 

7.    查看Cluster信息:

       #cat /var/log/messages

       #group_tool dump gfs

原文:http://www.linuxdiyf.com/blog/?110920/action_viewspace_itemid_2900.html

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