打印

Redhat Linux GFS Configuration

Redhat Linux GFS Configuration

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常用維護命令man 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

TOP

Redhat Linux GFS Configuration----- Part Two

TOP

還有一個網址推薦,非常全面的:http://www.uplooking.com/content/view/1666
技術的積累是一種收穫,問題的研究是一種享受;
Linux Command:http://terminal.wen.la
                               http://www.linuxdiyf.com/blog/?113478
HPUX:http://docs.hp.com/zh_cn/index.html
QQ:35257414
MSN:diveming@126.com

TOP


感谢一直以来您对我们的支持!
当前时区 GMT+8, 现在时间是 2008-11-22 18:54 京ICP证060528 号

Designed By 17DST