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

'lfs migrate --block' does not block modifications

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.17.0
    • Lustre 2.14.0, Lustre 2.16.1
    • None
    • 3
    • 9223372036854775807

    Description

      The "lfs migrate --block FILE" command appears to be broken, since it does not block other processes from modifying a file during migration, and instead returns an error:

      $ dd if=/dev/urandom of=/myth/tmp/random bs=1 oflag=sync &
      $ lfs migrate -c2 --block /myth/tmp/random
      error: lfs migrate: /myth/tmp/random: file changed: Resource temporarily unavailable
      $ lfs migrate -c2 --block /myth/tmp/random
      error: lfs migrate: /myth/tmp/random: file changed: Resource temporarily unavailable
      

      This is likely due to the use of a lease to be notified of the file modification during migration. Previously, "lfs migrate --block" was using a group lock to block other clients from accessing the file during migration.

      The "lfs migrate --block" command is important for OST evacuation, because it is the "last resort" mechanism to move files off an OST before it is removed from service. This needs to complete even if there is an application that is writing to the file, though the application writing to the file will block until the migration is complete.

      Attachments

        Issue Links

          Activity

            People

              flei Feng Lei
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: