~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/filesystems/gfs2-uevents.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GPL-2.0
  2 
  3 ================
  4 uevents and GFS2
  5 ================
  6 
  7 During the lifetime of a GFS2 mount, a number of uevents are generated.
  8 This document explains what the events are and what they are used
  9 for (by gfs_controld in gfs2-utils).
 10 
 11 A list of GFS2 uevents
 12 ======================
 13 
 14 1. ADD
 15 ------
 16 
 17 The ADD event occurs at mount time. It will always be the first
 18 uevent generated by the newly created filesystem. If the mount
 19 is successful, an ONLINE uevent will follow.  If it is not successful
 20 then a REMOVE uevent will follow.
 21 
 22 The ADD uevent has two environment variables: SPECTATOR=[0|1]
 23 and RDONLY=[0|1] that specify the spectator status (a read-only mount
 24 with no journal assigned), and read-only (with journal assigned) status
 25 of the filesystem respectively.
 26 
 27 2. ONLINE
 28 ---------
 29 
 30 The ONLINE uevent is generated after a successful mount or remount. It
 31 has the same environment variables as the ADD uevent. The ONLINE
 32 uevent, along with the two environment variables for spectator and
 33 RDONLY are a relatively recent addition (2.6.32-rc+) and will not
 34 be generated by older kernels.
 35 
 36 3. CHANGE
 37 ---------
 38 
 39 The CHANGE uevent is used in two places. One is when reporting the
 40 successful mount of the filesystem by the first node (FIRSTMOUNT=Done).
 41 This is used as a signal by gfs_controld that it is then ok for other
 42 nodes in the cluster to mount the filesystem.
 43 
 44 The other CHANGE uevent is used to inform of the completion
 45 of journal recovery for one of the filesystems journals. It has
 46 two environment variables, JID= which specifies the journal id which
 47 has just been recovered, and RECOVERY=[Done|Failed] to indicate the
 48 success (or otherwise) of the operation. These uevents are generated
 49 for every journal recovered, whether it is during the initial mount
 50 process or as the result of gfs_controld requesting a specific journal
 51 recovery via the /sys/fs/gfs2/<fsname>/lock_module/recovery file.
 52 
 53 Because the CHANGE uevent was used (in early versions of gfs_controld)
 54 without checking the environment variables to discover the state, we
 55 cannot add any more functions to it without running the risk of
 56 someone using an older version of the user tools and breaking their
 57 cluster. For this reason the ONLINE uevent was used when adding a new
 58 uevent for a successful mount or remount.
 59 
 60 4. OFFLINE
 61 ----------
 62 
 63 The OFFLINE uevent is only generated due to filesystem errors and is used
 64 as part of the "withdraw" mechanism. Currently this doesn't give any
 65 information about what the error is, which is something that needs to
 66 be fixed.
 67 
 68 5. REMOVE
 69 ---------
 70 
 71 The REMOVE uevent is generated at the end of an unsuccessful mount
 72 or at the end of a umount of the filesystem. All REMOVE uevents will
 73 have been preceded by at least an ADD uevent for the same filesystem,
 74 and unlike the other uevents is generated automatically by the kernel's
 75 kobject subsystem.
 76 
 77 
 78 Information common to all GFS2 uevents (uevent environment variables)
 79 =====================================================================
 80 
 81 1. LOCKTABLE=
 82 --------------
 83 
 84 The LOCKTABLE is a string, as supplied on the mount command
 85 line (locktable=) or via fstab. It is used as a filesystem label
 86 as well as providing the information for a lock_dlm mount to be
 87 able to join the cluster.
 88 
 89 2. LOCKPROTO=
 90 -------------
 91 
 92 The LOCKPROTO is a string, and its value depends on what is set
 93 on the mount command line, or via fstab. It will be either
 94 lock_nolock or lock_dlm. In the future other lock managers
 95 may be supported.
 96 
 97 3. JOURNALID=
 98 -------------
 99 
100 If a journal is in use by the filesystem (journals are not
101 assigned for spectator mounts) then this will give the
102 numeric journal id in all GFS2 uevents.
103 
104 4. UUID=
105 --------
106 
107 With recent versions of gfs2-utils, mkfs.gfs2 writes a UUID
108 into the filesystem superblock. If it exists, this will
109 be included in every uevent relating to the filesystem.
110 
111 
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php