|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP LINKS YOU MUST CLICK ON Filesystems
Red Hat's Global File System on Fedora Core 4
A Fedora Core 4 distributed network file system
By: Richard Petersen
Dec. 27, 2005 09:45 PM
Digg This!
Page 1 of 2
next page »
With Fedora Core 4, Red Hat, for the first time, released its Global File System (GFS) as an open sourced, freely available distributed network file system. A distributed network file system builds on the basic concept of NFS as well as RAID techniques to create a file system implemented on multiple hosts across a large network, in effect, distributing the same file system among different hosts at a very low level.
GFS separates the physical implementation from the logical format. A GFS file system appears as a set of logical volumes on one seamless logical device that can be mounted easily to any directory on your Linux file system. The logical volumes are created and managed by the Cluster Logical Volume Manager (CLVM), which is a cluster-enabled LVM. Physically, the file system is constructed from different storage resources known as cluster nodes distributed across your network. The administrator manages these nodes, providing needed mirroring or storage expansion. Should a node fail, GFS can fence a system off until it has recovered the node. Setting up a GFS file system requires planning. You have to determine ahead-of-time different settings such as the number and names of your GFS file systems, the nodes that will be able to mount the file systems, fencing methods, and the partitions and disks to use. GFS, as implemented by Red Hat, uses a variety of install packages that do not appear related just by their names. This article provides a map of what packages you will need and how they are related, as well as basic implementation and operations for a GFS file system.
GFS Packages
GFS-6.1-0.pre22.3.i386.rpm Cluster configuration tools and servers are kept in the Cluster Configuration System package, ccs. Fencing tools used to isolate failed resources are kept in the fence package. The tools and servers needed to implement a GNBD form of GFS are located in the gnbd package. In addition, you need the kernel modules with the drivers to support GNBD devices, located in a gnbd-kernel package. LVM cluster support is located in the lvm2-cluster package. For gndb be sure to choose the one for your kernel. The Fedora 4 package names are listed here:
ccs To run a cluster, you need both a cluster manager and a locking mechanism. There are two choices: the Cluster Manager (cman ) with the Distributed Lock Manager (dlm) or the Grand Unified Locking Manager (gulm). cman with dlm implements cluster management and locking directly using modules: cman and dlm. cman manages connections between cluster devices and services, and uses dlm to provide locking. The dlm locking mechanism operates as a kernel module with supporting libraries and is invoked with the cman script. gulm is an older method that operates, instead, as a server, providing both cluster management and locking. gulm can be invoked by the lock_gulmd script. It is considered an alternative to cman and dlm. You only need to install either gulm or the cman and dlm packages.
cman You can't run both cman and gulm at the same time. The cman script checks the /etc/cluster.conf file for the gulm configuration, and if found will not load the cman kernel module. Use the cman_tool to have a node join a cluster or remove a node from the cluster.
GFS Service Scripts
service ccsd start As noted previously, you have a choice between two different locking mechanisms, gulm and dlm. The dlm method is used in the previous example, which is invoked by the cman script. The clvmd script both starts the clvmd server and uses LVM commands vgscan and vgchange to locate and activate your cluster devices. The gfs service script will mount GFS file systems to the locations specified in the /etd/fstab file. Entries are needed for all the GFS file systems you want to mount in /etc/fstab. The stop option will unmount the file systems.
Implementing a GFS File System You can then configure your system with the Cluster Configuration System. Create a /etc/cluster.conf file and set up your configuration. The configuration will include information like the nodes used, fencing methods, and the locking method used (gulm or dlm). Consult the cluster.conf Man page for configuration details. For configuration you can also use the system-config-cluster tool, which provides an easy-to-use GUI interface, or set up your GFS file system (still under development for Fedora Core 4). You can select locking and fence methods as well as mount points and devices, and then start the ccsd server and test the configuration with the ccs_test tool.
service ccsd start You then use the ccs_tool to create cluster.ccs, fence.ccs, and node.ccs configuration files. These files are organized into a CCS archive that is placed on each node and cluster device. On each node start the ccsd configuration, fenced fencing server, and the locking method you want to use like dlm. Check the respective Man pages for details on the locking servers. You can start the servers with their service scripts as noted previously. To create new file systems on the cluster devices, use the gfs_mkfs command and then mount them with the -t gfs option. The following command creates a GFS file system on the /dev/gv0/mgfs and then mounts it to the /gfs1 directory. For gfs_mkfs, the -t option indicates the lock table used and the -p option specifies the lock protocol. The -j option specifies the number of journals.
gfs_mkfs -t mycluster:mygfs -p lock_dlm -j 2 /dev/vg0/mgfs To have the gfs service script mount the GFS file system for you, you need to place an entry for it in the /etc/fstab file. If you don't want the file system automatically mounted, add the noauto option. With GFS /etc/fstab entries, you can then use the gfs script to mount the GFS file system. Page 1 of 2 next page »
LATEST LINUX STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||