FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri May 14, 2021 16:24



Post new topic Reply to topic  [ 11 posts ] 
Linux-git (3.5.0+) and ntfs-3g 
Author Message

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Linux-git (3.5.0+) and ntfs-3g
I usually build my own kernel from git, and have been doing so and using ntfs-3g for some time without issue. However, following a recent build I find that whilst ntfs-3g will allow mounting, reading and editing of files, new file creation is impossible, returning a "File not found" error. I can create directories without issue. If I copy a directory tree from another drive, the directory structure is copied, but none of the contained files.

Using my distributions stock kernel (3.5.0-1 on Arch) the problem goes away, so I'm assuming either a kernel option needs setting at build time, or this is a kernel bug.

I already build my kernel with ntfs, fuse and autofs support. Can anyone provide additional information on whether or not this is a kernel bug (in which case I'll file a bug report at kernel.org) or at least confirm other kernel config options needed for full support of ntfs-3g.

For information, this only manifested itself last week, though I've been using the same kernel .config file for several months.

TIA


Mon Jul 30, 2012 21:09
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Linux-git (3.5.0+) and ntfs-3g
Hi,

Quote:
However, following a recent build I find that whilst ntfs-3g will allow mounting, reading and editing of files, new file creation is impossible, returning a "File not found" error.

Can you mount from ntfs-3g with debug option, and create a sample file :
Code:
# as root :
ntfs-3g -o debug device mountpoint 2> ntfs-3g.log
touch mountpoint/somefile
umount mountpoint

Then attach ntfs-3g.log to your reply (you must compress it first).
Quote:
I already build my kernel with ntfs, fuse and autofs support.

Which fuse library are you using (the fuse-lite one bundled with ntfs-3g, or the one from the fuse project) ? What are your ntfs-3g version and your configure options to compile it ?
Quote:
or at least confirm other kernel config options needed for full support of ntfs-3g.

Ntfs-3g obviously needs a fuse module (which apparently you have), and several optional features rely on the availability of extended attributes.

Regards

Jean-Pierre


Mon Jul 30, 2012 21:45
Profile

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Re: Linux-git (3.5.0+) and ntfs-3g
Thank you for your reply.
ntfs-3g.log (not a lot to compress) is as follows:

Code:
FUSE library version: 2.9.0
nullpath_ok: 0
nopath: 0
utime_omit_ok: 1
Version 2012.1.15 external FUSE 29
Mounted /dev/sdc1 (Read-Write, label "Data", NTFS 3.1)
Cmdline options: debug
Mount options: allow_other,nonempty,relatime,fsname=/dev/sdc1,blkdev,blksize=4096
Ownership and permissions disabled, configuration type 7
fuse: reading device: Operation not permitted
Unmounting /dev/sdc1 (Data)


ntfs-3g version

Code:
$ ntfs-3g --version
ntfs-3g 2012.1.15 external FUSE 29


fuse library is, AFAIK, from the fuse project - installed from Arch repositories (not AUR).

I can't comment on the compile options - I'm using the pre-built binary from the Arch repository (again, not AUR). If necessary, I can build from source.


Tue Jul 31, 2012 01:38
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Linux-git (3.5.0+) and ntfs-3g
Hi,

Quote:
fuse: reading device: Operation not permitted

Apparently the fuse library could not communicate with the kernel part, through /dev/fuse. Did you start ntfs-3g as root ? Was /dev/fuse created the right way :
Code:
crw-rw-rw- 1 root root 10, 229 Jul 31 08:16 /dev/fuse

How is fuse configured in the kernel (is CONFIG_FUSE_FS set to y or m) ?

This appears as a problem within fuse, but it is different from what you reported earlier : in the newer configuration you cannot do anything (read, create directories, etc.)

Regards

Jean-Pierre


Tue Jul 31, 2012 09:15
Profile

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Re: Linux-git (3.5.0+) and ntfs-3g
OK, in order,

The NTFS volume is mounted via fstab, and I have no problems creating files using the stock kernel in this configuration. The current stock kernel on Arch is 3.5.0-2.

CONFIG_FUSE_FS=m is used, which mirrors the configuration in the stock kernel (I did a comparison between my own config and the working kernel by zcat /proc/config.gz > newconfig)

Experimentally, before replying to this, I copied the whole of the working kernel configs for NTFS, FUSE and the whole pseudo filesystem section to my own config and rebuilt, with the same result.

To be clear, the volume mounts without issue via fstab, and reading, editing existing files and creating directories works without issue. The only failure is creating new files (which is something of an issue when shared firefox and thunderbird profiles reside on the NTFS volume, together with personal files that I will want to add to).

Code:
ls -laxoh /dev | grep fuse
crw-rw-rw- 1 root 10, 229 Jul 31 19:58 /dev/fuse


I note the absence of a 2nd "root" entry, but again, this matches output when running with a "working" kernel. There have been no system updates to either ntfs-3g, nor fuse to explain this, in which case I can only conclude that something in the latest linux-git breaks fuse, resulting in a broken ntfs-3g. I have noted kernel changelogs suggesting a re-write of the fuse module, though I'm not sure when this was, and if it could perhaps point to the issue.

If you agree, I will file a bug report against the latest git version of the kernel. Unless you have any other ideas?


Tue Jul 31, 2012 21:16
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Linux-git (3.5.0+) and ntfs-3g
Hi,

Quote:
CONFIG_FUSE_FS=m is used,

So, check whether /lib/modules/`uname -r`/kernel/fs/fuse/fuse.ko is present...
Quote:
To be clear, the volume mounts without issue via fstab, and reading, editing existing files and creating directories works without issue. The only failure is creating new files

The log you sent showed that the fuse library could not even initialize, so maybe the fstab entry led you to using the old ntfs kernel driver which could only read files. Check whether /sbin/mount.ntfs is a symlink to either /sbin/mount.ntfs-3g or /bin/ntfs-3g . The presence of the ntfs kernel driver is controlled by CONFIG_NTFS_FS in the kernel .config, but usually the install of ntfs-3g overrides the kernel driver settings.
Quote:
If you agree, I will file a bug report against the latest git version of the kernel. Unless you have any other ideas?

Please do so after checking there is no conflict with the ntfs kernel driver. I am taking a break, and I will not be able to help you for a week or so.

Regards

Jean-Pierre


Tue Jul 31, 2012 23:01
Profile

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Re: Linux-git (3.5.0+) and ntfs-3g
jpa wrote:
Hi,

So, check whether /lib/modules/`uname -r`/kernel/fs/fuse/fuse.ko is present...


It's present

jpa wrote:
The log you sent showed that the fuse library could not even initialize, so maybe the fstab entry led you to using the old ntfs kernel driver which could only read files. Check whether /sbin/mount.ntfs is a symlink to either /sbin/mount.ntfs-3g or /bin/ntfs-3g . The presence of the ntfs kernel driver is controlled by CONFIG_NTFS_FS in the kernel .config, but usually the install of ntfs-3g overrides the kernel driver settings.


I'll go one better. I'll rebuild the kernel without ntfs support, and try again. I'll edit this post with the result afterwards.

Quote:
Please do so after checking there is no conflict with the ntfs kernel driver. I am taking a break, and I will not be able to help you for a week or so.


No problem, I can get by with the stock kernel in the meantime. It's only for my own gratification that I run a minimal kernel. Enjoy your break :)


Tue Jul 31, 2012 23:29
Profile

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Re: Linux-git (3.5.0+) and ntfs-3g
No - tested with a kernel without kernel level ntfs drivers, with the same result. This kernel cannot possibly produce a conflict in the drivers.

I've sent a bug report to the maintainer of the fuse kernel driver.


Wed Aug 01, 2012 00:08
Profile

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Re: Linux-git (3.5.0+) and ntfs-3g
Sorry for troubling you guys - but part of the process.

Based on other's experiences and tests today it seems we have a kernel bug. My bug report has been accepted and people more qualified than me to fix it are working on it.

If anyone here can contribute, it's a fuse problem and you can jump onboard at sourceforge, fuse-devel


Thu Aug 02, 2012 01:12
Profile

Joined: Mon Jul 30, 2012 21:03
Posts: 7
Post Re: Linux-git (3.5.0+) and ntfs-3g
Update. The bug is confirmed, and I've tested a kernel patch to fix it. ntfs-3g is off the hook and once the patch is committed ntfs-3g will work as intended again.


Fri Aug 03, 2012 22:10
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Linux-git (3.5.0+) and ntfs-3g
Hi,
Quote:
The bug is confirmed, and I've tested a kernel patch to fix it

Thank you for testing and helping solving problems before they are part of an official release.

Regards

Jean-Pierre


Mon Aug 06, 2012 09:03
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 4 guests


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.