sysfs-bus-rbd 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. pool
  23. The pool where this rbd image resides. The pool-name pair is unique
  24. per rados system.
  25. size
  26. The size (in bytes) of the mapped block device.
  27. refresh
  28. Writing to this file will reread the image header data and set
  29. all relevant datastructures accordingly.
  30. current_snap
  31. The current snapshot for which the device is mapped.
  32. snap_*
  33. A directory per each snapshot
  34. Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
  35. -------------------------------------------------------------
  36. id
  37. The rados internal snapshot id assigned for this snapshot
  38. size
  39. The size of the image when this snapshot was taken.