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

1.8->2.0 Lustre filesystem upgrade tool

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • Lustre 2.4.0
    • Lustre 2.1.0
    • None
    • 7537

    Attachments

      Issue Links

        Activity

          [LU-591] 1.8->2.0 Lustre filesystem upgrade tool

          Patrick,
          this code and the LFSCK 1.5 code are largely overlapping. The main differences are:

          • this code changed all of the inode FIDs, which would cause problems with NFS exports and some backup tools
          • LFSCK 1.5 keeps the 1.8 IGIF FIDs and treats them as normal 2.x FIDs, even after backup/restore
          • this code must be run without mounted clients, due to above
          • LFSCK 1.5 can be run while the filesystem is mounted and in use
          adilger Andreas Dilger added a comment - Patrick, this code and the LFSCK 1.5 code are largely overlapping. The main differences are: this code changed all of the inode FIDs, which would cause problems with NFS exports and some backup tools LFSCK 1.5 keeps the 1.8 IGIF FIDs and treats them as normal 2.x FIDs, even after backup/restore this code must be run without mounted clients, due to above LFSCK 1.5 can be run while the filesystem is mounted and in use

          In light of the changes to lfsck in phase 1.5(https://jira.hpdd.intel.com/browse/LU-1866), is this tool still needed?
          If so, what does it do that the new lfsck does not?

          Thanks.

          paf Patrick Farrell (Inactive) added a comment - In light of the changes to lfsck in phase 1.5( https://jira.hpdd.intel.com/browse/LU-1866 ), is this tool still needed? If so, what does it do that the new lfsck does not? Thanks.
          bzzz Alex Zhuravlev added a comment - - edited

          1230 seem to be introduced a bug:

          	rc = mdo_xattr_get(env, mdd_obj, ldata->ml_buf,
          			   XATTR_NAME_LINK, capa);
          	if (rc == -ERANGE) {
          		/* Buf was too small, figure out what we need. */
          		mdd_buf_put(ldata->ml_buf);
          		rc = mdo_xattr_get(env, mdd_obj, ldata->ml_buf,
          				   XATTR_NAME_LINK, capa);
          

          in the latter mdo_xattr_get(), &LU_BUF_NULL should be used instead of ldata->ml_buf.
          Currently it will return same -ERANGE, not actual size of the EA.

          bzzz Alex Zhuravlev added a comment - - edited 1230 seem to be introduced a bug: rc = mdo_xattr_get(env, mdd_obj, ldata->ml_buf, XATTR_NAME_LINK, capa); if (rc == -ERANGE) { /* Buf was too small, figure out what we need. */ mdd_buf_put(ldata->ml_buf); rc = mdo_xattr_get(env, mdd_obj, ldata->ml_buf, XATTR_NAME_LINK, capa); in the latter mdo_xattr_get() , &LU_BUF_NULL should be used instead of ldata->ml_buf . Currently it will return same -ERANGE, not actual size of the EA.
          vitaly_fertman Vitaly Fertman added a comment - code is rebased against b2_1 and moved to: http://review.whamcloud.com/#change,1561 http://review.whamcloud.com/#change,1562 http://review.whamcloud.com/#change,1563

          HLD

          vitaly_fertman Vitaly Fertman added a comment - HLD

          I'm generally not in favour of the last patch (http://review.whamcloud.com/1232, automatically enabling the INCOMPAT_DIR_DATA feature at first mount) since this can cause interoperability issues, and may cause problems for downgrade to 1.8 if there are problems in that code. In upstream ext4 none of the new features are enabled automatically by the kernel, but rather depend on explicit user action (tune2fs). In this case, it makes sense that the enabling of this feature should be done either by tune2fs or some other explicit action that runs the filesystem upgrade tool.

          As for the "compatible with 1 version", we are working to maintain protocol compatibility with 1.8.x clients and upgrade from 1.8.x -> 2.1, because almost nobody is running 2.0.0. I checked and it appears that there is "data_in_dirent" support going back to 1.8.2 (https://bugzilla.lustre.org/show_bug.cgi?id=21188 was also fixed in 1.8.2 after the initial patch landing), so this should be OK but I'd like feedback from Johann and Oleg as well.

          adilger Andreas Dilger added a comment - I'm generally not in favour of the last patch ( http://review.whamcloud.com/1232 , automatically enabling the INCOMPAT_DIR_DATA feature at first mount) since this can cause interoperability issues, and may cause problems for downgrade to 1.8 if there are problems in that code. In upstream ext4 none of the new features are enabled automatically by the kernel, but rather depend on explicit user action (tune2fs). In this case, it makes sense that the enabling of this feature should be done either by tune2fs or some other explicit action that runs the filesystem upgrade tool. As for the "compatible with 1 version", we are working to maintain protocol compatibility with 1.8.x clients and upgrade from 1.8.x -> 2.1, because almost nobody is running 2.0.0. I checked and it appears that there is "data_in_dirent" support going back to 1.8.2 ( https://bugzilla.lustre.org/show_bug.cgi?id=21188 was also fixed in 1.8.2 after the initial patch landing), so this should be OK but I'd like feedback from Johann and Oleg as well.

          remote: http://review.whamcloud.com/1230
          remote: http://review.whamcloud.com/1231
          remote: http://review.whamcloud.com/1232

          the code is not 100% ready, it is still under testing.

          vitaly_fertman Vitaly Fertman added a comment - remote: http://review.whamcloud.com/1230 remote: http://review.whamcloud.com/1231 remote: http://review.whamcloud.com/1232 the code is not 100% ready, it is still under testing.

          People

            yong.fan nasf (Inactive)
            vitaly_fertman Vitaly Fertman
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: