I want to know whether metadata is also created using rados put {object-name} {file-path} --pool=data
command in ceph?
If not then how metadata can be created and viewed?
The omapval and xattr commands of rados allow you to attach key/value pairs to the object. They are not included in the content of the object itself, they are metadata. By default there are no omapval or xattr when you create a new object. Here are a few examples:
$ rados put FOO /etc/group --pool rbd
$ rados listomapvals FOO --pool rbd
$ rados setomapval FOO frob nitz --pool rbd
$ rados listomapvals FOO --pool rbd
frob
value: (4 bytes) :
0000 : 6e 69 74 7a : nitz
$ rados listxattr FOO --pool rbd
$ rados setxattr FOO fi bou --pool rbd
$ rados listxattr FOO --pool rbd
fi
$ rados getxattr FOO fi --pool rbd
bou