aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAishwarya Pant <aishpant@gmail.com>2018-02-23 05:19:59 -0500
committerJonathan Corbet <corbet@lwn.net>2018-03-21 11:20:40 -0400
commitbd15134a73d8226f1961164d450016a05e9222af (patch)
tree4969b601c4bf6074df695307df2c9a2d48fd16a0
parent3b7ea9f015d682bb7a130f5c69e37affd8b9a9a4 (diff)
block: rbd: update sysfs interface
The existing sysfs interface has been updated to be in the same format as described in Documentation/ABI/README. This will be useful for scripting and tracking changes in the ABI. Attributes have been grouped by functionality and/or the date on which they were added. There are a couple of more changes: - The attributes have been annotated with file permissions RO/RW/WO. - Added description of the bus attribute supported_features Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd203
1 files changed, 122 insertions, 81 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index f208ac58d613..cc30bee8b5f4 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -1,121 +1,162 @@
1What: /sys/bus/rbd/ 1What: /sys/bus/rbd/add
2Date: November 2010 2Date: Oct, 2010
3Contact: Yehuda Sadeh <yehuda@newdream.net>, 3KernelVersion: v2.6.37
4 Sage Weil <sage@newdream.net> 4Contact: Sage Weil <sage@newdream.net>
5Description: 5Description:
6 (WO) Add rbd block device.
6 7
7Being used for adding and removing rbd block devices. 8 Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>]
8 9
9Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>] 10 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
10 11
11 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add 12 The snapshot name can be "-" or omitted to map the image
13 read/write. A <dev-id> will be assigned for any registered block
14 device. If snapshot is used, it will be mapped read-only.
12 15
13The snapshot name can be "-" or omitted to map the image read/write. A <dev-id>
14will be assigned for any registered block device. If snapshot is used, it will
15be mapped read-only.
16 16
17Usage: <dev-id> [force] 17What: /sys/bus/rbd/remove
18Date: Oct, 2010
19KernelVersion: v2.6.37
20Contact: Sage Weil <sage@newdream.net>
21Description:
22 (WO) Remove rbd block device.
23
24 Usage: <dev-id> [force]
18 25
19 $ echo 2 > /sys/bus/rbd/remove 26 $ echo 2 > /sys/bus/rbd/remove
27
28 Optional "force" argument which when passed will wait for
29 running requests and then unmap the image. Requests sent to the
30 driver after initiating the removal will be failed. (August
31 2016, since 4.9.)
20 32
21Optional "force" argument which when passed will wait for running requests and
22then unmap the image. Requests sent to the driver after initiating the removal
23will be failed. (August 2016, since 4.9.)
24 33
25What: /sys/bus/rbd/add_single_major 34What: /sys/bus/rbd/add_single_major
26Date: December 2013 35Date: Dec, 2013
27KernelVersion: 3.14 36KernelVersion: v3.14
28Contact: Sage Weil <sage@inktank.com> 37Contact: Sage Weil <sage@newdream.net>
29Description: Available only if rbd module is inserted with single_major 38Description:
39 (WO) Available only if rbd module is inserted with single_major
30 parameter set to true. 40 parameter set to true.
31 Usage is the same as for /sys/bus/rbd/add. If present, 41
42 Usage is the same as for /sys/bus/rbd/add. If present, this
32 should be used instead of the latter: any attempts to use 43 should be used instead of the latter: any attempts to use
33 /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is 44 /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available
34 available will fail for backwards compatibility reasons. 45 will fail for backwards compatibility reasons.
46
35 47
36What: /sys/bus/rbd/remove_single_major 48What: /sys/bus/rbd/remove_single_major
37Date: December 2013 49Date: Dec, 2013
38KernelVersion: 3.14 50KernelVersion: v3.14
39Contact: Sage Weil <sage@inktank.com> 51Contact: Sage Weil <sage@newdream.net>
40Description: Available only if rbd module is inserted with single_major 52Description:
53 (WO) Available only if rbd module is inserted with single_major
41 parameter set to true. 54 parameter set to true.
42 Usage is the same as for /sys/bus/rbd/remove. If present, 55
56 Usage is the same as for /sys/bus/rbd/remove. If present, this
43 should be used instead of the latter: any attempts to use 57 should be used instead of the latter: any attempts to use
44 /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is 58 /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
45 available will fail for backwards compatibility reasons. 59 available will fail for backwards compatibility reasons.
46 60
47Entries under /sys/bus/rbd/devices/<dev-id>/
48--------------------------------------------
49
50client_addr
51
52 The ceph unique client entity_addr_t (address + nonce).
53 The format is <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
54 '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.)
55
56client_id
57
58 The ceph unique client id that was assigned for this specific session.
59
60cluster_fsid
61 61
62 The ceph cluster UUID. (August 2016, since 4.9.) 62What: /sys/bus/rbd/supported_features
63 63Date: Mar, 2017
64config_info 64KernelVersion: v4.11
65 65Contact: Sage Weil <sage@newdream.net>
66 The string written into /sys/bus/rbd/add{,_single_major}. (August 66Description:
67 2016, since 4.9.) 67 (RO) Displays the features supported by the rbd module so that
68 68 userspace can generate meaningful error messages and spell out
69features 69 unsupported features that need to be disabled.
70 70
71 A hexadecimal encoding of the feature bits for this image. 71
72 72What: /sys/bus/rbd/devices/<dev-id>/size
73major 73What: /sys/bus/rbd/devices/<dev-id>/major
74 74What: /sys/bus/rbd/devices/<dev-id>/client_id
75 The block device major number. 75What: /sys/bus/rbd/devices/<dev-id>/pool
76What: /sys/bus/rbd/devices/<dev-id>/name
77What: /sys/bus/rbd/devices/<dev-id>/refresh
78What: /sys/bus/rbd/devices/<dev-id>/current_snap
79Date: Oct, 2010
80KernelVersion: v2.6.37
81Contact: Sage Weil <sage@newdream.net>
82Description:
83 size: (RO) The size (in bytes) of the mapped block
84 device.
76 85
77minor 86 major: (RO) The block device major number.
78 87
79 The block device minor number. (December 2013, since 3.14.) 88 client_id: (RO) The ceph unique client id that was assigned
89 for this specific session.
80 90
81name 91 pool: (RO) The name of the storage pool where this rbd
92 image resides. An rbd image name is unique
93 within its pool.
82 94
83 The name of the rbd image. 95 name: (RO) The name of the rbd image.
84 96
85image_id 97 refresh: (WO) Writing to this file will reread the image
98 header data and set all relevant data structures
99 accordingly.
86 100
87 The unique id for the rbd image. (For rbd image format 1 101 current_snap: (RO) The current snapshot for which the device
88 this is empty.) 102 is mapped.
89 103
90pool
91 104
92 The name of the storage pool where this rbd image resides. 105What: /sys/bus/rbd/devices/<dev-id>/pool_id
93 An rbd image name is unique within its pool. 106Date: Jul, 2012
107KernelVersion: v3.6
108Contact: Sage Weil <sage@newdream.net>
109Description:
110 (RO) The unique identifier for the rbd image's pool. This is a
111 permanent attribute of the pool. A pool's id will never change.
94 112
95pool_id
96 113
97 The unique identifier for the rbd image's pool. This is 114What: /sys/bus/rbd/devices/<dev-id>/image_id
98 a permanent attribute of the pool. A pool's id will never 115What: /sys/bus/rbd/devices/<dev-id>/features
99 change. 116Date: Oct, 2012
117KernelVersion: v3.7
118Contact: Sage Weil <sage@newdream.net>
119Description:
120 image_id: (RO) The unique id for the rbd image. (For rbd
121 image format 1 this is empty.)
100 122
101size 123 features: (RO) A hexadecimal encoding of the feature bits
124 for this image.
102 125
103 The size (in bytes) of the mapped block device.
104 126
105refresh 127What: /sys/bus/rbd/devices/<dev-id>/parent
128Date: Nov, 2012
129KernelVersion: v3.8
130Contact: Sage Weil <sage@newdream.net>
131Description:
132 (RO) Information identifying the chain of parent images in a
133 layered rbd image. Entries are separated by empty lines.
106 134
107 Writing to this file will reread the image header data and set
108 all relevant datastructures accordingly.
109 135
110current_snap 136What: /sys/bus/rbd/devices/<dev-id>/minor
137Date: Dec, 2013
138KernelVersion: v3.14
139Contact: Sage Weil <sage@newdream.net>
140Description:
141 (RO) The block device minor number.
111 142
112 The current snapshot for which the device is mapped.
113 143
114snap_id 144What: /sys/bus/rbd/devices/<dev-id>/snap_id
145What: /sys/bus/rbd/devices/<dev-id>/config_info
146What: /sys/bus/rbd/devices/<dev-id>/cluster_fsid
147What: /sys/bus/rbd/devices/<dev-id>/client_addr
148Date: Aug, 2016
149KernelVersion: v4.9
150Contact: Sage Weil <sage@newdream.net>
151Description:
152 snap_id: (RO) The current snapshot's id.
115 153
116 The current snapshot's id. (August 2016, since 4.9.) 154 config_info: (RO) The string written into
155 /sys/bus/rbd/add{,_single_major}.
117 156
118parent 157 cluster_fsid: (RO) The ceph cluster UUID.
119 158
120 Information identifying the chain of parent images in a layered rbd 159 client_addr: (RO) The ceph unique client
121 image. Entries are separated by empty lines. 160 entity_addr_t (address + nonce). The format is
161 <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
162 '[1:2:3:4:5:6:7:8]:1234/5678'.