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

mount.lustre parses device paths dumbly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.11.0
    • None
    • 3
    • 9223372036854775807

    Description

      mount.lustre parses does some device path parsing to get find the paths of the block device tunables. From my comment on https://review.whamcloud.com/#/c/26399/ from LU-9292:

      1. I've never though that mount.lustre should be tuning the block devices. That's the responsibility of admins and/or integrators.
      2. Assuming we do want to do it, this is not a good way to go from partition to the blockdev tunables directory. sysfs is already setup for this and we can avoid easily breakable device path parsing:
       
      major=0x$(stat --format=%t /dev/sdc1)
      minor=0x$(stat --format=%T /dev/sdc1)
       
      ~$ readlink -f /sys/dev/block/$((major)):$((minor))/../queue
      /sys/devices/pci0000:00/0000:00:1f.2/ata3/host3/target3:0:0/3:0:0:0/block/sdc/queue
      
      if [[ -f /sys/dev/block/$((major)):$((minor))/partition ]]; then
        # Use /sys/dev/block/$((major)):$((minor))/../queue
      else
        # Use /sys/dev/block/$((major)):$((minor))/queue
      fi
      

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: