sysfs-bus-rbd 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. major
  19. The block device major number.
  20. name
  21. The name of the rbd image.
  22. image_id
  23. The unique id for the rbd image. (For rbd image format 1
  24. this is empty.)
  25. pool
  26. The name of the storage pool where this rbd image resides.
  27. An rbd image name is unique within its pool.
  28. pool_id
  29. The unique identifier for the rbd image's pool. This is
  30. a permanent attribute of the pool. A pool's id will never
  31. change.
  32. size
  33. The size (in bytes) of the mapped block device.
  34. refresh
  35. Writing to this file will reread the image header data and set
  36. all relevant datastructures accordingly.
  37. current_snap
  38. The current snapshot for which the device is mapped.
  39. create_snap
  40. Create a snapshot:
  41. $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_create
  42. snap_*
  43. A directory per each snapshot
  44. Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
  45. -------------------------------------------------------------
  46. snap_id
  47. The rados internal snapshot id assigned for this snapshot
  48. snap_size
  49. The size of the image when this snapshot was taken.