I've mounted a Windows directory with CIFS :
sudo mount -t cifs //SERVER/Bases/some/path ~/mnt/data -o user=windomain/login%password
This works :
cp mnt/data/blabla/file.mdb .
/usr/bin/mdb-export file.mdb tablename
But this doesn't :
/usr/bin/mdb-export mnt/data/blabla/file.mdb tablename
It fails with output
Can't alloc filename
Why ? How can I execute mdb-export
on a mounted file without having to copy it locally first ?
Not an answer, but too long for a comment.
This is where the error comes from:
So let's see what
mdb_find_file
does...Seeing the beginning of the function, this is probably what fails:
The function returns
NULL
, hence the fail later.It looks like it's telling us that it can't find the filename.
Did you try using the full path? Did you try using the UNC path? Did you try using the
smb://
path?A workaround is to change the mount command to add the
noserverino,nounix
options :Florian pointed me to the right direction, that is the
mdb_find_file
function in the source code of the MDB tools :As I don't have any
MDBPATH
env var, it's obvious that there is an error in thestat
call. I googled in that direction and got this :http://www.linuxquestions.org/questions/programming-9/problem-with-stat-on-cifs-852983/
As I didn't try to recompile the MDB tools to get the error code, I'm not sure it's the same problem but adding the options that this thread suggested solved my problem, there's no more error when calling
mdb-export
.