autofs fails with NTFS-3g "big_writes" option

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

autofs fails with NTFS-3g "big_writes" option

Postby fanyangto » Wed Aug 20, 2014 1:05 am

I am not sure if this is the right place for this question.

I have NTFS drives mounted using udevil and added option "big_writes" so that NTFS performance is approaching of ext3. That's all good, except I really love to have the auto dismount feature (unmount after timeout). This way, you don't have to login to issue umount before you can unplug the drive. Imagine seniors who will use this and we can't expect them to issue umount. Instead, they can simply wait for a min or two and then unplug.

Udevil doens't seem to have auto umount feature. Autofs has auto dismount feature, but it doesn't seem to accept "big_writes" as a mounting option.

How do you guys address this problem? Do you always have to login to unmount a drive? That's not very friendly.

I'd love to hear suggestions.

PS, both udevil and fstab would take big_writes option to improve NTFS-3g performance. But autofs, and automount reject it.
Last edited by fanyangto on Wed Aug 20, 2014 10:48 pm, edited 1 time in total.
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: autofs with NTFS-3g "big_writes" option

Postby fanyangto » Wed Aug 20, 2014 10:33 pm

Further investigation found that the problem was with automount command invoked. Here is the debug log (with automount -d). The problem seems to be that automount always add -s option to its mount command. This happens with ext3 FS as well. But ntfs-3g craps out on -s.

I am curious if there is a solution or patch to this.

handle_packet: type = 3
handle_packet_missing_indirect: token 33, name WD2.5TB, request pid 6326
attempting to mount entry /media/WD2.5TB
lookup_mount: lookup(file): looking up WD2.5TB
lookup_mount: lookup(file): WD2.5TB -> -fstype=auto,noatime,utf8 :/dev/disk/by-label/WD2.5TB
parse_mount: parse(sun): expanded entry: -fstype=auto,noatime,utf8 :/dev/disk/by-label/WD2.5TB
parse_mount: parse(sun): gathered options: fstype=auto,noatime,utf8
parse_mount: parse(sun): dequote(":/dev/disk/by-label/WD2.5TB") -> :/dev/disk/by-label/WD2.5TB
parse_mount: parse(sun): core of entry: options=fstype=auto,noatime,utf8, loc=:/dev/disk/by-label/WD2.5TB
sun_mount: parse(sun): mounting root /media, mountpoint WD2.5TB, what /dev/disk/by-label/WD2.5TB, fstype auto, options noatime,utf8
do_mount: /dev/disk/by-label/WD2.5TB /media/WD2.5TB type auto options noatime,utf8 using module generic
mount_mount: mount(generic): calling mkdir_path /media/WD2.5TB
mount_mount: mount(generic): calling mount -t auto -s -o noatime,utf8 /dev/disk/by-label/WD2.5TB /media/WD2.5TB
>> ntfs-3g: Unknown option '-s'.
>> ntfs-3g 2014.2.15 external FUSE 29 - Third Generation NTFS Driver
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: autofs with NTFS-3g "big_writes" option

Postby fanyangto » Wed Aug 20, 2014 10:47 pm

Very bad workaround, create a shell wrapper to remove -s switch before it hits ntfs-3g.
The content of the shell script is as follows. This is tested working.
Sadly, this automount bug should have been fixed properly. This bug has existed for at least 1.5 years.

cd /usr/sbin
cp -p ntfs-3g ntfs-3g.0
> ntfs-3g
vi ntfs-3g

#!/bin/sh
# fixes automount -s option that crashes ntfs-3g
line=`echo $@ | sed -e 's/-s//g'`
/usr/sbin/ntfs-3g.0 $line
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: autofs fails with NTFS-3g "big_writes" option

Postby WarheadsSE » Thu Aug 21, 2014 1:33 am

Might be better off checking PATH for /usr/local/bin & /usr/local/sbin instead, and then putting the scrip there, as it is not tracked by pacman as it is and will not freak it out. Then, with those in the front of PATH, they will take precedence, and you can make /usr/local/sbin/ntfs-3g and do as needed, pointing to /usr/sbin/ntfs-3g
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 22 guests