[lustre-discuss] Delaying Lustre striping until first extent

Dilger, Andreas andreas.dilger at intel.com
Tue May 3 12:43:24 PDT 2016


You can open files with O_LOV_DELAY_CREATE to delay layout assignment, and then use ioctl(fd, LL_IOC_LOV_SETSTRIPE, lum) to specify the striping afterward, but this misses a lot of the error checking and other layout handling in llapi_file_open() and friends.

We haven't had a request for llapi_fd_set_stripe() and/or llapi_layout_fd_set() or similar, but I can see that this would be useful.  Could you please file an improvement request for this in Jira.

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel High Performance Data Division

On 2016/05/03, 06:23, "John Bauer" <bauerj at iodoctors.com<mailto:bauerj at iodoctors.com>> wrote:


Has any there been any discussion as to allowing a user to modify the striping of a file until the first extent is made?  There are a lot of opens that can not be easily replaced with llapi_file_open(), such as openat() family, mkstemp() family, and fopen() family.

It seems that it should be feasible to change the file's striping even after the file is created but not written to.

It would be really handy to have a function llapi_fd_set_stripe( int fd, ... ) to set the striping for a file that has been opened but not written to.  I have gotten past my immediate need for setting the striping of a file opened with fopen64() by doing the llapi_file_open() and then using the resulting fd in fdopen().  But this approach is not applicable to all listed above.


Thanks, John

--
I/O Doctors, LLC
507-766-0378
bauerj at iodoctors.com<mailto:bauerj at iodoctors.com>


More information about the lustre-discuss mailing list