sysfs-bus-rbd 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. Entries under /sys/bus/rbd/devices/<dev-id>/
  15. --------------------------------------------
  16. client_id
  17. The ceph unique client id that was assigned for this specific session.
  18. features
  19. A hexadecimal encoding of the feature bits for this image.
  20. major
  21. The block device major number.
  22. name
  23. The name of the rbd image.
  24. image_id
  25. The unique id for the rbd image. (For rbd image format 1
  26. this is empty.)
  27. pool
  28. The name of the storage pool where this rbd image resides.
  29. An rbd image name is unique within its pool.
  30. pool_id
  31. The unique identifier for the rbd image's pool. This is
  32. a permanent attribute of the pool. A pool's id will never
  33. change.
  34. size
  35. The size (in bytes) of the mapped block device.
  36. refresh
  37. Writing to this file will reread the image header data and set
  38. all relevant datastructures accordingly.
  39. current_snap
  40. The current snapshot for which the device is mapped.
  41. snap_*
  42. A directory per each snapshot
  43. parent
  44. Information identifying the pool, image, and snapshot id for
  45. the parent image in a layered rbd image (format 2 only).
  46. Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
  47. -------------------------------------------------------------
  48. snap_id
  49. The rados internal snapshot id assigned for this snapshot
  50. snap_size
  51. The size of the image when this snapshot was taken.
  52. snap_features
  53. A hexadecimal encoding of the feature bits for this snapshot.