Chapter 6. Using GNBD with Red Hat GFS

GNBD (Global Network Block Device) provides block-level storage access over an Ethernet LAN. GNBD components run as a client in a GFS node and as a server in a GNBD server node. A GNBD server node exports block-level storage from its local storage (either directly attached storage or SAN storage) to a GFS node.

This chapter describes how to use GNBD with Red Hat GFS and consists of the following sections:


Multipath GNBD is not available with Red Hat GFS 6.1. That is, device mapper multipath (dm-multipath) cannot use GNBD. GNBD without multipath is available.

6.1. GNBD Driver and Command Usage

The Global Network Block Device (GNBD) driver allows a node to export its local storage as a GNBD over a network so that other nodes on the network can share the storage. Client nodes importing the GNBD use it like any other block device. Importing a GNBD on multiple clients forms a shared storage configuration through which GFS can be used.

The GNBD driver is implemented through the following components.

Two user commands are available to configure GNBD:

6.1.1. Exporting a GNBD from a Server

The gnbd_serv daemon must be running on a node before it can export storage as a GNBD. You can start the gnbd_serv daemon running gnbd_serv as follows:

gnbd_serv: startup succeeded

Once local storage has been identified to be exported, the gnbd_export command is used to export it.


A server should not import the GNBDs to use them as a client would. If a server exports the devices uncached, they may also be used by ccsd and gfs. Usage

gnbd_export -d pathname -e gnbdname [-c]


Specifies a storage device to export.


Specifies an arbitrary name selected for the GNBD. It is used as the device name on GNBD clients. This name must be unique among all GNBDs exported in a network.


Export the device as read-only.


Enable caching. Reads from the exported GNBD and takes advantage of the Linux page cache.

By default, the gnbd_export command does not enable caching.


If you have been using GFS 5.2 or earlier and do not want to change your GNBD setup you should specify the -c option. Before GFS Release 5.2.1, Linux caching was enabled by default for gnbd_export. If the -c option is not specified, GNBD runs with a noticeable performance decrease. Also, if the -c option is not specified, the exported GNBD runs in timeout mode, using the default timeout value (the -t option). For more information about the gnbd_export command and its options, refer to the gnbd_export man page. Examples

This example exports device /dev/sdb2 as GNBD delta with cache enabled.

gnbd_export -d /dev/sdb1 -e delta -c

6.1.2. Importing a GNBD on a Client

The gnbd.ko kernel module must be loaded on a node before it can import GNBDs. When GNBDs are imported, device nodes are created for them in /dev/gnbd/ with the name assigned when they were exported. Usage

gnbd_import -i Server


Specifies a GNBD server by hostname or IP address from which to import GNBDs. All GNBDs exported from the server are imported on the client running this command. Example

This example imports all GNBDs from the server named nodeA.

gnbd_import -i nodeA