rbd: add 'client_addr' sysfs rbd device attribute
[cascardo/linux.git] / Documentation / ABI / testing / sysfs-bus-rbd
1 What:           /sys/bus/rbd/
2 Date:           November 2010
3 Contact:        Yehuda Sadeh <yehuda@newdream.net>,
4                 Sage Weil <sage@newdream.net>
5 Description:
6
7 Being used for adding and removing rbd block devices.
8
9 Usage: <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
13 The snapshot name can be "-" or omitted to map the image read/write. A <dev-id>
14 will be assigned for any registered block device. If snapshot is used, it will
15 be mapped read-only.
16
17 Removal of a device:
18
19   $ echo <dev-id> > /sys/bus/rbd/remove
20
21 What:           /sys/bus/rbd/add_single_major
22 Date:           December 2013
23 KernelVersion:  3.14
24 Contact:        Sage Weil <sage@inktank.com>
25 Description:    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
32 What:           /sys/bus/rbd/remove_single_major
33 Date:           December 2013
34 KernelVersion:  3.14
35 Contact:        Sage Weil <sage@inktank.com>
36 Description:    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
43 Entries under /sys/bus/rbd/devices/<dev-id>/
44 --------------------------------------------
45
46 client_addr
47
48         The ceph unique client entity_addr_t (address + nonce).
49         The format is <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
50         '[1:2:3:4:5:6:7:8]:1234/5678'.  (August 2016, since 4.9.)
51
52 client_id
53
54         The ceph unique client id that was assigned for this specific session.
55
56 features
57
58         A hexadecimal encoding of the feature bits for this image.
59
60 major
61
62         The block device major number.
63
64 minor
65
66         The block device minor number.  (December 2013, since 3.14.)
67
68 name
69
70         The name of the rbd image.
71
72 image_id
73
74         The unique id for the rbd image.  (For rbd image format 1
75         this is empty.)
76
77 pool
78
79         The name of the storage pool where this rbd image resides.
80         An rbd image name is unique within its pool.
81
82 pool_id
83
84         The unique identifier for the rbd image's pool.  This is
85         a permanent attribute of the pool.  A pool's id will never
86         change.
87
88 size
89
90         The size (in bytes) of the mapped block device.
91
92 refresh
93
94         Writing to this file will reread the image header data and set
95         all relevant datastructures accordingly.
96
97 current_snap
98
99         The current snapshot for which the device is mapped.
100
101 parent
102
103         Information identifying the chain of parent images in a layered rbd
104         image.  Entries are separated by empty lines.