Details

    • Technical task
    • Resolution: Fixed
    • Major
    • Lustre 2.12.0
    • None
    • 9223372036854775807

    Description

      Make migration for DoM files with LFS command. This is not working out-of-box for Data-on-MDT files because it is not enough just change layout, data should be moved as well.

      Attachments

        Issue Links

          Activity

            [LU-10177] DoM: manual migration MDT-OST
            pjones Peter Jones added a comment -

            Landed for 2.12

            pjones Peter Jones added a comment - Landed for 2.12

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32979/
            Subject: LU-10177 lfs: support DOM-to-OST migration
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: f651470c13f83bc11237e12f6fdce9cdbf96561b

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32979/ Subject: LU-10177 lfs: support DOM-to-OST migration Project: fs/lustre-release Branch: master Current Patch Set: Commit: f651470c13f83bc11237e12f6fdce9cdbf96561b

            well, my idea was to make that manually first with steps like:

            • lfs mirror extend -N <new DOM layout> <some non-dom file>
            • lfs resync
            • lfs split --mirror-id 1 -d

            and make it work, it is not working just out of box and requires code update to make DOM code understand FLR cases, e.g. DOM component can be not first one with FLR, but still should be first one inside a mirror, also we need to allow only one DOM component in all mirrors and so on.
            I think that will be good as first step, at least simple script will be able to migrate files to MDT like that and Lustre code will be ready for FLR+DOM configurations. I'd say it shouldn't take a lot of time, but let me do more checks first.

            Next step will be implementing that in code as single call, probably with some optimizations.

            tappro Mikhail Pershin added a comment - well, my idea was to make that manually first with steps like: lfs mirror extend -N <new DOM layout> <some non-dom file> lfs resync lfs split --mirror-id 1 -d and make it work, it is not working just out of box and requires code update to make DOM code understand FLR cases, e.g. DOM component can be not first one with FLR, but still should be first one inside a mirror, also we need to allow only one DOM component in all mirrors and so on. I think that will be good as first step, at least simple script will be able to migrate files to MDT like that and Lustre code will be ready for FLR+DOM configurations. I'd say it shouldn't take a lot of time, but let me do more checks first. Next step will be implementing that in code as single call, probably with some optimizations.

            How much work will it be to be able to do the reverse - to be able to migrate small files to the MDT? I'm thinking that the FLR resync ioctl to open the MDT component to "write behind" the OST object and then just drop the OST component.

            adilger Andreas Dilger added a comment - How much work will it be to be able to do the reverse - to be able to migrate small files to the MDT? I'm thinking that the FLR resync ioctl to open the MDT component to "write behind" the OST object and then just drop the OST component.

            Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/32979
            Subject: LU-10177 lfs: support DOM-to-OST migration
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: ce9af3080a1cc66eacb647940aa9b3502641c19c

            gerrit Gerrit Updater added a comment - Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/32979 Subject: LU-10177 lfs: support DOM-to-OST migration Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ce9af3080a1cc66eacb647940aa9b3502641c19c

            This should be able to use the existing FLR code paths on the client to open the MDT and OST components of the file for read/write to write under the other component. For some time at least this would become an FLR mirrored file, which is desirable to allow in any case. For FLR the DoM component would be preferred if the file size is below MDT size limit, and the OST component would be preferred if the file size is larger.

            adilger Andreas Dilger added a comment - This should be able to use the existing FLR code paths on the client to open the MDT and OST components of the file for read/write to write under the other component. For some time at least this would become an FLR mirrored file, which is desirable to allow in any case. For FLR the DoM component would be preferred if the file size is below MDT size limit, and the OST component would be preferred if the file size is larger.
            tappro Mikhail Pershin added a comment - - edited

            1) MDT to OST migration
            DOM layout + data on MDT -> OST layout + data on OST

            • create volatile file (OST new layout);
            • move data from DOM file to volatile file;
            • swap layout (old DOM inode + new layout on OST);
            • delete data on MDT by truncating local inode on MDT (*** new step). It is not trivial case too, need special code path.

            2) OST to MDT
            OST layout + data on OSTs -> DOM layout + data on MDT

            • no sense to create volatile file, because its data will be tied to its new MDT inode, but we want to keep data with the old inode. We need to read data from OSTs stripes and write it to the inode blocks on MDT (like to the DOM file)
            • set DOM pattern to the original file
            • create volatile file with the same OST layout (replica)
            • copy data from it to the old file with DOM pattern
            • delete stripes from the original file layout
            • delete replica
            tappro Mikhail Pershin added a comment - - edited 1) MDT to OST migration DOM layout + data on MDT -> OST layout + data on OST create volatile file (OST new layout); move data from DOM file to volatile file; swap layout (old DOM inode + new layout on OST); delete data on MDT by truncating local inode on MDT (*** new step). It is not trivial case too, need special code path. 2) OST to MDT OST layout + data on OSTs -> DOM layout + data on MDT no sense to create volatile file, because its data will be tied to its new MDT inode, but we want to keep data with the old inode. We need to read data from OSTs stripes and write it to the inode blocks on MDT (like to the DOM file) set DOM pattern to the original file create volatile file with the same OST layout (replica) copy data from it to the old file with DOM pattern delete stripes from the original file layout delete replica

            People

              tappro Mikhail Pershin
              tappro Mikhail Pershin
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: