Skip to contentSkip to conversation

how to use the function ceph_open_layout

DISCUSSION 鹏 3 participants 3 messages Jan 3, 2014 1 message not in the archive

lore
Share & tools
lore

鹏

author
#0 lore raw

|
Hi all;
today, I want to use the fuction of ceph_open_layout() in libcephFs.h

I creat a new pool success,

# rados mkpool data1
and then I  edit the code like this:

int fd = ceph_open_layout( cmount, c_path, O_RDONLY|O_CREAT, 0666. (1<<22), 1, (1<<22) , "data1")

and then the fd is -22!!!!!!!!!

when I use the data pool , it can success
int fd = ceph_open_layout( cmount, c_path, O_RDONLY|O_CREAT, 0666. (1<<22), 1, (1<<22) , "data")

the ceph_open_layout support read/write to a new pool???

thinks you for the help!
yous !

|
|
|   |   |
|

_______________________________________________
ceph-users mailing list [email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

A message that is not in the archive (sent off-list or not yet received): 28fa4e4e.af9f.14356a4e251.Coremail.wkp4666-KN7UnAbNpbg@public.gmane.org

#2 lore raw

You'll need to register the new pool with the MDS:

ceph mds add_data_pool <pool id>

Quoted 29 lines · On Thu, Jan 2, 2014 at 9:48 PM, 鹏 <[email protected]> wrote:

Hi all;
today, I want to use the fuction of ceph_open_layout() in libcephFs.h

I creat a new pool success,

# rados mkpool data1
and then I  edit the code like this:

int fd = ceph_open_layout( cmount, c_path, O_RDONLY|O_CREAT, 0666. (1<<22), 1, (1<<22) , "data1")

and then the fd is -22!!!!!!!!!

when I use the data pool , it can success
int fd = ceph_open_layout( cmount, c_path, O_RDONLY|O_CREAT, 0666. (1<<22), 1, (1<<22) , "data")

the ceph_open_layout support read/write to a new pool???

thinks you for the help!
yous !

Quoted 5 lines

_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

#3 lore raw
In reply to 鹏
Quoted 5 lines · On Fri, 3 Jan 2014, ? wrote:

 Hi all;
today,  I want to use the fuction of ceph_open_layout() in libcephFs.h

I creat a new pool  success,

# rados mkpool data1

You also need to do

ceph mds add_data_pool data1

sage

Quoted 26 lines

and then I  edit the code like this:

int fd = ceph_open_layout( cmount, c_path, O_RDONLY|O_CREAT, 0666. (1<<22), 1, (1<<22) , "data1")

and then the fd is -22!!!!!!!!!

when I use the data pool , it can success
int fd = ceph_open_layout( cmount, c_path, O_RDONLY|O_CREAT, 0666. (1<<22), 1, (1<<22) , "data")

the ceph_open_layout support read/write to a new pool???

             thinks you for the help!
yous !