Hi, I just pushed out an ioctl to do this. See src/test/test_setlayout.c for a quick example. You should follow the GET_LAYOUT + modify + SET_LAYOUT pattern as some of the fields are best set by the MDS and may change (e.g. fl_pg_pool). It's only lightly tested, but should behave.
See struct ceph_file_layout in include/ceph_fs.h for the fields. To preferentially place a file on a specific OSD, you want ot set fl_pg_preferred >= 0 (to the OSD# you want the data to go to). There's no layout conversion, so you need to set the layout before writing any data. sage On Fri, 15 Aug 2008, Erwin, Brock A wrote: > Yes, that would be cool. > > Brock > > -----Original Message----- > From: Sage Weil [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 14, 2008 7:10 PM > To: Erwin, Brock A > Cc: ceph-devel@lists.sourceforge.net > Subject: Re: [ceph-devel] Striping strategy for ceph > > Hi Brock- > > On Thu, 14 Aug 2008, Erwin, Brock A wrote: > > I understand that ceph defaults to stripe in 1 Meg chunks over OSDs, > > however, is it possible to force ceph to store a particular file on > one > > and only one OSD? I am interested in doing some work with Active > > Storage, which seeks to do processing on the data on the OSD itself > and > > not on the client that mounts the filesystem. In traditional parallel > > file systems, OSDs are usually left with a lot of processing power > > unused. If the files are striped, then active storage becomes > extremely > > complex. So in conclusion, it would be nice if ceph were customizable > > in that it would allow you to turn off striping for any files that you > > specify. > > All of the data structures and infrastructure is in place for objects to > > be preferentially allocated to a specific OSD on a per-file basis. The > only missing piece is the interface to let users set it.. an ioctl() to > specify the layout (including things like stripe size) after the file is > > created (but before data is written). > > If you'd like to play with this, I'll move that up on my todo list! > > sage > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Ceph-devel mailing list > Ceph-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ceph-devel > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ceph-devel mailing list Ceph-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ceph-devel