diff options
author | Aishwarya Pant <aishpant@gmail.com> | 2018-02-23 05:19:59 -0500 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2018-03-21 11:20:40 -0400 |
commit | bd15134a73d8226f1961164d450016a05e9222af (patch) | |
tree | 4969b601c4bf6074df695307df2c9a2d48fd16a0 | |
parent | 3b7ea9f015d682bb7a130f5c69e37affd8b9a9a4 (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-rbd | 203 |
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 @@ | |||
1 | What: /sys/bus/rbd/ | 1 | What: /sys/bus/rbd/add |
2 | Date: November 2010 | 2 | Date: Oct, 2010 |
3 | Contact: Yehuda Sadeh <yehuda@newdream.net>, | 3 | KernelVersion: v2.6.37 |
4 | Sage Weil <sage@newdream.net> | 4 | Contact: Sage Weil <sage@newdream.net> |
5 | Description: | 5 | Description: |
6 | (WO) Add rbd block device. | ||
6 | 7 | ||
7 | Being used for adding and removing rbd block devices. | 8 | Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>] |
8 | 9 | ||
9 | Usage: <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 | ||
13 | The snapshot name can be "-" or omitted to map the image read/write. A <dev-id> | ||
14 | will be assigned for any registered block device. If snapshot is used, it will | ||
15 | be mapped read-only. | ||
16 | 16 | ||
17 | Usage: <dev-id> [force] | 17 | What: /sys/bus/rbd/remove |
18 | Date: Oct, 2010 | ||
19 | KernelVersion: v2.6.37 | ||
20 | Contact: Sage Weil <sage@newdream.net> | ||
21 | Description: | ||
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 | ||
21 | Optional "force" argument which when passed will wait for running requests and | ||
22 | then unmap the image. Requests sent to the driver after initiating the removal | ||
23 | will be failed. (August 2016, since 4.9.) | ||
24 | 33 | ||
25 | What: /sys/bus/rbd/add_single_major | 34 | What: /sys/bus/rbd/add_single_major |
26 | Date: December 2013 | 35 | Date: Dec, 2013 |
27 | KernelVersion: 3.14 | 36 | KernelVersion: v3.14 |
28 | Contact: Sage Weil <sage@inktank.com> | 37 | Contact: Sage Weil <sage@newdream.net> |
29 | Description: Available only if rbd module is inserted with single_major | 38 | Description: |
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 | ||
36 | What: /sys/bus/rbd/remove_single_major | 48 | What: /sys/bus/rbd/remove_single_major |
37 | Date: December 2013 | 49 | Date: Dec, 2013 |
38 | KernelVersion: 3.14 | 50 | KernelVersion: v3.14 |
39 | Contact: Sage Weil <sage@inktank.com> | 51 | Contact: Sage Weil <sage@newdream.net> |
40 | Description: Available only if rbd module is inserted with single_major | 52 | Description: |
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 | ||
47 | Entries under /sys/bus/rbd/devices/<dev-id>/ | ||
48 | -------------------------------------------- | ||
49 | |||
50 | client_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 | |||
56 | client_id | ||
57 | |||
58 | The ceph unique client id that was assigned for this specific session. | ||
59 | |||
60 | cluster_fsid | ||
61 | 61 | ||
62 | The ceph cluster UUID. (August 2016, since 4.9.) | 62 | What: /sys/bus/rbd/supported_features |
63 | 63 | Date: Mar, 2017 | |
64 | config_info | 64 | KernelVersion: v4.11 |
65 | 65 | Contact: Sage Weil <sage@newdream.net> | |
66 | The string written into /sys/bus/rbd/add{,_single_major}. (August | 66 | Description: |
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 | |
69 | features | 69 | unsupported features that need to be disabled. |
70 | 70 | ||
71 | A hexadecimal encoding of the feature bits for this image. | 71 | |
72 | 72 | What: /sys/bus/rbd/devices/<dev-id>/size | |
73 | major | 73 | What: /sys/bus/rbd/devices/<dev-id>/major |
74 | 74 | What: /sys/bus/rbd/devices/<dev-id>/client_id | |
75 | The block device major number. | 75 | What: /sys/bus/rbd/devices/<dev-id>/pool |
76 | What: /sys/bus/rbd/devices/<dev-id>/name | ||
77 | What: /sys/bus/rbd/devices/<dev-id>/refresh | ||
78 | What: /sys/bus/rbd/devices/<dev-id>/current_snap | ||
79 | Date: Oct, 2010 | ||
80 | KernelVersion: v2.6.37 | ||
81 | Contact: Sage Weil <sage@newdream.net> | ||
82 | Description: | ||
83 | size: (RO) The size (in bytes) of the mapped block | ||
84 | device. | ||
76 | 85 | ||
77 | minor | 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 | ||
81 | name | 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 | ||
85 | image_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 | ||
90 | pool | ||
91 | 104 | ||
92 | The name of the storage pool where this rbd image resides. | 105 | What: /sys/bus/rbd/devices/<dev-id>/pool_id |
93 | An rbd image name is unique within its pool. | 106 | Date: Jul, 2012 |
107 | KernelVersion: v3.6 | ||
108 | Contact: Sage Weil <sage@newdream.net> | ||
109 | Description: | ||
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 | ||
95 | pool_id | ||
96 | 113 | ||
97 | The unique identifier for the rbd image's pool. This is | 114 | What: /sys/bus/rbd/devices/<dev-id>/image_id |
98 | a permanent attribute of the pool. A pool's id will never | 115 | What: /sys/bus/rbd/devices/<dev-id>/features |
99 | change. | 116 | Date: Oct, 2012 |
117 | KernelVersion: v3.7 | ||
118 | Contact: Sage Weil <sage@newdream.net> | ||
119 | Description: | ||
120 | image_id: (RO) The unique id for the rbd image. (For rbd | ||
121 | image format 1 this is empty.) | ||
100 | 122 | ||
101 | size | 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 | ||
105 | refresh | 127 | What: /sys/bus/rbd/devices/<dev-id>/parent |
128 | Date: Nov, 2012 | ||
129 | KernelVersion: v3.8 | ||
130 | Contact: Sage Weil <sage@newdream.net> | ||
131 | Description: | ||
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 | ||
110 | current_snap | 136 | What: /sys/bus/rbd/devices/<dev-id>/minor |
137 | Date: Dec, 2013 | ||
138 | KernelVersion: v3.14 | ||
139 | Contact: Sage Weil <sage@newdream.net> | ||
140 | Description: | ||
141 | (RO) The block device minor number. | ||
111 | 142 | ||
112 | The current snapshot for which the device is mapped. | ||
113 | 143 | ||
114 | snap_id | 144 | What: /sys/bus/rbd/devices/<dev-id>/snap_id |
145 | What: /sys/bus/rbd/devices/<dev-id>/config_info | ||
146 | What: /sys/bus/rbd/devices/<dev-id>/cluster_fsid | ||
147 | What: /sys/bus/rbd/devices/<dev-id>/client_addr | ||
148 | Date: Aug, 2016 | ||
149 | KernelVersion: v4.9 | ||
150 | Contact: Sage Weil <sage@newdream.net> | ||
151 | Description: | ||
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 | ||
118 | parent | 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'. | ||