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

FLR: mirroring a non-mirrored file in a directory with default FLR layout fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • Lustre 2.12.8
    • None

    Description

      If a file does not have a mirror in a directory with a default FLR mirror, then running "lfs mirror extend" on the file fails with "cannot create volatile file: Invalid argument".

      A non-striped file can be created in a directory with a default FLR layout, for example, if a new file is created with "O_APPEND" (LU-9341) and uses the mdt.*.append_* parameters to create the file layout, or if a non-mirrored file is renamed into a directory with a default FLR layout.

      # mkdir $DIR/$tdir
      # lfs setstripe -N -c 1 -i 0 -N -c 1 -i 1 $DIR/$tdir
      # echo $tfile >> $DIR/$tdir/$tfile.append
      # lfs getstripe -N $DIR/$tdir/$tfile.append
      
      # lfs mirror extend -N -c 1 -i 2 $DIR/$tdir/$tfile.append
      lfs mirror extend: /mnt/testfs/d2/f2.append: cannot create volatile file: Invalid argument
      

      It appears that the problem might relate to the "lfs mirror extend" volatile file inheriting the FLR layout from the parent directory but then confusing the logic later and causing the extend operation to fail. Hard-linking the file into a non-FLR parent directory allows the "lfs mirror extend" to create a mirror on the file:

      # mkdir $DIR/$tdir.tmp
      # lfs setstripe -d $DIR/$tdir.tmp
      # ln $DIR/$tdir/$tfile-append $DIR/$tdir.tmp/$tfile.tmp
      # lfs mirror extend -N -c 1 -i 2 $DIR/$tdir.tmp/$tfile.tmp
      # rm $DIR/$tdir.tmp/$tfile.tmp
      # lfs getstripe -N $DIR/$tdir/$tfile.append
      2
      

      Attachments

        Activity

          People

            bobijam Zhenyu Xu
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: