Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 1 | What: /sys/bus/rbd/ |
| 2 | Date: November 2010 |
Sage Weil | 55b00ba | 2011-03-21 15:06:50 -0700 | [diff] [blame] | 3 | Contact: Yehuda Sadeh <yehuda@newdream.net>, |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 4 | Sage Weil <sage@newdream.net> |
| 5 | Description: |
| 6 | |
| 7 | Being used for adding and removing rbd block devices. |
| 8 | |
Mike Christie | 0276dca | 2016-08-18 18:38:45 +0200 | [diff] [blame] | 9 | Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>] |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 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 | |
Mike Christie | 0276dca | 2016-08-18 18:38:45 +0200 | [diff] [blame] | 17 | Usage: <dev-id> [force] |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 18 | |
Mike Christie | 0276dca | 2016-08-18 18:38:45 +0200 | [diff] [blame] | 19 | $ echo 2 > /sys/bus/rbd/remove |
| 20 | |
| 21 | Optional "force" argument which when passed will wait for running requests and |
| 22 | then unmap the image. Requests sent to the driver after initiating the removal |
| 23 | will be failed. (August 2016, since 4.9.) |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 24 | |
Ilya Dryomov | 9b60e70 | 2013-12-13 15:28:57 +0200 | [diff] [blame] | 25 | What: /sys/bus/rbd/add_single_major |
| 26 | Date: December 2013 |
| 27 | KernelVersion: 3.14 |
| 28 | Contact: Sage Weil <sage@inktank.com> |
| 29 | Description: Available only if rbd module is inserted with single_major |
| 30 | parameter set to true. |
| 31 | Usage is the same as for /sys/bus/rbd/add. If present, |
| 32 | should be used instead of the latter: any attempts to use |
| 33 | /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is |
| 34 | available will fail for backwards compatibility reasons. |
| 35 | |
| 36 | What: /sys/bus/rbd/remove_single_major |
| 37 | Date: December 2013 |
| 38 | KernelVersion: 3.14 |
| 39 | Contact: Sage Weil <sage@inktank.com> |
| 40 | Description: Available only if rbd module is inserted with single_major |
| 41 | parameter set to true. |
| 42 | Usage is the same as for /sys/bus/rbd/remove. If present, |
| 43 | should be used instead of the latter: any attempts to use |
| 44 | /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is |
| 45 | available will fail for backwards compatibility reasons. |
| 46 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 47 | Entries under /sys/bus/rbd/devices/<dev-id>/ |
| 48 | -------------------------------------------- |
| 49 | |
Ilya Dryomov | 005a07bf | 2016-08-18 18:38:43 +0200 | [diff] [blame] | 50 | client_addr |
| 51 | |
| 52 | The ceph unique client entity_addr_t (address + nonce). |
| 53 | The format is <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or |
| 54 | '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.) |
| 55 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 56 | client_id |
| 57 | |
| 58 | The ceph unique client id that was assigned for this specific session. |
| 59 | |
Mike Christie | 267fb90 | 2016-08-18 18:38:43 +0200 | [diff] [blame] | 60 | cluster_fsid |
| 61 | |
| 62 | The ceph cluster UUID. (August 2016, since 4.9.) |
| 63 | |
Mike Christie | 0d6d1e9c | 2016-08-18 18:38:45 +0200 | [diff] [blame] | 64 | config_info |
| 65 | |
| 66 | The string written into /sys/bus/rbd/add{,_single_major}. (August |
| 67 | 2016, since 4.9.) |
| 68 | |
Alex Elder | 34b1318 | 2012-07-13 20:35:12 -0500 | [diff] [blame] | 69 | features |
| 70 | |
| 71 | A hexadecimal encoding of the feature bits for this image. |
| 72 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 73 | major |
| 74 | |
| 75 | The block device major number. |
| 76 | |
Ilya Dryomov | dd82fff | 2013-12-13 15:28:57 +0200 | [diff] [blame] | 77 | minor |
| 78 | |
| 79 | The block device minor number. (December 2013, since 3.14.) |
| 80 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 81 | name |
| 82 | |
| 83 | The name of the rbd image. |
| 84 | |
Alex Elder | 589d30e | 2012-07-10 20:30:11 -0500 | [diff] [blame] | 85 | image_id |
| 86 | |
| 87 | The unique id for the rbd image. (For rbd image format 1 |
| 88 | this is empty.) |
| 89 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 90 | pool |
| 91 | |
Alex Elder | 9bb2f33 | 2012-07-12 10:46:35 -0500 | [diff] [blame] | 92 | The name of the storage pool where this rbd image resides. |
| 93 | An rbd image name is unique within its pool. |
| 94 | |
| 95 | pool_id |
| 96 | |
| 97 | The unique identifier for the rbd image's pool. This is |
| 98 | a permanent attribute of the pool. A pool's id will never |
| 99 | change. |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 100 | |
| 101 | size |
| 102 | |
| 103 | The size (in bytes) of the mapped block device. |
| 104 | |
| 105 | refresh |
| 106 | |
| 107 | Writing to this file will reread the image header data and set |
| 108 | all relevant datastructures accordingly. |
| 109 | |
| 110 | current_snap |
| 111 | |
| 112 | The current snapshot for which the device is mapped. |
| 113 | |
Mike Christie | 92a5867 | 2016-08-18 18:38:44 +0200 | [diff] [blame] | 114 | snap_id |
| 115 | |
| 116 | The current snapshot's id. (August 2016, since 4.9.) |
| 117 | |
Alex Elder | 86b00e0 | 2012-10-25 23:34:42 -0500 | [diff] [blame] | 118 | parent |
| 119 | |
Ilya Dryomov | ff96128 | 2014-07-22 21:53:07 +0400 | [diff] [blame] | 120 | Information identifying the chain of parent images in a layered rbd |
| 121 | image. Entries are separated by empty lines. |