FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri Jun 18, 2021 20:38



Post new topic Reply to topic  [ 11 posts ] 
kldload fuse.ko fails 
Author Message

Joined: Tue Feb 27, 2007 09:18
Posts: 5
Post kldload fuse.ko fails
I've installed the fusefs-kmod, fusefs-libs and fusefs-ntfs ports and when I try to kldload /usr/local/modules/fuse.ko I see the error:

"link_elf: symbol _vn_lock undefined"

Is there something I have neglected to do in the installation, or (I'm new to freebsd) somethings I need todo or some basic material I need to read up on that is causing this error?

I can't seem to get ntfs-3g to work at all and mount_ntfs fails with large files (several GB).

thanks,


Tue Feb 27, 2007 09:29
Profile
Tuxera CTO

Joined: Tue Nov 21, 2006 23:15
Posts: 1648
Post 
What version of FreeBSD do you use?


Tue Feb 27, 2007 17:44
Profile

Joined: Tue Feb 27, 2007 09:18
Posts: 5
Post 
I am using 6.2-Release (Jan 12, 2007)--this is from /etc/motd

fusefs-libs-0.3.0_4
fusefs-libs-2.6.2
fusefs-ntfs-1.0

thanks,


Tue Feb 27, 2007 20:10
Profile

Joined: Wed Feb 28, 2007 00:37
Posts: 3
Post 
Hello, I'm a FreeBSD user as well (6.2 RELEASE).

Fuse.ko is loaded via an rc script in /usr/local/etc/rc.d - not through the usual /boot/loader.conf settings. You'll have to enable it in rc.conf:

fusefs_enable="YES"

mount_ntfs is the "native" FreeBSD mount command for the read-only ntfs kernel modul. ntfs-3g resides in /usr/local/bin/ - and that's what you should use to mount your ntfs partition through this new driver.

I had several problems with the port, I wrote about them here:
http://lists.freebsd.org/pipermail/free ... 38958.html

(I'm not a developer, not even a programmer, just described what I saw). I'm also seeing low performance on writing operations (in the range of 200Kb/s) - reading some of the posts on this forum, this might be something FreeBSD specific (OS X seems to suffer from the same problems).

I'm also interested in how to enable it automatically from fstab. With current settings, this cannot be done, because fuse modul is loaded after mount. I also seem to have problems in creating a correct fstab line. I tried to link ntfs-3g to /sbin/mount_ntfs-3g (because FreeBSD looks for filetype appended to the mount command - for instance, if I specify msdosf in fstab, it will look for mount_msdosf in /sbin). For some reason, it doesn't want to accept the options I set in fstab (rw,noatime,noexec,auto,locale=en_US.UTF-8) - but they work on the command line (with a few error messages). To make it clear:

This works, with some error messages (but filesystem is mounted):
Code:
[root@mcsaba ~]# mount_ntfs-3g /dev/ad0s1 /mnt/ad0s1/ -o rw,noatime,noexec,auto,locale=en_US.UTF-8
Failed to open /proc/filesystems: No such file or directory
modprobe: not found
Failed to open /proc/filesystems: No such file or directory
[root@mcsaba ~]#


This does not:
fstab line:
Code:
/dev/ad0s1              /mnt/ad0s1      ntfs-3g rw,noatime,noexec,auto,locale=en_US.UTF-8       0       0

mount -a or mount /mnt/ad0s1 output:
Code:
[root@mcsaba ~]# mount -a
You must specify exactly one set of options.
You must specify exactly one set of options.
You must specify exactly one set of options.

ntfs-3g 1.0 - Third Generation NTFS Driver

Copyright (C) 2005-2006 Yura Pakhuchiy
Copyright (C) 2006-2007 Szabolcs Szakacsits

Usage:    ntfs-3g device mount_point [-o options]

Options:  ro, force, locale, uid, gid, umask, fmask, dmask,
          show_sys_files, no_def_opts, streams_interface.
          Please see the details in the manual.

Ntfs-3g news, support and information:  http://www.ntfs-3g.org



Wed Feb 28, 2007 00:52
Profile

Joined: Tue Feb 27, 2007 09:18
Posts: 5
Post 
I tried changing the rc.d/fusefs script and it gives the same error:
link_elf: symbol _vn_lock undefined

Ok, now I have done a make deinstall for each of the fusefs requirements (libs, kmod, ntfs) and done a make install clean, then reboot. pkg_version -v tells me everything is of the current version (as listed above), /usr/local/modules/fuse.ko has a new timestamp, so that looks okay.

Now I edit /usr/local/etc/rc.d/fusefs to change
...fusefs_enable="YES"}
and then try to run it: ...fusefs start
Starting fusefs.
link_elf: symbol _vn_lock undefined
kldload: can't load /usr/local/modules/fuse.ko: No such file or directory

I try to use ntfs-3g several times in case I somehow read this wrong...still cannot mount my ntfs drive (mount_ntfs does work, just not for copying large files).

Am I missing a dependency or a special step? Is there any more info I need to share to find a solution?

thanks for your help! much appreciated.


Wed Feb 28, 2007 08:22
Profile

Joined: Tue Feb 27, 2007 09:18
Posts: 5
Post 
in looking at the fusefs start script I see: . /etc/rc.subr

so I look at this script and don't see a variable declared for '_vn_lock'. Is this the source of the problem? There must be something I'm overlooking or just don't know about yet...


Wed Feb 28, 2007 08:28
Profile

Joined: Wed Feb 28, 2007 00:37
Posts: 3
Post 
Leave /usr/local/etc/rc.d/fusefs script untouched - scripts installed there are not for editing!

So, if you didn't back up /usr/local/etc/rc.d/fusefs script, than remove fusefs (and the script), and reinstall itt. Then you need to edit rc.conf, and put fusefs_enable="YES" there. Well, here is small howto. (RE)Install anything fuse related. Have this in your rc.conf:

fusefs_enable="YES"

Create a new script in /usr/local/etc/rc.d. I created one called ntfsmount.

ee /usr/local/etc/rc.d/ntfsmount

Put these lines in it:
Code:
#!/bin/sh
# PROVIDE: ntfsmount
# REQUIRE: fusefs

. /etc/rc.subr

name="ntfsmount"
rcvar=`set_rcvar`

load_rc_config $name

command="ntfs-3g /dev/ad0s1 /mnt/ad0s1  -o locale=en_US.UTF-8 && ntfs-3g /dev/ad0s1 /mnt/ad0s1/ -o locale=en_US.UTF-8"

run_rc_command "$1"


Than chmod the script:
chmod +x /usr/local/etc/rc.d/ntfsmount

Reboot. Should work. If it doesn't, something is screwed up on your system (if you get the elf related error message). Still, copy of large files is extremely slow (as in around 200K), I don't know why, linux people reported such speeds in earlier version, and the ones I installed are:

[mcsaba@mcsaba ~]$ pkg_info | grep fuse
fusefs-kmod-0.3.0_4 Kernel module for fuse
fusefs-libs-2.6.2 FUSE allows filesystem implementation in userspace
fusefs-ntfs-1.0 Mount NTFS partitions and disk images


Hope this helps. If it doesn't, than as I said, there must be a problem with your FreeBSD install. You might be missing/overwritten/deleted some libs (but frankly, I have no idea, just wildguessing).


Wed Feb 28, 2007 21:22
Profile

Joined: Wed Feb 28, 2007 00:37
Posts: 3
Post 
Oh, and one more thing: there shouldn't be any linebreaks in the command line I posted above (ntfsmount). It should be one long line.


Wed Feb 28, 2007 21:23
Profile

Joined: Tue Feb 27, 2007 09:18
Posts: 5
Post 
thanks molnarks, Followed your instructions and see the same elf error (no changes) so it must be a problem with a dependency. This is a new bsd install so seems weird it would be messed up.

If there any other suggestions, esp that relate the "link_elf: symbol _vn_lock undefined" error please post them.


Fri Mar 02, 2007 05:42
Profile
Tuxera CTO

Joined: Tue Nov 21, 2006 23:15
Posts: 1648
Post kldload fuse.ko fails
@molnarcs: the /proc/filesystems and modprobe messages are Linux specific
and can be ignored. The reason for the slow copy on FreeBSD is the lack of
buffer cache for block devices which should be solved in FreeBSD 7.0. There
should be a solution for earlier versions too by Csaba Henk's ublio work
(user space cache) which should improve performance significantly:
http://thread.gmane.org/gmane.comp.file ... 3g.devel/2

@jimmont: I asked Csaba Henk, the FreeBSD FUSE author, what could be the
reason for your undefined _vn_lock symbol problem. I've never seen it
either.


Sat Mar 03, 2007 15:02
Profile

Joined: Mon Mar 05, 2007 02:23
Posts: 14
Post Re: kldload fuse.ko fails
jimmont wrote:
I've installed the fusefs-kmod, fusefs-libs and fusefs-ntfs ports and when I try to kldload /usr/local/modules/fuse.ko I see the error:

"link_elf: symbol _vn_lock undefined"

Is there something I have neglected to do in the installation, or (I'm new to freebsd) somethings I need todo or some basic material I need to read up on that is causing this error?


Hmm, _vn_lock exists in FBSD source only since mid-november last year:

http://www.freebsd.org/cgi/cvsweb.cgi/s ... c#rev1.247
http://www.freebsd.org/cgi/cvsweb.cgi/s ... h#rev1.318
http://hg.fr.freebsd.org/src-head/?cs=8038e1e1bb69

... and AFAICS this hasn't been propagated back to the RELENG_6 branch ("MFC'd", in FreeBSD slang).

Thus it seems you have a kernel source tree for HEAD rather than for your current OS version. Try to install the appropriate kernel tree (most importantly, system headers) via sysinstall(8).


Mon Mar 05, 2007 02:41
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.