Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-107035

Swap size setting not honored on 4k sector disks

    XMLWordPrintable

    Details

    • Impact:
      Medium

      JEditor

        Description

        Setting the swap size in UI under System -> Advanced -> "Swap size in GB" works for disks with 512 sector size, but when using disks with 4k sector size it generates swap aprtitions that are 8x the size set.

        When the default of 2GB is used there isn't a way to replace a disk of same size via GUI.  Instead it fails with "Error: [EZFS_BADDEV] device is too small" because 16GB (8x the 2GB setting) is allocated to swap.

        setting of 2GB generates 16GB swap partition.  (see attached screenshots for workflow showing this issue with 2 drive of same size but diff sector size)

        setting of 10GB generates 80GB swap partition.

         

        Suggest reading "Sectorsize" from the disk before doing the math to calculate the number of sectors for the swap partition, or generate the partition based on size. 

          Attachments

          1. Screen Shot 2020-07-31 at 9.50.35 PM.png
            86 kB
            Thomas Bauer
          2. Screen Shot 2020-07-31 at 9.50.49 PM.png
            276 kB
            Thomas Bauer
          3. Screen Shot 2020-07-31 at 9.51.43 PM.png
            263 kB
            Thomas Bauer
          4. Screen Shot 2020-07-31 at 9.53.03 PM.png
            266 kB
            Thomas Bauer
          5. Screen Shot 2020-07-31 at 9.53.20 PM.png
            331 kB
            Thomas Bauer
          6. Screen Shot 2020-07-31 at 9.53.27 PM.png
            346 kB
            Thomas Bauer
          7. Screen Shot 2020-07-31 at 9.53.31 PM.png
            353 kB
            Thomas Bauer
          8. Screen Shot 2020-07-31 at 9.53.49 PM.png
            246 kB
            Thomas Bauer

            Attachments

              Activity

                People

                Assignee:
                vladimirv Vladimir Vinogradenko
                Reporter:
                tgbauer Thomas Bauer
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: