1dfc5606dSYehuda SadehWhat:		/sys/bus/rbd/
2dfc5606dSYehuda SadehDate:		November 2010
355b00baeSSage WeilContact:	Yehuda Sadeh <yehuda@newdream.net>,
4dfc5606dSYehuda Sadeh		Sage Weil <sage@newdream.net>
5dfc5606dSYehuda SadehDescription:
6dfc5606dSYehuda Sadeh
7dfc5606dSYehuda SadehBeing used for adding and removing rbd block devices.
8dfc5606dSYehuda Sadeh
9dfc5606dSYehuda SadehUsage: <mon ip addr> <options> <pool name> <rbd image name> [snap name]
10dfc5606dSYehuda Sadeh
11dfc5606dSYehuda Sadeh $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
12dfc5606dSYehuda Sadeh
13dfc5606dSYehuda SadehThe snapshot name can be "-" or omitted to map the image read/write. A <dev-id>
14dfc5606dSYehuda Sadehwill be assigned for any registered block device. If snapshot is used, it will
15dfc5606dSYehuda Sadehbe mapped read-only.
16dfc5606dSYehuda Sadeh
17dfc5606dSYehuda SadehRemoval of a device:
18dfc5606dSYehuda Sadeh
19dfc5606dSYehuda Sadeh  $ echo <dev-id> > /sys/bus/rbd/remove
20dfc5606dSYehuda Sadeh
21dfc5606dSYehuda SadehEntries under /sys/bus/rbd/devices/<dev-id>/
22dfc5606dSYehuda Sadeh--------------------------------------------
23dfc5606dSYehuda Sadeh
24dfc5606dSYehuda Sadehclient_id
25dfc5606dSYehuda Sadeh
26dfc5606dSYehuda Sadeh	The ceph unique client id that was assigned for this specific session.
27dfc5606dSYehuda Sadeh
2834b13184SAlex Elderfeatures
2934b13184SAlex Elder
3034b13184SAlex Elder	A hexadecimal encoding of the feature bits for this image.
3134b13184SAlex Elder
32dfc5606dSYehuda Sadehmajor
33dfc5606dSYehuda Sadeh
34dfc5606dSYehuda Sadeh	The block device major number.
35dfc5606dSYehuda Sadeh
36*dd82fff1SIlya Dryomovminor
37*dd82fff1SIlya Dryomov
38*dd82fff1SIlya Dryomov	The block device minor number.  (December 2013, since 3.14.)
39*dd82fff1SIlya Dryomov
40dfc5606dSYehuda Sadehname
41dfc5606dSYehuda Sadeh
42dfc5606dSYehuda Sadeh	The name of the rbd image.
43dfc5606dSYehuda Sadeh
44589d30e0SAlex Elderimage_id
45589d30e0SAlex Elder
46589d30e0SAlex Elder	The unique id for the rbd image.  (For rbd image format 1
47589d30e0SAlex Elder	this is empty.)
48589d30e0SAlex Elder
49dfc5606dSYehuda Sadehpool
50dfc5606dSYehuda Sadeh
519bb2f334SAlex Elder	The name of the storage pool where this rbd image resides.
529bb2f334SAlex Elder	An rbd image name is unique within its pool.
539bb2f334SAlex Elder
549bb2f334SAlex Elderpool_id
559bb2f334SAlex Elder
569bb2f334SAlex Elder	The unique identifier for the rbd image's pool.  This is
579bb2f334SAlex Elder	a permanent attribute of the pool.  A pool's id will never
589bb2f334SAlex Elder	change.
59dfc5606dSYehuda Sadeh
60dfc5606dSYehuda Sadehsize
61dfc5606dSYehuda Sadeh
62dfc5606dSYehuda Sadeh	The size (in bytes) of the mapped block device.
63dfc5606dSYehuda Sadeh
64dfc5606dSYehuda Sadehrefresh
65dfc5606dSYehuda Sadeh
66dfc5606dSYehuda Sadeh	Writing to this file will reread the image header data and set
67dfc5606dSYehuda Sadeh	all relevant datastructures accordingly.
68dfc5606dSYehuda Sadeh
69dfc5606dSYehuda Sadehcurrent_snap
70dfc5606dSYehuda Sadeh
71dfc5606dSYehuda Sadeh	The current snapshot for which the device is mapped.
72dfc5606dSYehuda Sadeh
7386b00e0dSAlex Elderparent
7486b00e0dSAlex Elder
7586b00e0dSAlex Elder	Information identifying the pool, image, and snapshot id for
7686b00e0dSAlex Elder	the parent image in a layered rbd image (format 2 only).
77