blob: 417a2fe21be1effd9bde442199a6b217c9011c52 [file] [log] [blame]
Aishwarya Pantbd151342018-02-23 15:49:59 +05301What: /sys/bus/rbd/add
2Date: Oct, 2010
3KernelVersion: v2.6.37
4Contact: Sage Weil <sage@newdream.net>
Yehuda Sadehdfc56062010-11-19 14:51:04 -08005Description:
Aishwarya Pantbd151342018-02-23 15:49:59 +05306 (WO) Add rbd block device.
Yehuda Sadehdfc56062010-11-19 14:51:04 -08007
Aishwarya Pantbd151342018-02-23 15:49:59 +05308 Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>]
Yehuda Sadehdfc56062010-11-19 14:51:04 -08009
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010010 Example::
11
Aishwarya Pantbd151342018-02-23 15:49:59 +053012 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
Yehuda Sadehdfc56062010-11-19 14:51:04 -080013
Aishwarya Pantbd151342018-02-23 15:49:59 +053014 The snapshot name can be "-" or omitted to map the image
15 read/write. A <dev-id> will be assigned for any registered block
16 device. If snapshot is used, it will be mapped read-only.
Yehuda Sadehdfc56062010-11-19 14:51:04 -080017
Yehuda Sadehdfc56062010-11-19 14:51:04 -080018
Aishwarya Pantbd151342018-02-23 15:49:59 +053019What: /sys/bus/rbd/remove
20Date: Oct, 2010
21KernelVersion: v2.6.37
22Contact: Sage Weil <sage@newdream.net>
23Description:
24 (WO) Remove rbd block device.
Yehuda Sadehdfc56062010-11-19 14:51:04 -080025
Aishwarya Pantbd151342018-02-23 15:49:59 +053026 Usage: <dev-id> [force]
Mike Christie0276dca2016-08-18 18:38:45 +020027
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010028 Example::
29
Aishwarya Pantbd151342018-02-23 15:49:59 +053030 $ echo 2 > /sys/bus/rbd/remove
31
32 Optional "force" argument which when passed will wait for
33 running requests and then unmap the image. Requests sent to the
34 driver after initiating the removal will be failed. (August
35 2016, since 4.9.)
36
Yehuda Sadehdfc56062010-11-19 14:51:04 -080037
Ilya Dryomov9b60e702013-12-13 15:28:57 +020038What: /sys/bus/rbd/add_single_major
Aishwarya Pantbd151342018-02-23 15:49:59 +053039Date: Dec, 2013
40KernelVersion: v3.14
41Contact: Sage Weil <sage@newdream.net>
42Description:
43 (WO) Available only if rbd module is inserted with single_major
Ilya Dryomov9b60e702013-12-13 15:28:57 +020044 parameter set to true.
Aishwarya Pantbd151342018-02-23 15:49:59 +053045
46 Usage is the same as for /sys/bus/rbd/add. If present, this
Ilya Dryomov9b60e702013-12-13 15:28:57 +020047 should be used instead of the latter: any attempts to use
Aishwarya Pantbd151342018-02-23 15:49:59 +053048 /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available
49 will fail for backwards compatibility reasons.
50
Ilya Dryomov9b60e702013-12-13 15:28:57 +020051
52What: /sys/bus/rbd/remove_single_major
Aishwarya Pantbd151342018-02-23 15:49:59 +053053Date: Dec, 2013
54KernelVersion: v3.14
55Contact: Sage Weil <sage@newdream.net>
56Description:
57 (WO) Available only if rbd module is inserted with single_major
Ilya Dryomov9b60e702013-12-13 15:28:57 +020058 parameter set to true.
Aishwarya Pantbd151342018-02-23 15:49:59 +053059
60 Usage is the same as for /sys/bus/rbd/remove. If present, this
Ilya Dryomov9b60e702013-12-13 15:28:57 +020061 should be used instead of the latter: any attempts to use
62 /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
63 available will fail for backwards compatibility reasons.
64
Yehuda Sadehdfc56062010-11-19 14:51:04 -080065
Aishwarya Pantbd151342018-02-23 15:49:59 +053066What: /sys/bus/rbd/supported_features
67Date: Mar, 2017
68KernelVersion: v4.11
69Contact: Sage Weil <sage@newdream.net>
70Description:
71 (RO) Displays the features supported by the rbd module so that
72 userspace can generate meaningful error messages and spell out
73 unsupported features that need to be disabled.
Ilya Dryomov005a07bf2016-08-18 18:38:43 +020074
Ilya Dryomov005a07bf2016-08-18 18:38:43 +020075
Aishwarya Pantbd151342018-02-23 15:49:59 +053076What: /sys/bus/rbd/devices/<dev-id>/size
77What: /sys/bus/rbd/devices/<dev-id>/major
78What: /sys/bus/rbd/devices/<dev-id>/client_id
79What: /sys/bus/rbd/devices/<dev-id>/pool
80What: /sys/bus/rbd/devices/<dev-id>/name
81What: /sys/bus/rbd/devices/<dev-id>/refresh
82What: /sys/bus/rbd/devices/<dev-id>/current_snap
83Date: Oct, 2010
84KernelVersion: v2.6.37
85Contact: Sage Weil <sage@newdream.net>
86Description:
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010087
88 ============== ================================================
89 size (RO) The size (in bytes) of the mapped block
Aishwarya Pantbd151342018-02-23 15:49:59 +053090 device.
Yehuda Sadehdfc56062010-11-19 14:51:04 -080091
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010092 major (RO) The block device major number.
Yehuda Sadehdfc56062010-11-19 14:51:04 -080093
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010094 client_id (RO) The ceph unique client id that was assigned
Aishwarya Pantbd151342018-02-23 15:49:59 +053095 for this specific session.
Mike Christie267fb902016-08-18 18:38:43 +020096
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010097 pool (RO) The name of the storage pool where this rbd
Aishwarya Pantbd151342018-02-23 15:49:59 +053098 image resides. An rbd image name is unique
99 within its pool.
Mike Christie267fb902016-08-18 18:38:43 +0200100
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100101 name (RO) The name of the rbd image.
Mike Christie0d6d1e9c2016-08-18 18:38:45 +0200102
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100103 refresh (WO) Writing to this file will reread the image
Aishwarya Pantbd151342018-02-23 15:49:59 +0530104 header data and set all relevant data structures
105 accordingly.
Mike Christie0d6d1e9c2016-08-18 18:38:45 +0200106
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100107 current_snap (RO) The current snapshot for which the device
Aishwarya Pantbd151342018-02-23 15:49:59 +0530108 is mapped.
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100109 ============== ================================================
Alex Elder34b13182012-07-13 20:35:12 -0500110
Alex Elder34b13182012-07-13 20:35:12 -0500111
Aishwarya Pantbd151342018-02-23 15:49:59 +0530112What: /sys/bus/rbd/devices/<dev-id>/pool_id
113Date: Jul, 2012
114KernelVersion: v3.6
115Contact: Sage Weil <sage@newdream.net>
116Description:
117 (RO) The unique identifier for the rbd image's pool. This is a
118 permanent attribute of the pool. A pool's id will never change.
Yehuda Sadehdfc56062010-11-19 14:51:04 -0800119
Yehuda Sadehdfc56062010-11-19 14:51:04 -0800120
Aishwarya Pantbd151342018-02-23 15:49:59 +0530121What: /sys/bus/rbd/devices/<dev-id>/image_id
122What: /sys/bus/rbd/devices/<dev-id>/features
123Date: Oct, 2012
124KernelVersion: v3.7
125Contact: Sage Weil <sage@newdream.net>
126Description:
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100127 ========= ===============================================
128 image_id (RO) The unique id for the rbd image. (For rbd
Aishwarya Pantbd151342018-02-23 15:49:59 +0530129 image format 1 this is empty.)
Ilya Dryomovdd82fff2013-12-13 15:28:57 +0200130
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100131 features (RO) A hexadecimal encoding of the feature bits
Aishwarya Pantbd151342018-02-23 15:49:59 +0530132 for this image.
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100133 ========= ===============================================
Ilya Dryomovdd82fff2013-12-13 15:28:57 +0200134
Yehuda Sadehdfc56062010-11-19 14:51:04 -0800135
Aishwarya Pantbd151342018-02-23 15:49:59 +0530136What: /sys/bus/rbd/devices/<dev-id>/parent
137Date: Nov, 2012
138KernelVersion: v3.8
139Contact: Sage Weil <sage@newdream.net>
140Description:
141 (RO) Information identifying the chain of parent images in a
142 layered rbd image. Entries are separated by empty lines.
Yehuda Sadehdfc56062010-11-19 14:51:04 -0800143
Alex Elder589d30e2012-07-10 20:30:11 -0500144
Aishwarya Pantbd151342018-02-23 15:49:59 +0530145What: /sys/bus/rbd/devices/<dev-id>/minor
146Date: Dec, 2013
147KernelVersion: v3.14
148Contact: Sage Weil <sage@newdream.net>
149Description:
150 (RO) The block device minor number.
Alex Elder589d30e2012-07-10 20:30:11 -0500151
Yehuda Sadehdfc56062010-11-19 14:51:04 -0800152
Aishwarya Pantbd151342018-02-23 15:49:59 +0530153What: /sys/bus/rbd/devices/<dev-id>/snap_id
154What: /sys/bus/rbd/devices/<dev-id>/config_info
155What: /sys/bus/rbd/devices/<dev-id>/cluster_fsid
156What: /sys/bus/rbd/devices/<dev-id>/client_addr
157Date: Aug, 2016
158KernelVersion: v4.9
159Contact: Sage Weil <sage@newdream.net>
160Description:
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100161 ============ ================================================
162 snap_id (RO) The current snapshot's id.
Alex Elder9bb2f332012-07-12 10:46:35 -0500163
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100164 config_info (RO) The string written into
Aishwarya Pantbd151342018-02-23 15:49:59 +0530165 /sys/bus/rbd/add{,_single_major}.
Alex Elder9bb2f332012-07-12 10:46:35 -0500166
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100167 cluster_fsid (RO) The ceph cluster UUID.
Yehuda Sadehdfc56062010-11-19 14:51:04 -0800168
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100169 client_addr (RO) The ceph unique client
Aishwarya Pantbd151342018-02-23 15:49:59 +0530170 entity_addr_t (address + nonce). The format is
171 <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
172 '[1:2:3:4:5:6:7:8]:1234/5678'.
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +0100173 ============ ================================================