[LU-1083] tunefs.lustre generates incorrect message when PATH doesn't include /sbin Created: 09/Feb/12  Updated: 31/Jan/22  Resolved: 31/Jan/22

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

Type: Bug Priority: Major
Reporter: Liam Forbes Assignee: Jian Yu
Resolution: Duplicate Votes: 0
Labels: None
Environment:

RHEL 5.7, kernel 2.6.18-274.3.1.el5_lustre.g9500ebf


Issue Links:
Related
is related to LU-13241 mount.lustre for large filesystem run... Resolved
Rank (Obsolete): 9744

 Description   

If I execute tunefs.lustre on the MDS/MGS or OSSes without /sbin in my PATH, it displays an error message stating the device has not been formatted with mkfs.lustre. This is incorrect. As soon as I add /sbin to my PATH, tunefs.lustre works fine.

pmds1:~$ sudo /usr/sbin/tunefs.lustre --print /dev/mapper/mpath0
checking for existing Lustre data: not found
tunefs.lustre FATAL: Device /dev/mapper/mpath0 has not been formatted with mkfs.lustre
tunefs.lustre: exiting with 19 (No such device)

pmds1:~$ export PATH=$PATH:/sbin

pmds1:~$ sudo /usr/sbin/tunefs.lustre --print /dev/mapper/mpath0
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata

Read previous values:
Target: wrkdir10-MDT0000
Index: 0
Lustre FS: wrkdir10
Mount type: ldiskfs
Flags: 0x5
(MDT MGS )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters: failover.node=10.55.128.122@o2ib,10.54.128.122@tcp mdt.quota_type=u

Permanent disk data:
Target: wrkdir10-MDT0000
Index: 0
Lustre FS: wrkdir10
Mount type: ldiskfs
Flags: 0x5
(MDT MGS )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters: failover.node=10.55.128.122@o2ib,10.54.128.122@tcp mdt.quota_type=u

exiting before disk write.



 Comments   
Comment by Andreas Dilger [ 05/Apr/12 ]

Yu Jian, can you please improve the error message to report "debugfs: not found" or whatever the actual problem is. This is confusing enough that someone might think the device is not being used by Lustre and accidentally reformat it.

Comment by Jian Yu [ 18/Apr/12 ]

Patch for master branch is in http://review.whamcloud.com/2571.

Generated at Sat Feb 10 01:13:20 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.