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 9*0276dca6SMike ChristieUsage: <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 17*0276dca6SMike ChristieUsage: <dev-id> [force] 18dfc5606dSYehuda Sadeh 19*0276dca6SMike Christie $ echo 2 > /sys/bus/rbd/remove 20*0276dca6SMike Christie 21*0276dca6SMike ChristieOptional "force" argument which when passed will wait for running requests and 22*0276dca6SMike Christiethen unmap the image. Requests sent to the driver after initiating the removal 23*0276dca6SMike Christiewill be failed. (August 2016, since 4.9.) 24dfc5606dSYehuda Sadeh 259b60e70bSIlya DryomovWhat: /sys/bus/rbd/add_single_major 269b60e70bSIlya DryomovDate: December 2013 279b60e70bSIlya DryomovKernelVersion: 3.14 289b60e70bSIlya DryomovContact: Sage Weil <sage@inktank.com> 299b60e70bSIlya DryomovDescription: Available only if rbd module is inserted with single_major 309b60e70bSIlya Dryomov parameter set to true. 319b60e70bSIlya Dryomov Usage is the same as for /sys/bus/rbd/add. If present, 329b60e70bSIlya Dryomov should be used instead of the latter: any attempts to use 339b60e70bSIlya Dryomov /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is 349b60e70bSIlya Dryomov available will fail for backwards compatibility reasons. 359b60e70bSIlya Dryomov 369b60e70bSIlya DryomovWhat: /sys/bus/rbd/remove_single_major 379b60e70bSIlya DryomovDate: December 2013 389b60e70bSIlya DryomovKernelVersion: 3.14 399b60e70bSIlya DryomovContact: Sage Weil <sage@inktank.com> 409b60e70bSIlya DryomovDescription: Available only if rbd module is inserted with single_major 419b60e70bSIlya Dryomov parameter set to true. 429b60e70bSIlya Dryomov Usage is the same as for /sys/bus/rbd/remove. If present, 439b60e70bSIlya Dryomov should be used instead of the latter: any attempts to use 449b60e70bSIlya Dryomov /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is 459b60e70bSIlya Dryomov available will fail for backwards compatibility reasons. 469b60e70bSIlya Dryomov 47dfc5606dSYehuda SadehEntries under /sys/bus/rbd/devices/<dev-id>/ 48dfc5606dSYehuda Sadeh-------------------------------------------- 49dfc5606dSYehuda Sadeh 50005a07bfSIlya Dryomovclient_addr 51005a07bfSIlya Dryomov 52005a07bfSIlya Dryomov The ceph unique client entity_addr_t (address + nonce). 53005a07bfSIlya Dryomov The format is <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or 54005a07bfSIlya Dryomov '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.) 55005a07bfSIlya Dryomov 56dfc5606dSYehuda Sadehclient_id 57dfc5606dSYehuda Sadeh 58dfc5606dSYehuda Sadeh The ceph unique client id that was assigned for this specific session. 59dfc5606dSYehuda Sadeh 60267fb90bSMike Christiecluster_fsid 61267fb90bSMike Christie 62267fb90bSMike Christie The ceph cluster UUID. (August 2016, since 4.9.) 63267fb90bSMike Christie 640d6d1e9cSMike Christieconfig_info 650d6d1e9cSMike Christie 660d6d1e9cSMike Christie The string written into /sys/bus/rbd/add{,_single_major}. (August 670d6d1e9cSMike Christie 2016, since 4.9.) 680d6d1e9cSMike Christie 6934b13184SAlex Elderfeatures 7034b13184SAlex Elder 7134b13184SAlex Elder A hexadecimal encoding of the feature bits for this image. 7234b13184SAlex Elder 73dfc5606dSYehuda Sadehmajor 74dfc5606dSYehuda Sadeh 75dfc5606dSYehuda Sadeh The block device major number. 76dfc5606dSYehuda Sadeh 77dd82fff1SIlya Dryomovminor 78dd82fff1SIlya Dryomov 79dd82fff1SIlya Dryomov The block device minor number. (December 2013, since 3.14.) 80dd82fff1SIlya Dryomov 81dfc5606dSYehuda Sadehname 82dfc5606dSYehuda Sadeh 83dfc5606dSYehuda Sadeh The name of the rbd image. 84dfc5606dSYehuda Sadeh 85589d30e0SAlex Elderimage_id 86589d30e0SAlex Elder 87589d30e0SAlex Elder The unique id for the rbd image. (For rbd image format 1 88589d30e0SAlex Elder this is empty.) 89589d30e0SAlex Elder 90dfc5606dSYehuda Sadehpool 91dfc5606dSYehuda Sadeh 929bb2f334SAlex Elder The name of the storage pool where this rbd image resides. 939bb2f334SAlex Elder An rbd image name is unique within its pool. 949bb2f334SAlex Elder 959bb2f334SAlex Elderpool_id 969bb2f334SAlex Elder 979bb2f334SAlex Elder The unique identifier for the rbd image's pool. This is 989bb2f334SAlex Elder a permanent attribute of the pool. A pool's id will never 999bb2f334SAlex Elder change. 100dfc5606dSYehuda Sadeh 101dfc5606dSYehuda Sadehsize 102dfc5606dSYehuda Sadeh 103dfc5606dSYehuda Sadeh The size (in bytes) of the mapped block device. 104dfc5606dSYehuda Sadeh 105dfc5606dSYehuda Sadehrefresh 106dfc5606dSYehuda Sadeh 107dfc5606dSYehuda Sadeh Writing to this file will reread the image header data and set 108dfc5606dSYehuda Sadeh all relevant datastructures accordingly. 109dfc5606dSYehuda Sadeh 110dfc5606dSYehuda Sadehcurrent_snap 111dfc5606dSYehuda Sadeh 112dfc5606dSYehuda Sadeh The current snapshot for which the device is mapped. 113dfc5606dSYehuda Sadeh 11492a58671SMike Christiesnap_id 11592a58671SMike Christie 11692a58671SMike Christie The current snapshot's id. (August 2016, since 4.9.) 11792a58671SMike Christie 11886b00e0dSAlex Elderparent 11986b00e0dSAlex Elder 120ff96128fSIlya Dryomov Information identifying the chain of parent images in a layered rbd 121ff96128fSIlya Dryomov image. Entries are separated by empty lines. 122