[LU-9405] mount.lustre parses device paths dumbly Created: 26/Apr/17  Updated: 23/Jul/20  Resolved: 24/Oct/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: utils

Issue Links:
Related
is related to LU-9292 mount.lustre doesn't handle partition... Resolved
Severity: 3
Rank (Obsolete): 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


 Comments   
Comment by Gerrit Updater [ 01/May/17 ]

John L. Hammond (john.hammond@intel.com) uploaded a new patch: https://review.whamcloud.com/26909
Subject: LU-9405 utils: remove device path parsing from mount.lustre
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6df93848c32eaa48e8b524515e201edc06f945bc

Comment by Gerrit Updater [ 24/Oct/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26909/
Subject: LU-9405 utils: remove device path parsing from mount.lustre
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 97671436c5284d955241b5bb9c79d415aec5792d

Comment by Peter Jones [ 24/Oct/17 ]

Landed for 2.11

Generated at Sat Feb 10 02:25:54 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.