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

lfs_migrate is failing with a volatile file Operation not permitted error

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.6.0, Lustre 2.5.1
    • Lustre 2.4.0, Lustre 2.4.1
    • None
    • Lustre 2.4.1 RHEL6 2.6.32-358.18.1.el6_lustre.x86_64

    Description

      "lfs_migrate -y" aborts with this error

      cannot swap layouts between <filename> and a volatile file (Operation not permitted)

      This seems to happen for all files. The lfs_migrate operation aborts on the first file.

      Attachments

        Issue Links

          Activity

            [LU-4293] lfs_migrate is failing with a volatile file Operation not permitted error
            pjones Peter Jones added a comment -

            Landed for 2.5.1 and 2.6

            pjones Peter Jones added a comment - Landed for 2.5.1 and 2.6
            bogl Bob Glossman (Inactive) added a comment - backport to b2_5: http://review.whamcloud.com/9278
            aalba6675 Anthony Alba added a comment -

            I have also observed this on a filesystem created with 2.1.x and migrated to 2.4.2.
            Exactly the same error message but this happens only with some directories.
            Some directories lfs_migrate'd perfectly.

            aalba6675 Anthony Alba added a comment - I have also observed this on a filesystem created with 2.1.x and migrated to 2.4.2. Exactly the same error message but this happens only with some directories. Some directories lfs_migrate'd perfectly.
            bfaccini Bruno Faccini (Inactive) added a comment - - edited

            My patch at http://review.whamcloud.com/8737 seems to address the original need (allow legitimate IGIFs, handle root special-case, ...) for this ticket now, only have to answer reviewers comments.

            bfaccini Bruno Faccini (Inactive) added a comment - - edited My patch at http://review.whamcloud.com/8737 seems to address the original need (allow legitimate IGIFs, handle root special-case, ...) for this ticket now, only have to answer reviewers comments.
            yujian Jian Yu added a comment -

            Patch http://review.whamcloud.com/8616 was cherry-picked to Lustre b2_5 branch.

            yujian Jian Yu added a comment - Patch http://review.whamcloud.com/8616 was cherry-picked to Lustre b2_5 branch.

            I wonder if the -EPERM error seen on non-IGIF files is due to some file ownership problem like LU-3826 or similar?

                    if ((attr1->la_uid != attr2->la_uid) ||
                        (attr1->la_gid != attr2->la_gid))
                            RETURN(-EPERM);
            

            This will fail if lfs_migrate is not creating the file with the same ownership as the original file? If lfs_migrate is running as root, then it should be able to fchown() the file after it is created. The actual permissions don't matter, because the temporary file will be deleted, but this is proof that the caller of the migrate has permission to do this swap.

            adilger Andreas Dilger added a comment - I wonder if the -EPERM error seen on non-IGIF files is due to some file ownership problem like LU-3826 or similar? if ((attr1->la_uid != attr2->la_uid) || (attr1->la_gid != attr2->la_gid)) RETURN(-EPERM); This will fail if lfs_migrate is not creating the file with the same ownership as the original file? If lfs_migrate is running as root, then it should be able to fchown() the file after it is created. The actual permissions don't matter, because the temporary file will be deleted, but this is proof that the caller of the migrate has permission to do this swap.

            Patch to allow layout swap for IGIF file is at http://review.whamcloud.com/8737.

            bfaccini Bruno Faccini (Inactive) added a comment - Patch to allow layout swap for IGIF file is at http://review.whamcloud.com/8737 .

            People

              bfaccini Bruno Faccini (Inactive)
              wbaudler Wolfgang Baudler
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: