Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-1707

Add llapi_* function to return the OST/MDT count for a path.

Details

    • 10514

    Description

      It would be valuable to programmatically discover the number of OSTs that are available. An llapi_* function would be a suitable place for this call.

      Use Case

      When writing HDF5 files one typically configures the number of writers as a fraction of the number of OSTs for best performance.

      Currently this information is only available by writing a file with stripe count set to -1 and then counting the number of stripes present. A programmatic interface to the OST count would simplify this task.

      Attachments

        Issue Links

          Activity

            [LU-1707] Add llapi_* function to return the OST/MDT count for a path.

            The functionality described in the description of this issue is still lacking in the API. A set of new interfaces is needed that implements John's suggestion from this comment.

            nedbass Ned Bass (Inactive) added a comment - The functionality described in the description of this issue is still lacking in the API. A set of new interfaces is needed that implements John's suggestion from this comment.

            Ned, does the new llapi_layout_* functionality landed via http://review.whamcloud.com/5302 or is there still work to be done?

            adilger Andreas Dilger added a comment - Ned, does the new llapi_layout_* functionality landed via http://review.whamcloud.com/5302 or is there still work to be done?

            Yep, I also just had this discussion with Ned.a few minutes ago. This overlaps the work I'm doing in LU-5030 so I will get around to implementing this for you. Looks like I will have to focus my time toward LU-5030 first.

            simmonsja James A Simmons added a comment - Yep, I also just had this discussion with Ned.a few minutes ago. This overlaps the work I'm doing in LU-5030 so I will get around to implementing this for you. Looks like I will have to focus my time toward LU-5030 first.
            afn Andy Nelson added a comment -


            See my above comment of 4:42 Dec 6, 2013, re llapi_get_obd_count in the context of closing this ticket.

            afn Andy Nelson added a comment - See my above comment of 4:42 Dec 6, 2013, re llapi_get_obd_count in the context of closing this ticket.

            While looking at LU-2182 I noticed this ticket. This functionality has been implemented as

            int llapi_get_obd_count(char *mnt, int *count, int is_mdt)

            If this fits what you are looking for then let us know so this ticket can be closed.

            simmonsja James A Simmons added a comment - While looking at LU-2182 I noticed this ticket. This functionality has been implemented as int llapi_get_obd_count(char *mnt, int *count, int is_mdt) If this fits what you are looking for then let us know so this ticket can be closed.

            An even simpler case: A filesystem has 100 OSTs, but one is marked inactive. The function should return 99 in that case.

            morrone Christopher Morrone (Inactive) added a comment - An even simpler case: A filesystem has 100 OSTs, but one is marked inactive. The function should return 99 in that case.

            I understand. My interpretation is now that both Andy and myself do want the 'maximum stripe count', as you suggested.

            rhenwood Richard Henwood (Inactive) added a comment - I understand. My interpretation is now that both Andy and myself do want the 'maximum stripe count', as you suggested.
            jhammond John Hammond added a comment -

            IIRC any system with more than 2000 OSTs will have this property.

            jhammond John Hammond added a comment - IIRC any system with more than 2000 OSTs will have this property.

            John: thanks for your thoughts on this.

            Can you provide an example when: the # of available OSTs != maximum stripe count?

            rhenwood Richard Henwood (Inactive) added a comment - John: thanks for your thoughts on this. Can you provide an example when: the # of available OSTs != maximum stripe count?
            afn Andy Nelson added a comment -

            The thing I want is the maximum number of components I can stripe over from the point of view of my running application.
            I need that quantity for what appears to be exactly the same use case as Richard describes above...setting how many
            (and which) writers I should have.

            So something along the lines of your first suggestion seems the most appropriate for me.

            I'm not really clear on the differences, subtle and not so subtle, between the alphabet soup
            of ost's, obd's, oss's, mds's mdt's and so on, so I'll leave the second issue to you

            Andy

            afn Andy Nelson added a comment - The thing I want is the maximum number of components I can stripe over from the point of view of my running application. I need that quantity for what appears to be exactly the same use case as Richard describes above...setting how many (and which) writers I should have. So something along the lines of your first suggestion seems the most appropriate for me. I'm not really clear on the differences, subtle and not so subtle, between the alphabet soup of ost's, obd's, oss's, mds's mdt's and so on, so I'll leave the second issue to you Andy
            jhammond John Hammond added a comment -

            Do we really want to know how many OSTs are available or rather do we want to know what is the maximum stripe count we can get on a file? I suspect it is the latter. If so we should add a function whose name reflects this (say llapi_get_max_stripe_count(int fd/const char *path/...).

            Second, in the lustre source not all OBDs are OSTs, so if we want the OST count then the function should be llapi_get_ost_count().

            jhammond John Hammond added a comment - Do we really want to know how many OSTs are available or rather do we want to know what is the maximum stripe count we can get on a file? I suspect it is the latter. If so we should add a function whose name reflects this (say llapi_get_max_stripe_count(int fd/const char *path/...). Second, in the lustre source not all OBDs are OSTs, so if we want the OST count then the function should be llapi_get_ost_count().

            People

              wc-triage WC Triage
              rhenwood Richard Henwood (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: