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

Clients striping from mapped FID in nodemap

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 9223372036854775807

    Description

      The main idea is to bind a FID given by path or FID (formatted with or without brackets)
      The associated set of clients (range) when creating files or directories, will inherit striping information from template FID when it's possible. Striping priorities:

      1. Explicit striping
      2. Parent striping
      3. Template striping
      4. Filesystem default

      As it's possible to query the nodemap on a given export, it's possible to get the information on the MDT stack which will transmit the template object to lower layer. Then, when a template exists, a new field into dt_allocation_hint points to the template object and will be read in lod_ah_init function and lod_layout_component is filled accordingly.

      Example of usage:

      • Start lustre
      • On a client (normal striping)
        [root@client ~]# mount -t lustre 192.168.10.134@tcp:/testfs /lustre/testfs2
        [root@client ~]# cd /lustre/testfs2/
        [root@client testfs2]# echo "test" > testfile
        [root@client testfs2]# lfs getstripe -c testfile
        1
        [root@client testfs2]# lfs getstripe -c my_template
        2
        [root@client testfs2]# lfs path2fid my_template
        [0x200000402:0x1:0x0]
        
      • On the MGS node (creating the nodemap + adding client or range)
        [root@mds1]# lctl nodemap_add  SG1
        [root@mds1]# lctl nodemap_add_range --name SG1 --range 192.168.10.[130-140]@tcp
        [root@mds1]# lctl set_param -P nodemap.SG1.template=0x200000401:0x1:0x0
        or
        [root@mds1]# lctl nodemap_set_template --name SG1 --template /lustre/testfs2/my_template
        or
        [root@mds1]# lctl nodemap_set_template --name SG1 --template 0x200000401:0x1:0x0
        or
        [root@mds1]# lctl nodemap_set_template --name SG1 --template "[0x200000401:0x1:0x0]"
        [root@mds1]# lctl nodemap_modify --name SG1 --property admin --value 1 # working as root
        [root@mds1]# lctl nodemap_activate 1
        [root@mds1]# cat /proc/fs/lustre/nodemap/SG1/template
        0x200000402:0x1:0x0
        
      • On the client:
        [root@client testfs2]# echo "test" > testfile2
        [root@client testfs2]# lfs getstripe -c testfile2
        2
        

      Todo in next days:

      • add a valid fid format check when bound
      • I intend to change the type of record from char[FID_LEN] to lu_fid directly (add a nodemap record). It will prevent the call to sscanf in mdt_reint_open

      Attachments

        Issue Links

          Activity

            People

              eaujames Etienne Aujames
              riauxjb Jean-Baptiste Riaux (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated: