X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=SettingLustreProperties.xml;fp=SettingLustreProperties.xml;h=cafb4e16ce59750ac234d55690ded4d0a0913452;hb=9a6f1cf2d40f42f7f472d413e019c0ee5023a1cf;hp=af46698e485b5d2b482164b3db3fe6d6d4c16683;hpb=71626556510627a391b1ff5b7316eefae5053a44;p=doc%2Fmanual.git diff --git a/SettingLustreProperties.xml b/SettingLustreProperties.xml index af46698..cafb4e1 100644 --- a/SettingLustreProperties.xml +++ b/SettingLustreProperties.xml @@ -1,55 +1,35 @@ - + - Setting Lustre Properties in a C Program (llapi) + Setting Lustre Properties in a C Program (llapi) This chapter describes the llapi library of commands used for setting Lustre file properties within a C program running in a cluster environment, such as a data processing or MPI application. The commands described in this chapter are: - llapi_file_create + + - + + - llapi_file_get_stripe + + - + + - llapi_file_open - - - - - - llapi_quotactl - - - - - - llapi_path2fid - - - + + -   - - - - - - Note -Lustre programming interface man pages are found in the lustre/doc folder. - - - - -
- <anchor xml:id="dbdoclet.50438215_pgfId-1296828" xreflabel=""/> -
- 34.1 <anchor xml:id="dbdoclet.50438215_30970" xreflabel=""/>llapi_file_create + + Lustre programming interface man pages are found in the lustre/doc folder. + +
+ 34.1 llapi_file_create Use llapi_file_create to set Lustre properties for a new file.
<anchor xml:id="dbdoclet.50438215_pgfId-1296830" xreflabel=""/>Synopsis @@ -60,7 +40,7 @@ stripe_count, int stripe_pattern);
<anchor xml:id="dbdoclet.50438215_pgfId-1296833" xreflabel=""/>Description - The llapi_file_create() function sets a file descriptor’s Lustre striping information. The file descriptor is then accessed with open (). + The llapi_file_create() function sets a file descriptor's Lustre striping information. The file descriptor is then accessed with open (). @@ -74,7 +54,7 @@ stripe_count, int stripe_pattern); llapi_file_create() - If the file already exists, this parameter returns to ‘EEXIST’. If the stripe parameters are invalid, this parameter returns to ‘EINVAL’. + If the file already exists, this parameter returns to 'EEXIST'. If the stripe parameters are invalid, this parameter returns to 'EINVAL'. stripe_size @@ -95,16 +75,7 @@ stripe_count, int stripe_pattern); - - - - - - Note -Currently, only RAID 0 is supported. To use the system defaults, set these values: stripe_size = 0, stripe_offset = -1, stripe_count = 0, stripe_pattern = 0 - - - - + Currently, only RAID 0 is supported. To use the system defaults, set these values: stripe_size = 0, stripe_offset = -1, stripe_count = 0, stripe_pattern = 0
<anchor xml:id="dbdoclet.50438215_pgfId-1296861" xreflabel=""/>Examples @@ -127,14 +98,14 @@ stripe_count, int stripe_pattern); rc = llapi_file_create(tfile, stripe_size,stripe_offset, stripe_count,strip\ e_pattern); - Result code is inverted, you may return with ’EINVAL’ or an ioctl error. + Result code is inverted, you may return with 'EINVAL' or an ioctl error. if (rc) { fprintf(stderr,"llapi_file_create failed: %d (%s) 0, rc, strerror(-rc));retu\ rn -1; } llapi_file_create closes the file descriptor. You must re-open the descriptor. To do this, run: fd = open(tfile, O_CREAT | O_RDWR | O_LOV_DELAY_CREATE, 0644); if (fd < 0) \\ - { fprintf(stderr, "Can’t open %s file: %s0, tfile, + { fprintf(stderr, "Can't open %s file: %s0, tfile, str- error(errno)); return -1; @@ -142,8 +113,8 @@ rn -1; }
-
- 34.2 <anchor xml:id="dbdoclet.50438215_50149" xreflabel=""/>llapi_file_get_stripe +
+ 34.2 llapi_file_get_stripe Use llapi_file_get_stripe to get striping information for a file or directory on a Lustre file system.
<anchor xml:id="dbdoclet.50438215_pgfId-1296887" xreflabel=""/>Synopsis @@ -232,19 +203,19 @@ rn -1; } l_object_id - Holds the OST’s object ID. + Holds the OST's object ID. l_object_seq - Holds the OST’s object group. + Holds the OST's object group. l_ost_gen - Holds the OST’s index generation. + Holds the OST's index generation. l_ost_idx - Holds the OST’s index in LOV. + Holds the OST's index in LOV. @@ -346,8 +317,8 @@ rn -1; }
-
- 34.3 <anchor xml:id="dbdoclet.50438215_86607" xreflabel=""/>llapi_file_open +
+ 34.3 llapi_file_open The llapi_file_open command opens (or creates) a file or device on a Lustre filesystem.
<anchor xml:id="dbdoclet.50438215_pgfId-1297361" xreflabel=""/>Synopsis @@ -477,8 +448,8 @@ rn -1; }
-
- 34.4 <anchor xml:id="dbdoclet.50438215_12433" xreflabel=""/>llapi_quotactl +
+ 34.4 llapi_quotactl Use llapi_quotactl to manipulate disk quotas on a Lustre file system.
<anchor xml:id="dbdoclet.50438215_pgfId-1297145" xreflabel=""/>Synopsis @@ -620,8 +591,8 @@ rn -1; }
-
- 34.5 <anchor xml:id="dbdoclet.50438215_15718" xreflabel=""/>llapi_path2fid +
+ 34.5 llapi_path2fid Use llapi_path2fid to get the FID from the pathname.
<anchor xml:id="dbdoclet.50438215_pgfId-1297263" xreflabel=""/>Synopsis @@ -643,9 +614,9 @@ rn -1; } non-zero value On failure
-
- 34.6 Example <anchor xml:id="dbdoclet.50438215_marker-1297700" xreflabel=""/>Using the llapi Library - Use llapi_file_create to set Lustre properties for a new file. For a synopsis and description of llapi_file_create and examples of how to use it, see Chapter 35: Configuration Files and Module Parameters. +
+ 34.6 Example Using the llapi Library + Use llapi_file_create to set Lustre properties for a new file. For a synopsis and description of llapi_file_create and examples of how to use it, see . You can set striping from inside programs like ioctl. To compile the sample program, you need to download libtest.c and liblustreapi.c files from the Lustre source tree. A simple C program to demonstrate striping API - libtest.c /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- @@ -887,9 +858,11 @@ dx, lump->lmm_objects[i].l_object_id);
<anchor xml:id="dbdoclet.50438215_pgfId-1297929" xreflabel=""/>See Also - llapi_file_create, llapi_file_get_stripe, llapi_file_open, llapi_quotactl -   + + llapi_file_create, + llapi_file_get_stripe, + llapi_file_open, + llapi_quotactl
-