cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 06/15] GFS2: Add a document explaining GFS2's uevents
Date: Thu, 10 Sep 2009 12:27:58 +0100	[thread overview]
Message-ID: <1252582087-10007-7-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1252582087-10007-6-git-send-email-swhiteho@redhat.com>

This will be essential reading for anybody who wants to
understand how GFS2 interacts with the userland gfs_controld,
and the details of recovery.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
 Documentation/filesystems/gfs2-uevents.txt |  100 ++++++++++++++++++++++++++++
 1 files changed, 100 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/filesystems/gfs2-uevents.txt

diff --git a/Documentation/filesystems/gfs2-uevents.txt b/Documentation/filesystems/gfs2-uevents.txt
new file mode 100644
index 0000000..fd966dc
--- /dev/null
+++ b/Documentation/filesystems/gfs2-uevents.txt
@@ -0,0 +1,100 @@
+                              uevents and GFS2
+                             ==================
+
+During the lifetime of a GFS2 mount, a number of uevents are generated.
+This document explains what the events are and what they are used
+for (by gfs_controld in gfs2-utils).
+
+A list of GFS2 uevents
+-----------------------
+
+1. ADD
+
+The ADD event occurs at mount time. It will always be the first
+uevent generated by the newly created filesystem. If the mount
+is successful, an ONLINE uevent will follow.  If it is not successful
+then a REMOVE uevent will follow.
+
+The ADD uevent has two environment variables: SPECTATOR=[0|1]
+and RDONLY=[0|1] that specify the spectator status (a read-only mount
+with no journal assigned), and read-only (with journal assigned) status
+of the filesystem respectively.
+
+2. ONLINE
+
+The ONLINE uevent is generated after a successful mount or remount. It
+has the same environment variables as the ADD uevent. The ONLINE
+uevent, along with the two environment variables for spectator and
+RDONLY are a relatively recent addition (2.6.32-rc+) and will not
+be generated by older kernels.
+
+3. CHANGE
+
+The CHANGE uevent is used in two places. One is when reporting the
+successful mount of the filesystem by the first node (FIRSTMOUNT=Done).
+This is used as a signal by gfs_controld that it is then ok for other
+nodes in the cluster to mount the filesystem.
+
+The other CHANGE uevent is used to inform of the completion
+of journal recovery for one of the filesystems journals. It has
+two environment variables, JID= which specifies the journal id which
+has just been recovered, and RECOVERY=[Done|Failed] to indicate the
+success (or otherwise) of the operation. These uevents are generated
+for every journal recovered, whether it is during the initial mount
+process or as the result of gfs_controld requesting a specific journal
+recovery via the /sys/fs/gfs2/<fsname>/lock_module/recovery file.
+
+Because the CHANGE uevent was used (in early versions of gfs_controld)
+without checking the environment variables to discover the state, we
+cannot add any more functions to it without running the risk of
+someone using an older version of the user tools and breaking their
+cluster. For this reason the ONLINE uevent was used when adding a new
+uevent for a successful mount or remount.
+
+4. OFFLINE
+
+The OFFLINE uevent is only generated due to filesystem errors and is used
+as part of the "withdraw" mechanism. Currently this doesn't give any
+information about what the error is, which is something that needs to
+be fixed.
+
+5. REMOVE
+
+The REMOVE uevent is generated at the end of an unsuccessful mount
+or at the end of a umount of the filesystem. All REMOVE uevents will
+have been preceeded by at least an ADD uevent for the same fileystem,
+and unlike the other uevents is generated automatically by the kernel's
+kobject subsystem.
+
+
+Information common to all GFS2 uevents (uevent environment variables)
+----------------------------------------------------------------------
+
+1. LOCKTABLE=
+
+The LOCKTABLE is a string, as supplied on the mount command
+line (locktable=) or via fstab. It is used as a filesystem label
+as well as providing the information for a lock_dlm mount to be
+able to join the cluster.
+
+2. LOCKPROTO=
+
+The LOCKPROTO is a string, and its value depends on what is set
+on the mount command line, or via fstab. It will be either
+lock_nolock or lock_dlm. In the future other lock managers
+may be supported.
+
+3. JOURNALID=
+
+If a journal is in use by the filesystem (journals are not
+assigned for spectator mounts) then this will give the
+numeric journal id in all GFS2 uevents.
+
+4. UUID=
+
+With recent versions of gfs2-utils, mkfs.gfs2 writes a UUID
+into the filesystem superblock. If it exists, this will
+be included in every uevent relating to the filesystem.
+
+
+
-- 
1.6.2.5



  reply	other threads:[~2009-09-10 11:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 11:27 [Cluster-devel] GFS2: Pre-pull patch posting Steven Whitehouse
2009-09-10 11:27 ` [Cluster-devel] [PATCH 01/15] GFS2: Add online uevent to GFS2 Steven Whitehouse
2009-09-10 11:27   ` [Cluster-devel] [PATCH 02/15] GFS2: Add some more info to uevents Steven Whitehouse
2009-09-10 11:27     ` [Cluster-devel] [PATCH 03/15] GFS2: Improve error handling in inode allocation Steven Whitehouse
2009-09-10 11:27       ` [Cluster-devel] [PATCH 04/15] GFS2: Replace assertion with proper error handling Steven Whitehouse
2009-09-10 11:27         ` [Cluster-devel] [PATCH 05/15] GFS2: Add sysfs link to device Steven Whitehouse
2009-09-10 11:27           ` Steven Whitehouse [this message]
2009-09-10 11:27             ` [Cluster-devel] [PATCH 07/15] GFS2: free disk inode which is deleted by remote node -V2 Steven Whitehouse
2009-09-10 11:28               ` [Cluster-devel] [PATCH 08/15] GFS2: jumping to wrong label? Steven Whitehouse
2009-09-10 11:28                 ` [Cluster-devel] [PATCH 09/15] GFS2: Add "-o errors=panic|withdraw" mount options Steven Whitehouse
2009-09-10 11:28                   ` [Cluster-devel] [PATCH 10/15] GFS2: Add explanation of extended attr on-disk format Steven Whitehouse
2009-09-10 11:28                     ` [Cluster-devel] [PATCH 11/15] GFS2: Clean up of extended attribute support Steven Whitehouse
2009-09-10 11:28                       ` [Cluster-devel] [PATCH 12/15] GFS2: Rename eattr.[ch] as xattr.[ch] Steven Whitehouse
2009-09-10 11:28                         ` [Cluster-devel] [PATCH 13/15] GFS2: Remove no_formal_ino generating code Steven Whitehouse
2009-09-10 11:28                           ` [Cluster-devel] [PATCH 14/15] GFS2: Be extra careful about deallocating inodes Steven Whitehouse
2009-09-10 11:28                             ` [Cluster-devel] [PATCH 15/15] GFS2: Remove unused sysfs file Steven Whitehouse
     [not found] ` <1252593990.30578.180.camel@desktop>
2009-09-14  7:57   ` [Cluster-devel] Re: GFS2: Pre-pull patch posting Steven Whitehouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1252582087-10007-7-git-send-email-swhiteho@redhat.com \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).