sysfs-bus-rbd 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. Being used for adding and removing rbd block devices.
  7. Usage: <mon ip addr> <options> <pool name> <rbd image name> [snap name]
  8. $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
  9. The snapshot name can be "-" or omitted to map the image read/write. A <dev-id>
  10. will be assigned for any registered block device. If snapshot is used, it will
  11. be mapped read-only.
  12. Removal of a device:
  13. $ echo <dev-id> > /sys/bus/rbd/remove
  14. What: /sys/bus/rbd/add_single_major
  15. Date: December 2013
  16. KernelVersion: 3.14
  17. Contact: Sage Weil <sage@inktank.com>
  18. Description: Available only if rbd module is inserted with single_major
  19. parameter set to true.
  20. Usage is the same as for /sys/bus/rbd/add. If present,
  21. should be used instead of the latter: any attempts to use
  22. /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is
  23. available will fail for backwards compatibility reasons.
  24. What: /sys/bus/rbd/remove_single_major
  25. Date: December 2013
  26. KernelVersion: 3.14
  27. Contact: Sage Weil <sage@inktank.com>
  28. Description: Available only if rbd module is inserted with single_major
  29. parameter set to true.
  30. Usage is the same as for /sys/bus/rbd/remove. If present,
  31. should be used instead of the latter: any attempts to use
  32. /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
  33. available will fail for backwards compatibility reasons.
  34. Entries under /sys/bus/rbd/devices/<dev-id>/
  35. --------------------------------------------
  36. client_id
  37. The ceph unique client id that was assigned for this specific session.
  38. features
  39. A hexadecimal encoding of the feature bits for this image.
  40. major
  41. The block device major number.
  42. minor
  43. The block device minor number. (December 2013, since 3.14.)
  44. name
  45. The name of the rbd image.
  46. image_id
  47. The unique id for the rbd image. (For rbd image format 1
  48. this is empty.)
  49. pool
  50. The name of the storage pool where this rbd image resides.
  51. An rbd image name is unique within its pool.
  52. pool_id
  53. The unique identifier for the rbd image's pool. This is
  54. a permanent attribute of the pool. A pool's id will never
  55. change.
  56. size
  57. The size (in bytes) of the mapped block device.
  58. refresh
  59. Writing to this file will reread the image header data and set
  60. all relevant datastructures accordingly.
  61. current_snap
  62. The current snapshot for which the device is mapped.
  63. parent
  64. Information identifying the chain of parent images in a layered rbd
  65. image. Entries are separated by empty lines.