NTFS-3G unmounts NTFS partitions because it "did not receive signal in 15 seconds"—what signal?
After upgrading to Lion, NTFS-3G has been encountering problems. I uninstalled NTFS-3G and MacFUSE, reinstalled them and rebooted; but the problem still exists:
After connecting an USB-disk that has a NTFS partition the disk icon appears on the desktop andthe partition can be browsed. After ≈15 seconds I get the following pop-up:
However, the partition stays mounted and it can be browsed via the same icon on the desktop. After this pop-up the other, HFS+, partition gets mounted and its icon displayed on the desktop.
I could consider the above merely as a glitch, which would just slow down my workflow for 15+ seconds. But problem gets bigger with TrueCrypt disks:
After I connect an USB-disk, which is fully encrypted with TrueCrypt, and mount it with TrueCrypt, again—as above—its icon appears on the desktop and I can browse the disk's contents. After 15 seconds I get the following pop-ups:
Translation: "hdiutil: attach failed — no mountable file systems"
At the same time, my mounted partition—which worked normally for 15 seconds—disappears from the desktop, ie. gets unmounted.
I've read about similar problems after some googling, but all of them say the problem disappears with reinstalling MacFUSE and/or NTFS-3G, which is what didn't work with me.
I've also tried mounting the partitions with and without caching, didn't help either.
-
What is the signal NTFS-3G wants?
Can I give it manually, as a workaround. Or can NTFS-3G be somehow modified that it wouldn't need "the signal": the partitions work normally until the pop-up.
- Why TrueCrypt drops the partition while normal partitions stay in the system?
- Is some hidden/visible setting in Lion blocking NTFS-3G working normally?
- And finally: Is it just me or does this happen to others with NTFS-3G?
- TrueCrypt is v. 7.0a
- NTFS-3G is 2010.10.2
- MacFUSE is 2.1.9 (Beta)
It seems the problem is indeed with NTFS-3G: I downloaded the trial of Tuxera 2011.4.1 and no errors happened when mounting a NTFS partition with it.
Solution 1:
I stumbled on a post on IM.GETTING(THIS);, which explained the issue — and even provided a fix!
The problem seems to stem from the binary "fuse_wait" from NTFS-3G that's run as a final part of the mounting procedure - for some reason it can't detect that ntfs-3g mounted the volume and stays on a hopeless loop trying to detect this condition until it gives up after 15 seconds. So my workaround involves replacing the fuse_wait binary with a script that does more or less the same thing, but actually detecting (sort of) the mount operation and not timing out.
The fix
(Assuming the use of MacFUSE & NTFS-3G)
sudo mv /usr/local/bin/fuse_wait /usr/local/bin/fuse_wait.original
sudo touch /usr/local/bin/fuse_wait
sudo chmod 0755 /usr/local/bin/fuse_wait
sudo chown 0:0 /usr/local/bin/fuse_wait
sudo nano /usr/local/bin/fuse_wait
Copy & paste:
#!/bin/bash MNTPOINT=$1 shift TIMEOUT=$1 shift MNTCMD=$1 shift $MNTCMD "$@" &> /var/log/ntfsmnt.log MNTCMD_RETVAL=$? if [ $MNTCMD_RETVAL -eq 0 ]; then until [ `/sbin/mount | /usr/bin/grep -c "$MNTPOINT"` -ge 1 ] || [ $TIMEOUT -eq 0 ] do sleep 1 let TIMEOUT-- done fi [ $TIMEOUT -eq 0 ] && RETVAL=1 || RETVAL=$MNTCMD_RETVAL exit $RETVAL;
Save. Then:
sudo nano /System/Library/Filesystems/ntfs-3g.fs/ntfs-3g.util
Change the following line:
DEFAULT_NTFS_MOUNT_OPTIONS="auto_xattr"
to:
DEFAULT_NTFS_MOUNT_OPTIONS="auto_xattr,noatime,noappledouble,auto_cache"
Save. Reboot. Smile.
For details and alternative methods I wholeheartedly recommend reading through the aforementioned article and thank him, not me.
Solution 2:
The latest Tuxera build for Lion looks solid to me so far. I don't know if / when the free library will get a bump.