cliffw@clusterfs.com
2007-Feb-07 14:25 UTC
[Lustre-devel] [Bug 11665] can I specific file pattern to set the strip size
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=11665 Depending on how you create the files, there may be a way. You can specify stripe size for a file that does not yet exist, and Lustre will create that file. Depending on your application this may be a workaround. There is some odd behavior with wildcarded names, due to shell interactions. If an expansion of the wild-carded file name already exists, the shell will expand it into a list, which causes lfs setstripe to exit with an error. This is really somewhat of a bug, as lfs setstripe should really allow a list of files as a param. If an expansion of the wild-carded file name does not exist, lfs will create a file and name it with the wild card. Thus, if we have a directory with the files dummy.1 and dummy.2 # lfs setstripe dummy.* 0 -1 1 will exit with an error, but # lfs setstripe bob.* 0 -1 1 will create a new file named ''bob.*'' - not especially useful behavior, but ''bob.*'' is a legal filename, so we''re somewhat stuck with it. So the answer is you cannot give lfs setstripe a pattern as a file name.
adilger@clusterfs.com
2007-Feb-07 18:07 UTC
[Lustre-devel] [Bug 11665] can I specific file pattern to set the strip size
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=11665 (In reply to comment #1)> If an expansion of the wild-carded file name already exists, the shell will > expand it into a list, which causes lfs setstripe to exit with an error.This is expected, because you cannot change the striping on files that already exist.> If an expansion of the wild-carded file name does not exist, lfs will create a > file and name it with the wild card.In Unix the wildcard expansion is a function of the shell, so if it has nothing to expand against it will pass the literal arguments to lfs (or any other program). That said, I think the original question is whether it is possible to specify a "persistent" wildcard parameter for striping. This would imply that all filenames of the form "xxx.xxx.segy" will inherit the specified striping when they are created. This has been previously discussed by CFS and is something we want to implement (as part of a feature called "OST pools") but it is not yet available.
adilger@clusterfs.com
2007-Feb-09 00:31 UTC
[Lustre-devel] [Bug 11665] can I specific file pattern to set the strip size
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=11665 (In reply to comment #4)> Our developer wants to know whether there is a c API we can cell lfs to change > the stripesize instead of using "system" call.Your application can link into the liblustreapi.a library. It should include <lustre/liblustreapi.h> header file. The function for creating files with specified striping is llapi_file_create