Traffic Server
  1. Traffic Server
  2. TS-1163

Raw disks with more than (2^32)-1 sectors (usually 2TB) are not supported on linux

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.4
    • Component/s: Cache
    • Labels:
      None

      Description

      Due to 32bit integers in both the trafficersever code and the ioctl used to determine raw disk size, the number of sectors reported to the cache storage system is bound to 0-0xFFFFFFFF. If a disk has 512 byte sectors and is larger than 2TB it will report (num_sectors % 0xFFFFFFFF) * 512 bytes avaliable.

        Activity

        Hide
        B Wyatt added a comment -

        It will still be a little bit while I dig myself out of my hole and begin directly committing fixes to the repo.

        Until then, I've attached a patch here that should work on codebases as old as June 2011 that provides support for larger disks via the BLKGETSIZE64 ioctl on linux.

        Show
        B Wyatt added a comment - It will still be a little bit while I dig myself out of my hole and begin directly committing fixes to the repo. Until then, I've attached a patch here that should work on codebases as old as June 2011 that provides support for larger disks via the BLKGETSIZE64 ioctl on linux.
        Hide
        Leif Hedstrom added a comment -

        Will you land this already

        Show
        Leif Hedstrom added a comment - Will you land this already
        Hide
        B Wyatt added a comment -

        It is a good thing I didn't! It had a bug.

        Turns out the old 32bit ioctl's units was 512byte blocks, hence the adjustment based on the hardware sector size.

        the 64 bit ioctl's unit is not coerced (and completely different), so it can ignore the adjustment.

        the v2 patch reflects this and supports large disks with sector size > 512.

        Show
        B Wyatt added a comment - It is a good thing I didn't! It had a bug. Turns out the old 32bit ioctl's units was 512byte blocks, hence the adjustment based on the hardware sector size. the 64 bit ioctl's unit is not coerced (and completely different), so it can ignore the adjustment. the v2 patch reflects this and supports large disks with sector size > 512.

          People

          • Assignee:
            B Wyatt
            Reporter:
            B Wyatt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development