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

Flag for mke2fs to automatically adjust number of inodes

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • None
    • 9223372036854775807

    Description

      In certain cases device size where filesystem is created is not know in advance, and it's impractical to try guess correct inode ratio to satisfy filesystem limitations (which is 4G inodes for ext4 and ldiskfs).
      We need a flag to tell mke2fs to limit inode count to match current filesystem limits.
      Example of current behavior:

      # mke2fs  -i 1024 img
      mke2fs 1.42.13.x2 (29-Sep-2016)
      mke2fs: too many inodes (5269225472), raise inode ratio?
      root@kvkvm1oem(0):~#
      

      Proposed behavior (example only, feel free to change message text):

      # mke2fs  -i 1024 --adjust-inode-count img
      mke2fs 1.42.13.x2 (29-Sep-2016)
      mke2fs: too many inodes (5269225472), changing to <supported FS limit> 
      ... formatting continues ...
      

      Attachments

        Activity

          [LU-9501] Flag for mke2fs to automatically adjust number of inodes

          Andreas Dilger (andreas.dilger@intel.com) merged in patch https://review.whamcloud.com/27111/
          Subject: LU-9501 mke2fs: avoid inode number error with large FS
          Project: tools/e2fsprogs
          Branch: master-lustre
          Current Patch Set:
          Commit: ec44b0534beb51ce70bb9b997cbbad2476506b2a

          gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) merged in patch https://review.whamcloud.com/27111/ Subject: LU-9501 mke2fs: avoid inode number error with large FS Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: Commit: ec44b0534beb51ce70bb9b997cbbad2476506b2a

          >Just limit the inode count to 4B inodes automatically rather than returning an error.
          This patch exact this idea

          artem_blagodarenko Artem Blagodarenko (Inactive) added a comment - >Just limit the inode count to 4B inodes automatically rather than returning an error. This patch exact this idea

          Artem Blagodarenko (artem.blagodarenko@seagate.com) uploaded a new patch: https://review.whamcloud.com/27111
          Subject: LU-9501 mke2fs: avoid inode number error with large FS
          Project: tools/e2fsprogs
          Branch: master-lustre
          Current Patch Set: 1
          Commit: d8b68ec2ccf56dd97cb7be30188d9f745206e534

          gerrit Gerrit Updater added a comment - Artem Blagodarenko (artem.blagodarenko@seagate.com) uploaded a new patch: https://review.whamcloud.com/27111 Subject: LU-9501 mke2fs: avoid inode number error with large FS Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: 1 Commit: d8b68ec2ccf56dd97cb7be30188d9f745206e534

          IMHO, I don't think we even need an option for this? Just limit the inode count to 4B inodes automatically rather than returning an error.

          adilger Andreas Dilger added a comment - IMHO, I don't think we even need an option for this? Just limit the inode count to 4B inodes automatically rather than returning an error.

          Hello Andreas.

          Thank you for quick answer. I am agree that mke2fs requires such useful modification. But this feature is very important now for customers running Lustre FS. Currently users which what to create custom large enough cluster, hit this error message and need to readjust config scripts manually, that stops deployment with other automatic parts. This little fix solves the problem and make customers happy. Can we apply it now and switch to another one from ext4 latter?

          Anyway I will upload this patch here. It can be useful if we decide land it or sent patch to linux-ext4.

          Thanks.

          artem_blagodarenko Artem Blagodarenko (Inactive) added a comment - Hello Andreas. Thank you for quick answer. I am agree that mke2fs requires such useful modification. But this feature is very important now for customers running Lustre FS. Currently users which what to create custom large enough cluster, hit this error message and need to readjust config scripts manually, that stops deployment with other automatic parts. This little fix solves the problem and make customers happy. Can we apply it now and switch to another one from ext4 latter? Anyway I will upload this patch here. It can be useful if we decide land it or sent patch to linux-ext4. Thanks.
          adilger Andreas Dilger added a comment - - edited

          I think if you don't specify "-I" then it will cap the inode count at 4B?

          In any case, I think that this should really be a fix in mke2fs and should probably be discussed on the linux-ext4 mailing list?

          adilger Andreas Dilger added a comment - - edited I think if you don't specify "-I" then it will cap the inode count at 4B? In any case, I think that this should really be a fix in mke2fs and should probably be discussed on the linux-ext4 mailing list?

          People

            wc-triage WC Triage
            artem_blagodarenko Artem Blagodarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: