Linux Audio

Check our new training course

Loading...
v3.1
 1What:		/sys/bus/rbd/
 2Date:		November 2010
 3Contact:	Yehuda Sadeh <yehuda@newdream.net>,
 4		Sage Weil <sage@newdream.net>
 5Description:
 
 6
 7Being used for adding and removing rbd block devices.
 8
 9Usage: <mon ip addr> <options> <pool name> <rbd image name> [snap name]
10
11 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
 
 
12
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
17Removal of a device:
 
 
 
 
 
18
19  $ echo <dev-id> > /sys/bus/rbd/remove
20
21Entries under /sys/bus/rbd/devices/<dev-id>/
22--------------------------------------------
23
24client_id
 
 
 
25
26	The ceph unique client id that was assigned for this specific session.
27
28major
 
 
 
 
 
 
29
30	The block device major number.
 
 
 
31
32name
33
34	The name of the rbd image.
 
 
 
 
 
 
35
36pool
 
 
 
37
38	The pool where this rbd image resides. The pool-name pair is unique
39	per rados system.
40
41size
 
 
 
 
 
 
 
42
43	The size (in bytes) of the mapped block device.
44
45refresh
 
 
 
 
 
 
 
 
 
 
 
 
46
47	Writing to this file will reread the image header data and set
48	all relevant datastructures accordingly.
49
50current_snap
 
51
52	The current snapshot for which the device is mapped.
 
 
53
54create_snap
55
56	Create a snapshot:
 
 
57
58	 $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_create
 
59
60rollback_snap
61
62	Rolls back data to the specified snapshot. This goes over the entire
63	list of rados blocks and sends a rollback command to each.
 
 
 
 
 
64
65	 $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_rollback
66
67snap_*
 
 
 
 
 
 
 
68
69	A directory per each snapshot
 
70
71
72Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
73-------------------------------------------------------------
 
 
 
 
 
74
75id
76
77	The rados internal snapshot id assigned for this snapshot
 
 
 
 
 
78
79size
80
81	The size of the image when this snapshot was taken.
 
 
 
 
 
 
 
 
 
 
 
82
 
83
v5.4
  1What:		/sys/bus/rbd/add
  2Date:		Oct, 2010
  3KernelVersion:	v2.6.37
  4Contact:	Sage Weil <sage@newdream.net>
  5Description:
  6		(WO) Add rbd block device.
  7
  8		Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>]
  9
 10		 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
 11
 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.
 15
 
 
 
 16
 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]
 25
 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.)
 32
 
 33
 34What:		/sys/bus/rbd/add_single_major
 35Date:		Dec, 2013
 36KernelVersion:	v3.14
 37Contact:	Sage Weil <sage@newdream.net>
 38Description:
 39		(WO) Available only if rbd module is inserted with single_major
 40		parameter set to true.
 41
 42		Usage is the same as for /sys/bus/rbd/add. If present, this
 43		should be used instead of the latter: any attempts to use
 44		/sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available
 45		will fail for backwards compatibility reasons.
 46
 
 47
 48What:		/sys/bus/rbd/remove_single_major
 49Date:		Dec, 2013
 50KernelVersion:	v3.14
 51Contact:	Sage Weil <sage@newdream.net>
 52Description:
 53		(WO) Available only if rbd module is inserted with single_major
 54		parameter set to true.
 55
 56		Usage is the same as for /sys/bus/rbd/remove. If present, this
 57		should be used instead of the latter: any attempts to use
 58		/sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
 59		available will fail for backwards compatibility reasons.
 60
 
 
 61
 62What:		/sys/bus/rbd/supported_features
 63Date:		Mar, 2017
 64KernelVersion:	v4.11
 65Contact:	Sage Weil <sage@newdream.net>
 66Description:
 67		(RO) Displays the features supported by the rbd module so that
 68		userspace can generate meaningful error messages and spell out
 69		unsupported features that need to be disabled.
 70
 
 71
 72What:		/sys/bus/rbd/devices/<dev-id>/size
 73What:		/sys/bus/rbd/devices/<dev-id>/major
 74What:		/sys/bus/rbd/devices/<dev-id>/client_id
 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.
 85
 86		major:		(RO) The block device major number.
 
 87
 88		client_id:	(RO) The ceph unique client id that was assigned
 89				for this specific session.
 90
 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.
 94
 95		name:		(RO) The name of the rbd image.
 96
 97		refresh:	(WO) Writing to this file will reread the image
 98				header data and set all relevant data structures
 99				accordingly.
100
101		current_snap:	(RO) The current snapshot for which the device
102				is mapped.
103
 
104
105What:		/sys/bus/rbd/devices/<dev-id>/pool_id
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.
112
 
113
114What:		/sys/bus/rbd/devices/<dev-id>/image_id
115What:		/sys/bus/rbd/devices/<dev-id>/features
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.)
122
123		features:	(RO) A hexadecimal encoding of the feature bits
124				for this image.
125
126
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.
134
 
135
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.
142
 
143
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.
153
154		config_info:	(RO) The string written into
155				/sys/bus/rbd/add{,_single_major}.
156
157		cluster_fsid:	(RO) The ceph cluster UUID.
158
159		client_addr:	(RO) The ceph unique client
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'.