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 219b60e70bSIlya DryomovWhat: /sys/bus/rbd/add_single_major 229b60e70bSIlya DryomovDate: December 2013 239b60e70bSIlya DryomovKernelVersion: 3.14 249b60e70bSIlya DryomovContact: Sage Weil <sage@inktank.com> 259b60e70bSIlya DryomovDescription: Available only if rbd module is inserted with single_major 269b60e70bSIlya Dryomov parameter set to true. 279b60e70bSIlya Dryomov Usage is the same as for /sys/bus/rbd/add. If present, 289b60e70bSIlya Dryomov should be used instead of the latter: any attempts to use 299b60e70bSIlya Dryomov /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is 309b60e70bSIlya Dryomov available will fail for backwards compatibility reasons. 319b60e70bSIlya Dryomov 329b60e70bSIlya DryomovWhat: /sys/bus/rbd/remove_single_major 339b60e70bSIlya DryomovDate: December 2013 349b60e70bSIlya DryomovKernelVersion: 3.14 359b60e70bSIlya DryomovContact: Sage Weil <sage@inktank.com> 369b60e70bSIlya DryomovDescription: Available only if rbd module is inserted with single_major 379b60e70bSIlya Dryomov parameter set to true. 389b60e70bSIlya Dryomov Usage is the same as for /sys/bus/rbd/remove. If present, 399b60e70bSIlya Dryomov should be used instead of the latter: any attempts to use 409b60e70bSIlya Dryomov /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is 419b60e70bSIlya Dryomov available will fail for backwards compatibility reasons. 429b60e70bSIlya Dryomov 43dfc5606dSYehuda SadehEntries under /sys/bus/rbd/devices/<dev-id>/ 44dfc5606dSYehuda Sadeh-------------------------------------------- 45dfc5606dSYehuda Sadeh 46*005a07bfSIlya Dryomovclient_addr 47*005a07bfSIlya Dryomov 48*005a07bfSIlya Dryomov The ceph unique client entity_addr_t (address + nonce). 49*005a07bfSIlya Dryomov The format is <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or 50*005a07bfSIlya Dryomov '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.) 51*005a07bfSIlya Dryomov 52dfc5606dSYehuda Sadehclient_id 53dfc5606dSYehuda Sadeh 54dfc5606dSYehuda Sadeh The ceph unique client id that was assigned for this specific session. 55dfc5606dSYehuda Sadeh 5634b13184SAlex Elderfeatures 5734b13184SAlex Elder 5834b13184SAlex Elder A hexadecimal encoding of the feature bits for this image. 5934b13184SAlex Elder 60dfc5606dSYehuda Sadehmajor 61dfc5606dSYehuda Sadeh 62dfc5606dSYehuda Sadeh The block device major number. 63dfc5606dSYehuda Sadeh 64dd82fff1SIlya Dryomovminor 65dd82fff1SIlya Dryomov 66dd82fff1SIlya Dryomov The block device minor number. (December 2013, since 3.14.) 67dd82fff1SIlya Dryomov 68dfc5606dSYehuda Sadehname 69dfc5606dSYehuda Sadeh 70dfc5606dSYehuda Sadeh The name of the rbd image. 71dfc5606dSYehuda Sadeh 72589d30e0SAlex Elderimage_id 73589d30e0SAlex Elder 74589d30e0SAlex Elder The unique id for the rbd image. (For rbd image format 1 75589d30e0SAlex Elder this is empty.) 76589d30e0SAlex Elder 77dfc5606dSYehuda Sadehpool 78dfc5606dSYehuda Sadeh 799bb2f334SAlex Elder The name of the storage pool where this rbd image resides. 809bb2f334SAlex Elder An rbd image name is unique within its pool. 819bb2f334SAlex Elder 829bb2f334SAlex Elderpool_id 839bb2f334SAlex Elder 849bb2f334SAlex Elder The unique identifier for the rbd image's pool. This is 859bb2f334SAlex Elder a permanent attribute of the pool. A pool's id will never 869bb2f334SAlex Elder change. 87dfc5606dSYehuda Sadeh 88dfc5606dSYehuda Sadehsize 89dfc5606dSYehuda Sadeh 90dfc5606dSYehuda Sadeh The size (in bytes) of the mapped block device. 91dfc5606dSYehuda Sadeh 92dfc5606dSYehuda Sadehrefresh 93dfc5606dSYehuda Sadeh 94dfc5606dSYehuda Sadeh Writing to this file will reread the image header data and set 95dfc5606dSYehuda Sadeh all relevant datastructures accordingly. 96dfc5606dSYehuda Sadeh 97dfc5606dSYehuda Sadehcurrent_snap 98dfc5606dSYehuda Sadeh 99dfc5606dSYehuda Sadeh The current snapshot for which the device is mapped. 100dfc5606dSYehuda Sadeh 10186b00e0dSAlex Elderparent 10286b00e0dSAlex Elder 103ff96128fSIlya Dryomov Information identifying the chain of parent images in a layered rbd 104ff96128fSIlya Dryomov image. Entries are separated by empty lines. 105