blob: 7cbbe343af5e6db734b175922aabff265905ebaf [file] [log] [blame]
Yehuda Sadehdfc56062010-11-19 14:51:04 -08001What: /sys/bus/rbd/
2Date: November 2010
Sage Weil55b00ba2011-03-21 15:06:50 -07003Contact: Yehuda Sadeh <yehuda@newdream.net>,
Yehuda Sadehdfc56062010-11-19 14:51:04 -08004 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
Alex Elder589d30e2012-07-10 20:30:11 -050036image_id
37
38 The unique id for the rbd image. (For rbd image format 1
39 this is empty.)
40
Yehuda Sadehdfc56062010-11-19 14:51:04 -080041pool
42
Alex Elder9bb2f332012-07-12 10:46:35 -050043 The name of the storage pool where this rbd image resides.
44 An rbd image name is unique within its pool.
45
46pool_id
47
48 The unique identifier for the rbd image's pool. This is
49 a permanent attribute of the pool. A pool's id will never
50 change.
Yehuda Sadehdfc56062010-11-19 14:51:04 -080051
52size
53
54 The size (in bytes) of the mapped block device.
55
56refresh
57
58 Writing to this file will reread the image header data and set
59 all relevant datastructures accordingly.
60
61current_snap
62
63 The current snapshot for which the device is mapped.
64
65create_snap
66
67 Create a snapshot:
68
69 $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_create
70
Yehuda Sadehdfc56062010-11-19 14:51:04 -080071snap_*
72
73 A directory per each snapshot
74
75
76Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
77-------------------------------------------------------------
78
Josh Durginb7f65192011-12-01 15:12:03 -080079snap_id
Yehuda Sadehdfc56062010-11-19 14:51:04 -080080
81 The rados internal snapshot id assigned for this snapshot
82
Josh Durginb7f65192011-12-01 15:12:03 -080083snap_size
Yehuda Sadehdfc56062010-11-19 14:51:04 -080084
85 The size of the image when this snapshot was taken.
86
87