Re: how to use the setomapval to change rbd size info?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 20, 2016 at 10:48 AM, 张鹏 <zphj1987@xxxxxxxxx> wrote:
> i want change the omapval of a rbd size  so i do some thing like :
>
> 1、create a rbd name zp3 with size 10G
> [root@lab8106 rbdre]# rbd create zp3 --size 10G
>
> 2、see rbd information
> [root@lab8106 rbdre]# rbd info zp3
> rbd image 'zp3':
> size 10240 MB in 2560 objects
> order 22 (4096 kB objects)
> block_name_prefix: rbd_data.39652e242dd4
> format: 2
> features: layering
> flags:
>
> 3、inquire the rbd size omapval
> [root@lab8106 rbdre]# rados -p rbd getomapval rbd_header.39652e242dd4 size
> value (8 bytes) :
> 0000 : 00 00 00 80 02 00 00 00                         : ........
>
> as i see  the value of size is  00 00 00 80 02 00 00 00   ;a hex dump valume
>
> 4、set rbd size with a radom value 111111111 (i dont know how to choose value
> do set it  that is my problem)
> [root@lab8106 rbdre]# rados -p rbd setomapval rbd_header.39652e242dd4 size
> 111111111
>
> 5、inquire the rbd size omapval again
> [root@lab8106 rbdre]#  rados -p rbd getomapval rbd_header.39652e242dd4 size
> value (9 bytes) :
> 0000 : 31 31 31 31 31 31 31 31 31                      : 111111111
>
> 6、inquire the rbd  size info  again
> [root@lab8106 rbdre]# rbd info zp3
> rbd image 'zp3':
> size 3148 PB in 845114819781 objects
> order 22 (4096 kB objects)
> block_name_prefix: rbd_data.39652e242dd4
> format: 2
> features: layering
> flags:
>
> =============================================
> so my question is  how can i set the rbd size  omapval to be:
> 0000 : 00 00 00 80 02 00 00 00
>  rados -p rbd setomapval rbd_header.39652e242dd4 size  (value)
>
> the value  how to write it?

$ echo -en \\x00\\x00\\x00\\x80\\x02\\x00\\x00\\x00 | rados -p rbd
setomapval rbd_header.39652e242dd4 size

Thanks,

                Ilya
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux