Loading...
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
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
21What: /sys/bus/rbd/add_single_major
22Date: December 2013
23KernelVersion: 3.14
24Contact: Sage Weil <sage@inktank.com>
25Description: Available only if rbd module is inserted with single_major
26 parameter set to true.
27 Usage is the same as for /sys/bus/rbd/add. If present,
28 should be used instead of the latter: any attempts to use
29 /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is
30 available will fail for backwards compatibility reasons.
31
32What: /sys/bus/rbd/remove_single_major
33Date: December 2013
34KernelVersion: 3.14
35Contact: Sage Weil <sage@inktank.com>
36Description: Available only if rbd module is inserted with single_major
37 parameter set to true.
38 Usage is the same as for /sys/bus/rbd/remove. If present,
39 should be used instead of the latter: any attempts to use
40 /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
41 available will fail for backwards compatibility reasons.
42
43Entries under /sys/bus/rbd/devices/<dev-id>/
44--------------------------------------------
45
46client_id
47
48 The ceph unique client id that was assigned for this specific session.
49
50features
51
52 A hexadecimal encoding of the feature bits for this image.
53
54major
55
56 The block device major number.
57
58minor
59
60 The block device minor number. (December 2013, since 3.14.)
61
62name
63
64 The name of the rbd image.
65
66image_id
67
68 The unique id for the rbd image. (For rbd image format 1
69 this is empty.)
70
71pool
72
73 The name of the storage pool where this rbd image resides.
74 An rbd image name is unique within its pool.
75
76pool_id
77
78 The unique identifier for the rbd image's pool. This is
79 a permanent attribute of the pool. A pool's id will never
80 change.
81
82size
83
84 The size (in bytes) of the mapped block device.
85
86refresh
87
88 Writing to this file will reread the image header data and set
89 all relevant datastructures accordingly.
90
91current_snap
92
93 The current snapshot for which the device is mapped.
94
95parent
96
97 Information identifying the pool, image, and snapshot id for
98 the parent image in a layered rbd image (format 2 only).