Team: need assistance in getting some hints what could be reason.
am trying to run a binary lctl on an alpine container and unable to run the binary that I mounted from a host running ubuntu. the same binary runs fine on host.
not sure why i can't run lctl.
/host-usrsbin # uname -a
Linux lustre-exporter-ncvbg 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 Linux
#container>
/host-usrsbin # ls -ltr lctl
-rwxr-xr-x 1 root root 190360 May 2 21:14 lctl
/host-usrsbin # ./lctl
sh: ./lctl: not found
above was observed with alpine image.
below i got full ubuntu image and now i can atleast run it but it complains missing a lib.
ex:
./lctl: error while loading shared libraries: liblustreapi.so.1: cannot open shared object file: No such file or directory
file lctl
lctl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=1c5e93b54154ac9a5662756855d66169af691ad4, for GNU/Linux 3.2.0, stripped
ldd lctl
linux-vdso.so.1 (0x00007ffccd1ff000)
liblustreapi.so.1 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff40b4e2000)
libyaml-0.so.2 => /lib/x86_64-linux-gnu/libyaml-0.so.2 (0x00007ff40b4c0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff40b2ce000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff40b54f000)
any work arounds to get the missing lib? sorry am new to linux so need to know approach.
This looks like more of a linker/binary/path kind of problem than a Lustre problem.
That said, the first thing to check is what "lctl" is? Probably a dynamically linked binary, but if you are running from a build tree on the other node it may be a libtool script.
Try
ldd lctlto confirm it is a binary, and that all of the dependent libraries are available in your local container. First possibility is you are missing one or more of the Lustre shared libraries.Next, there could be something weird with the shell or container vs. the binary, so you could try
strace ./lctl(assumingstraceis available) to check if there is some other error trying to execute the binary.Finally, lctl is typically an admin tool and often needs root privs to do most useful things. It may be trying to open the /dev/obd kernel interface, which may not exist in the container, or if your container is not running as root this might fail. I don't think this should be the case, because
lctlcan run some commands as a regular user, but maybe that is on a system where /dev/obd already exists and this is just a very badly formatted error from lctl itself?