[Pvfs2-users] Changing stripe size programmatically

Sam Lang slang at mcs.anl.gov
Mon Oct 19 18:12:12 EDT 2009


On Oct 19, 2009, at 11:50 AM, Kshitij Mehta wrote:

> That raises another question. Is there an API to query existing  
> striping parameters (stripe size, width) for an existing file  
> programmatically?

Yes.  use PVFS_sys_geteattr with the xattr keys:
user.pvfs2.dist_name
user.pvfs2.dist_params

The dist_params attribute is formated as a string.  So you can print  
it, or parse it.  The format is:  <key1>:<value1>,<key2>:<value2>,...

In the default case, the dist_name is going to be "simple_stripe", and  
the dist_params will be:

"stripe_size:65536"

You can also query the number of servers used for striping the file  
with the attribute:

user.pvfs2.num_dfiles

-sam

>
> On Oct 16, 2009, at 10:15 PM, Rob Ross wrote:
>
>> Hi,
>>
>> Yes you can do this via parameters to PVFS_sys_create().
>>
>> It would be easiest for you to look at how this is done in ROMIO,  
>> in this file:
>> src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_open.c
>>
>> Rob
>>
>> On Oct 16, 2009, at 9:59 PM, Kshitij Mehta wrote:
>>
>>> Thank you. I know about these options to change the stripe size  
>>> (in the config file or using setfattr). But that still doesn't  
>>> solve my problem as I need to change the stripe size  
>>> programmatically.
>>>
>>> Thanks,
>>> Kshitij
>>>
>>>
>>> On Oct 16, 2009, at 5:12 PM, Kyle Schochenmaier wrote:
>>>
>>>> Kshitij -
>>>>
>>>> You can modify the stripe size of pvfs2 at run-time :  (best to  
>>>> do it
>>>> here or in the config)
>>>> http://www.pvfs.org/cvs/pvfs-2-8-branch.build/doc/pvfs2-faq/pvfs2-faq.php
>>>> (Chapter 6.6)
>>>> Please note that modifications during run-time will only be  
>>>> propagated
>>>> to *NEW* files.
>>>>
>>>> Additionally you can set the distribution params in the config  
>>>> file.
>>>> http://www.pvfs.org/cvs/pvfs-2-8-branch-docs/doc//pvfs-config-options.php
>>>>
>>>>
>>>> Cheers,
>>>>
>>>> Kyle Schochenmaier
>>>>
>>>>
>>>>
>>>> On Fri, Oct 16, 2009 at 5:02 PM, Kshitij Mehta  
>>>> <kvm1983 at gmail.com> wrote:
>>>>> Hello,
>>>>>
>>>>> Is there a way to change the stripe size for pvfs2  
>>>>> programmatically? I
>>>>> remember seeing a C function, but am unable to locate it. My  
>>>>> apologies if
>>>>> this has been asked before.
>>>>>
>>>>> Thanks,
>>>>> Kshitij Mehta
>>>>> Graduate Student
>>>>> University of Houston
>>>>> www.cs.uh.edu/~kmehta
>>>>>
>>>>> _______________________________________________
>>>>> Pvfs2-users mailing list
>>>>> Pvfs2-users at beowulf-underground.org
>>>>> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
>>>>>
>>>
>>> _______________________________________________
>>> Pvfs2-users mailing list
>>> Pvfs2-users at beowulf-underground.org
>>> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
>>
>
> Kshitij Mehta
> Graduate Student
> Parallel Software Technologies Lab
> Dept. of Computer Science
> University of Houston
> USA
> www.cs.uh.edu/~kmehta
>
> _______________________________________________
> Pvfs2-users mailing list
> Pvfs2-users at beowulf-underground.org
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users



More information about the Pvfs2-users mailing list