小编给大家分享一下ceph中rbd format1与rbd fromat2的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
rbd format1与rbd fromat2
rbd format1:
[root@osd1 /]# rbd create myrbd/rbd1 -s 8[root@osd1 /]# rbd info myrbd/rbd1rbd image 'rbd1':size 8192 kB in 2 objectsorder 22 (4096 kB objects)block_name_prefix: rb.0.13fb.6b8b4567format: 1[root@osd1 /]# rados ls -p myrbdrbd_directoryrbd1.rbd[root@osd1 /]# rbd map myrbd/rbd1[root@osd1 /]# rbd showmappedid pool image snap device 0 myrbd rbd1 - /dev/rbd0 [root@osd1 /]# dd if=/dev/zero of=/dev/rbd0 dd: writing to `/dev/rbd0': No space left on device16385+0 records in16384+0 records out8388608 bytes (8.4 MB) copied, 2.25155 s, 3.7 MB/s[root@osd1 /]# rados ls -p myrbdrbd_directoryrbd1.rbdrb.0.13fb.6b8b4567.000000000001rb.0.13fb.6b8b4567.000000000000
$image_name.rbd : 包含了这个块的id (rb.0.13fb.6b8b4567)
$rbd_id.$fragment : 数据块
rbd_directory :当前pool中rbd块的列表
rbd format2
[root@osd1 /]# rbd create myrbd/rbd1 -s 8 --image-format=2[root@osd1 /]# rbd info myrbd/rbd1rbd image 'rbd1':size 8192 kB in 2 objectsorder 22 (4096 kB objects)block_name_prefix: rbd_data.13436b8b4567format: 2features: layering[root@osd1 /]# rados ls -p myrbdrbd_directoryrbd_header.13436b8b4567rbd_id.rbd1[root@osd1 /]# rbd map myrbd/rbd1[root@osd1 /]# rbd showmappedid pool image snap device 0 myrbd rbd1 - /dev/rbd0 [root@osd1 /]# dd if=/dev/zero of=/dev/rbd0dd: writing to `/dev/rbd0': No space left on device16385+0 records in16384+0 records out8388608 bytes (8.4 MB) copied, 2.14407 s, 3.9 MB/s[root@osd1 /]# rados ls -p myrbdrbd_directoryrbd_data.13436b8b4567.0000000000000000rbd_data.13436b8b4567.0000000000000001rbd_header.13436b8b4567rbd_id.rbd1
rbd_data.$rbd_id.$fragment :数据块
rbd_directory : 当前pool中rbd块的列表
rbd_header.$rbd_id : rbd块的元数据
rbd_id.$image_name : 包含了这个块的id ( 13436b8b4567 )
以上是“ceph中rbd format1与rbd fromat2的示例分析”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注编程网行业资讯频道!