ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How do mount a GFS filesystem without starting cluster in Red Hat

How do mount a GFS filesystem without starting cluster in Red Hat

原创 Linux操作系统 作者:andyxu 时间:2009-08-28 14:12:04 0 删除 编辑

A GFS filesystem can be mounted on one machine without the need to start the cluster services. The trick is to use the "lock_nolock" locking protocol.

There are a number of ways to do this:

  1. Via gfs_tool

    1. Make sure that the GFS module is loaded: 

        modprobe gfs
        

    2. To prepare GFS for the actual mount command, execute: 

        gfs_tool margs lockproto=lock_nolock
        

    3. Mount the GFS filesystem, like so: 

        mount -t gfs /dev/VolGroup00/LogVol01 /mount/point
        

      The gfs_tool command has to be performed for each GFS filesystem to be mounted. For example: 
       
       

        gfs_tool margs lockproto=lock_nolock
        mount -t gfs /dev/VolGroup00/LogVol02 /mount/data
        gfs_tool margs lockproto=lock_nolock
        mount -t gfs /dev/VolGroup00/LogVol03 /mount/shared
        

  2. Directly mounting 
      Another way to achieve the same result is to pass the lockproto option during mounting. The example above can be accomplished with the following commands: 
     
     

     mount -t gfs /dev/VolGroup00/LogVol02 /mount/data -o lockproto=lock_nolock
     mount -t gfs /dev/VolGroup00/LogVol03 /mount/shared -o lockproto=lock_nolock
     

    Again, make sure that the gfs module is loaded before mounting. 
     

Note: This proves useful for situations where the cluster is down and data needs to be accessed from GFS or for back-up purposes. Another machine with an attached tape device can also mount the gfs and back it up.

Warning: Although the gfs mount will be accessible to other machines, do not mount with the lock_nolock option on multiple machines at the same time or the data will be corrupted.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/110321/viewspace-613486/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-06-26

  • 博文量
    167
  • 访问量
    324448