Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 1 | What: /sys/bus/rbd/ |
| 2 | Date: November 2010 |
Sage Weil | 55b00ba | 2011-03-21 15:06:50 -0700 | [diff] [blame] | 3 | Contact: Yehuda Sadeh <yehuda@newdream.net>, |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 4 | Sage Weil <sage@newdream.net> |
| 5 | Description: |
| 6 | |
| 7 | Being used for adding and removing rbd block devices. |
| 8 | |
| 9 | Usage: <mon ip addr> <options> <pool name> <rbd image name> [snap name] |
| 10 | |
| 11 | $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add |
| 12 | |
| 13 | The snapshot name can be "-" or omitted to map the image read/write. A <dev-id> |
| 14 | will be assigned for any registered block device. If snapshot is used, it will |
| 15 | be mapped read-only. |
| 16 | |
| 17 | Removal of a device: |
| 18 | |
| 19 | $ echo <dev-id> > /sys/bus/rbd/remove |
| 20 | |
| 21 | Entries under /sys/bus/rbd/devices/<dev-id>/ |
| 22 | -------------------------------------------- |
| 23 | |
| 24 | client_id |
| 25 | |
| 26 | The ceph unique client id that was assigned for this specific session. |
| 27 | |
Alex Elder | 34b1318 | 2012-07-13 20:35:12 -0500 | [diff] [blame] | 28 | features |
| 29 | |
| 30 | A hexadecimal encoding of the feature bits for this image. |
| 31 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 32 | major |
| 33 | |
| 34 | The block device major number. |
| 35 | |
| 36 | name |
| 37 | |
| 38 | The name of the rbd image. |
| 39 | |
Alex Elder | 589d30e | 2012-07-10 20:30:11 -0500 | [diff] [blame] | 40 | image_id |
| 41 | |
| 42 | The unique id for the rbd image. (For rbd image format 1 |
| 43 | this is empty.) |
| 44 | |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 45 | pool |
| 46 | |
Alex Elder | 9bb2f33 | 2012-07-12 10:46:35 -0500 | [diff] [blame] | 47 | The name of the storage pool where this rbd image resides. |
| 48 | An rbd image name is unique within its pool. |
| 49 | |
| 50 | pool_id |
| 51 | |
| 52 | The unique identifier for the rbd image's pool. This is |
| 53 | a permanent attribute of the pool. A pool's id will never |
| 54 | change. |
Yehuda Sadeh | dfc5606 | 2010-11-19 14:51:04 -0800 | [diff] [blame] | 55 | |
| 56 | size |
| 57 | |
| 58 | The size (in bytes) of the mapped block device. |
| 59 | |
| 60 | refresh |
| 61 | |
| 62 | Writing to this file will reread the image header data and set |
| 63 | all relevant datastructures accordingly. |
| 64 | |
| 65 | current_snap |
| 66 | |
| 67 | The current snapshot for which the device is mapped. |
| 68 | |
Alex Elder | 86b00e0 | 2012-10-25 23:34:42 -0500 | [diff] [blame] | 69 | parent |
| 70 | |
| 71 | Information identifying the pool, image, and snapshot id for |
| 72 | the parent image in a layered rbd image (format 2 only). |