[OracleOSS] [TitleIndex] [WordIndex]

OCFS2/CManUnderO2CB/CManAndOCFS2ControlD/ControlMessages

OCFS2 Control Daemon Client Protocol

The ocfs2_controld daemon listens to clients for requests to mount and unmount filesystems. The gfs_controld had a network protocol for clients that was pretty much hard and fast. This document describes a protocol that fits ocfs2.

At first, I wanted to come up with a robust network protocol. You know, netstrings and the like. But I don't think I care enough. I'm going to follow their basic 256-byte packet scheme.

The Packet

All messages are a 256 byte packet. This packet size is controlled by the OCFS2_CONTROLD_MAXLINE define in ocfs2_controld.h. This allows all sends and receives to merely expect 256 bytes of payload.

The payload is a NUL terminated utf8 string. Thus, the maximum string is actually 255 ASCII characters. All data beyond the first NUL is currently unused.

Request Syntax

All requests begin with the request name. It is all capitals. Arguments to the request are separated by spaces. Spaces in an argument are currently not allowed, with the exception of the last argument. I'd probably go with urlencoding if I ever care to relax that requirement. The currently know requests are:

Response Syntax

All requests receive a status response. The status response message looks like this:

In addition, list requests receive the list before they receive status. First comes the item count, then each item, and finally a status message.

The Mount Protocol

The Unmount Protocol

The List Protocol

The Dump Protocol


2012-11-08 13:01