1*bd15134aSAishwarya PantWhat: /sys/bus/rbd/add 2*bd15134aSAishwarya PantDate: Oct, 2010 3*bd15134aSAishwarya PantKernelVersion: v2.6.37 4*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 5dfc5606dSYehuda SadehDescription: 6*bd15134aSAishwarya Pant (WO) Add rbd block device. 7dfc5606dSYehuda Sadeh 80276dca6SMike Christie Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>] 9dfc5606dSYehuda Sadeh 10dfc5606dSYehuda Sadeh $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add 11dfc5606dSYehuda Sadeh 12*bd15134aSAishwarya Pant The snapshot name can be "-" or omitted to map the image 13*bd15134aSAishwarya Pant read/write. A <dev-id> will be assigned for any registered block 14*bd15134aSAishwarya Pant device. If snapshot is used, it will be mapped read-only. 15*bd15134aSAishwarya Pant 16*bd15134aSAishwarya Pant 17*bd15134aSAishwarya PantWhat: /sys/bus/rbd/remove 18*bd15134aSAishwarya PantDate: Oct, 2010 19*bd15134aSAishwarya PantKernelVersion: v2.6.37 20*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 21*bd15134aSAishwarya PantDescription: 22*bd15134aSAishwarya Pant (WO) Remove rbd block device. 23dfc5606dSYehuda Sadeh 240276dca6SMike Christie Usage: <dev-id> [force] 25dfc5606dSYehuda Sadeh 260276dca6SMike Christie $ echo 2 > /sys/bus/rbd/remove 270276dca6SMike Christie 28*bd15134aSAishwarya Pant Optional "force" argument which when passed will wait for 29*bd15134aSAishwarya Pant running requests and then unmap the image. Requests sent to the 30*bd15134aSAishwarya Pant driver after initiating the removal will be failed. (August 31*bd15134aSAishwarya Pant 2016, since 4.9.) 32*bd15134aSAishwarya Pant 33dfc5606dSYehuda Sadeh 349b60e70bSIlya DryomovWhat: /sys/bus/rbd/add_single_major 35*bd15134aSAishwarya PantDate: Dec, 2013 36*bd15134aSAishwarya PantKernelVersion: v3.14 37*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 38*bd15134aSAishwarya PantDescription: 39*bd15134aSAishwarya Pant (WO) Available only if rbd module is inserted with single_major 409b60e70bSIlya Dryomov parameter set to true. 41*bd15134aSAishwarya Pant 42*bd15134aSAishwarya Pant Usage is the same as for /sys/bus/rbd/add. If present, this 439b60e70bSIlya Dryomov should be used instead of the latter: any attempts to use 44*bd15134aSAishwarya Pant /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available 45*bd15134aSAishwarya Pant will fail for backwards compatibility reasons. 46*bd15134aSAishwarya Pant 479b60e70bSIlya Dryomov 489b60e70bSIlya DryomovWhat: /sys/bus/rbd/remove_single_major 49*bd15134aSAishwarya PantDate: Dec, 2013 50*bd15134aSAishwarya PantKernelVersion: v3.14 51*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 52*bd15134aSAishwarya PantDescription: 53*bd15134aSAishwarya Pant (WO) Available only if rbd module is inserted with single_major 549b60e70bSIlya Dryomov parameter set to true. 55*bd15134aSAishwarya Pant 56*bd15134aSAishwarya Pant Usage is the same as for /sys/bus/rbd/remove. If present, this 579b60e70bSIlya Dryomov should be used instead of the latter: any attempts to use 589b60e70bSIlya Dryomov /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is 599b60e70bSIlya Dryomov available will fail for backwards compatibility reasons. 609b60e70bSIlya Dryomov 61dfc5606dSYehuda Sadeh 62*bd15134aSAishwarya PantWhat: /sys/bus/rbd/supported_features 63*bd15134aSAishwarya PantDate: Mar, 2017 64*bd15134aSAishwarya PantKernelVersion: v4.11 65*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 66*bd15134aSAishwarya PantDescription: 67*bd15134aSAishwarya Pant (RO) Displays the features supported by the rbd module so that 68*bd15134aSAishwarya Pant userspace can generate meaningful error messages and spell out 69*bd15134aSAishwarya Pant unsupported features that need to be disabled. 70005a07bfSIlya Dryomov 71005a07bfSIlya Dryomov 72*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/size 73*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/major 74*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/client_id 75*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/pool 76*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/name 77*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/refresh 78*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/current_snap 79*bd15134aSAishwarya PantDate: Oct, 2010 80*bd15134aSAishwarya PantKernelVersion: v2.6.37 81*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 82*bd15134aSAishwarya PantDescription: 83*bd15134aSAishwarya Pant size: (RO) The size (in bytes) of the mapped block 84*bd15134aSAishwarya Pant device. 85dfc5606dSYehuda Sadeh 86*bd15134aSAishwarya Pant major: (RO) The block device major number. 87dfc5606dSYehuda Sadeh 88*bd15134aSAishwarya Pant client_id: (RO) The ceph unique client id that was assigned 89*bd15134aSAishwarya Pant for this specific session. 90267fb90bSMike Christie 91*bd15134aSAishwarya Pant pool: (RO) The name of the storage pool where this rbd 92*bd15134aSAishwarya Pant image resides. An rbd image name is unique 93*bd15134aSAishwarya Pant within its pool. 94267fb90bSMike Christie 95*bd15134aSAishwarya Pant name: (RO) The name of the rbd image. 960d6d1e9cSMike Christie 97*bd15134aSAishwarya Pant refresh: (WO) Writing to this file will reread the image 98*bd15134aSAishwarya Pant header data and set all relevant data structures 99*bd15134aSAishwarya Pant accordingly. 1000d6d1e9cSMike Christie 101*bd15134aSAishwarya Pant current_snap: (RO) The current snapshot for which the device 102*bd15134aSAishwarya Pant is mapped. 10334b13184SAlex Elder 10434b13184SAlex Elder 105*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/pool_id 106*bd15134aSAishwarya PantDate: Jul, 2012 107*bd15134aSAishwarya PantKernelVersion: v3.6 108*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 109*bd15134aSAishwarya PantDescription: 110*bd15134aSAishwarya Pant (RO) The unique identifier for the rbd image's pool. This is a 111*bd15134aSAishwarya Pant permanent attribute of the pool. A pool's id will never change. 112dfc5606dSYehuda Sadeh 113dfc5606dSYehuda Sadeh 114*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/image_id 115*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/features 116*bd15134aSAishwarya PantDate: Oct, 2012 117*bd15134aSAishwarya PantKernelVersion: v3.7 118*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 119*bd15134aSAishwarya PantDescription: 120*bd15134aSAishwarya Pant image_id: (RO) The unique id for the rbd image. (For rbd 121*bd15134aSAishwarya Pant image format 1 this is empty.) 122dd82fff1SIlya Dryomov 123*bd15134aSAishwarya Pant features: (RO) A hexadecimal encoding of the feature bits 124*bd15134aSAishwarya Pant for this image. 125dd82fff1SIlya Dryomov 126dfc5606dSYehuda Sadeh 127*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/parent 128*bd15134aSAishwarya PantDate: Nov, 2012 129*bd15134aSAishwarya PantKernelVersion: v3.8 130*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 131*bd15134aSAishwarya PantDescription: 132*bd15134aSAishwarya Pant (RO) Information identifying the chain of parent images in a 133*bd15134aSAishwarya Pant layered rbd image. Entries are separated by empty lines. 134dfc5606dSYehuda Sadeh 135589d30e0SAlex Elder 136*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/minor 137*bd15134aSAishwarya PantDate: Dec, 2013 138*bd15134aSAishwarya PantKernelVersion: v3.14 139*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 140*bd15134aSAishwarya PantDescription: 141*bd15134aSAishwarya Pant (RO) The block device minor number. 142589d30e0SAlex Elder 143dfc5606dSYehuda Sadeh 144*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/snap_id 145*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/config_info 146*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/cluster_fsid 147*bd15134aSAishwarya PantWhat: /sys/bus/rbd/devices/<dev-id>/client_addr 148*bd15134aSAishwarya PantDate: Aug, 2016 149*bd15134aSAishwarya PantKernelVersion: v4.9 150*bd15134aSAishwarya PantContact: Sage Weil <sage@newdream.net> 151*bd15134aSAishwarya PantDescription: 152*bd15134aSAishwarya Pant snap_id: (RO) The current snapshot's id. 1539bb2f334SAlex Elder 154*bd15134aSAishwarya Pant config_info: (RO) The string written into 155*bd15134aSAishwarya Pant /sys/bus/rbd/add{,_single_major}. 1569bb2f334SAlex Elder 157*bd15134aSAishwarya Pant cluster_fsid: (RO) The ceph cluster UUID. 158dfc5606dSYehuda Sadeh 159*bd15134aSAishwarya Pant client_addr: (RO) The ceph unique client 160*bd15134aSAishwarya Pant entity_addr_t (address + nonce). The format is 161*bd15134aSAishwarya Pant <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or 162*bd15134aSAishwarya Pant '[1:2:3:4:5:6:7:8]:1234/5678'. 163