[LU-5102] Loading plugin for a given mount_type from ${pkglibdir}/mount_osd_FSTYPE.so" brings problem to local testing. Created: 26/May/14  Updated: 05/Jun/14  Resolved: 05/Jun/14

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

Type: Bug Priority: Critical
Reporter: Di Wang Assignee: Nathaniel Clark
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-4606 Lustre hard codes libzfs.so.1 in lust... Resolved
Severity: 3
Rank (Obsolete): 14082

 Description   

run sh llmount with current master I got this

[root@mds tests]# sh llmount.sh 
Stopping clients: mds /mnt/lustre (opts:)
Stopping clients: mds /mnt/lustre2 (opts:)
Loading modules from /work/lustre-release/lustre/tests/..
detected 2 online CPUs by sysfs
Force libcfs to create 2 CPU partitions
../libcfs/libcfs/libcfs options: 'cpu_npartitions=2'
debug=vfstrace rpctrace dlmtrace neterror ha config ioctl super
subsystem_debug=all -lnet -lnd -pinger
gss/krb5 is not supported
quota/lquota options: 'hash_lqs_cur_bits=3'
Formatting mgs, mds, osts
Format mds1: /tmp/lustre-mdt1

mkfs.lustre FATAL: unhandled fs type 1 'ldiskfs'

mkfs.lustre FATAL: unable to prepare backend (22)
mkfs.lustre: exiting with 22 (Invalid argument)

It seems commit "LU-4606 utils: Mount uses so for backing fstype" insist to load plugin for a given mount_type from $pkglibdir/mount_osd_$FSTYPE.so, which will bring problem for local testing environment.



 Comments   
Comment by Andreas Dilger [ 26/May/14 ]

I think there are a few ways this could be solved:

  • have mount_lustre.c check for $LUSTRE in the environment and use that as the path prefix for mount_ost_$FSTYPE.so
  • have mount_lustre.c check the pathname under which it is executed, and if a relative or absolute path is used (i.e. with '/' in it) then use the basename to look for mount_ost_$FSTYPE.so
  • add an argument to mount_lustre.c to specify the path for libraries
Comment by John Hammond [ 27/May/14 ]

Or add $PWD/./lustre/utils/.libs/ to LD_LIBRARY_PATH and pass "mount_ost_$FSTYPE.so" to dlopen(). Or some combination of that and Andreas's suggestions.

Comment by Nathaniel Clark [ 28/May/14 ]

looks for $LUSTRE after looking in libdir
http://review.whamcloud.com/10468

Looking at invocation path doesn't work because of mount.lustre always needing to be invoked from /sbin by mount.

Comment by Jodi Levi (Inactive) [ 05/Jun/14 ]

Patch landed to Master.

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