Friday, May 30, 2008

NTFS-3G 1.2531

Information on what's new in this version of NTFS-3G can be found at the NTFS-3G release page.

Changes on the Mac OS X side:
  • This release includes a workaround for the bug where ntfs-3g hangs at shutdown/restart (see the previous release for details), delaying system shutdown by 30 seconds and endangering the integrity of the affected NTFS file systems (especially with the ublio build). The workaround consists of a small program, ntfs-3g_daemon which unmounts all ntfs-3g file systems at shutdown. In order to ensure that ntfs-3g doesn't get the shutdown signal before the daemon (which will result in a lockup), signal handlers for ntfs-3g have been disabled completely. This should be considered a temporary solution, as there's still a bug to fix somewhere (in ntfs-3g or MacFUSE... not sure yet).
    You will thus see a new process in your process list called ntfs-3g_daemon. Don't terminate this process, or your ntfs file systems will be unmounted.
    Please report on how well this workaround works for you.

  • Partitions marked with any of the FAT partition types (FAT16, FAT32, FAT12) are now probed for NTFS file systems in case Windows has corrupted the partition tables. This is apparently common, and Windows doesn't seem to mind that a partition marked as FAT contains an NTFS file system.

  • Small bugfix related to ntfslabel returning unexpected values for valid file systems.
Download NTFS-3G 1.2531 [stable]
Download NTFS-3G 1.2531 [ublio] (patched for improved performance)

Packaging, patching, some OS X-related development and testing has been done by Catacombae Software (i.e. myself).

Requirements: Mac OS X 10.4/10.5, a PowerPC or Intel computer, MacFUSE 1.3 or later installed (1.5 recommended).
This package has been tested with OS X 10.4.11/Intel and OS X 10.5.3/Intel.

Known issues:
  • Files with filenames created in Windows containing international characters with accents, umlauts and similar dots and lines, or filenames with korean characters might seem unreadable in the Finder. This is because Finder apparently expects all filenames to appear in unicode decomposed form, while NTFS allows both composed and decomposed form filenames. This issue is hard to solve in a pretty way, but you should still be able to access these files when using the Terminal. For me, copying the affected files to a HFS+ drive using the command "cp" worked fine.

  • After installing ntfs-3g, all NTFS drives will disappear from the "Startup Disk" preference pane. Uninstalling ntfs-3g brings them back. I don't know any workaround or solution for this. Please investigate this issue if you want to help.

Sources:
ntfs-3g 1.2531 (patched)
ntfsprogs 1.13.1
fuse_wait.c
ntfs-3g_daemon.c

28 comments:

interconnect said...

working perfectly for me.. thanks erik!

GMSComputerSales.com said...

i'm also getting the problem with bootcamp drives not showing up in startup disk. fortunately, the disable command inside the tools folder fixes it for me without having to completely uninstall it.

great work...just wish this one was fixed.

Donaldini said...

If I want to upgrade, should I uninstall my previous version of NTFS-3G? (If yes, how?) Or just install it over the old one?

interconnect said...

donaldini,

i asked this question just a short time ago. you can do either. the installer will clean things up but apparently has on occasion left a few unused files laying around.

Charlie Browne said...

My Vistax64 SP1 NTFS partition doesn't show up but boots in boot camp but under MAC 10.5.x the partition shows as MS-DOS(Fat32) in Disk Utility. How can this be fixed without destroying my NTFS partition.

Erik said...

Charlie Browne:

The fact that your partition is incorrectly labeled FAT32 in your partition map shouldn't matter as the package is set to probe for that partition type as well.

Please email me at the address displayed at http://hem.bredband.net/catacombae so we can try to sort it out.
The first thing you should do is to enable debug logging (through a script located in the "Tools" folder on the NTFS-3g install .dmg file), reboot your computer and send me the file /var/log/ntfs-3g.log (if it exists).

em66 said...

Thanks for trying to fix the slow shutdown issue.
I'm still on Tiger (10.4.11) and have a bootcamp XP partition.
I installed the latest uglio version. Transfers of files between partitions still work fine, but the sutdown isn't much faster. Now it's the session logout which it slower than before. Then once the session is closed, the computer shutdown is very quick. Overall, it's a bit faster than before but still much longer than without ntfs-3g.

Another little issue I noticed is that it's impossible to copy to or from a directory or the NTFS partition when the name of that directory contains a letter with accent (é, è, à, ê,...). I guess it doesn't disturb english speaking people, but it does for other language. Not a big deal, I can still rename the folder before copying, but if it was an easy fix that would be great to do it.

Thanks

Erik said...

em66:

Are you sure that the long shutdown time only occurs when ntfs-3g is installed? There are lots of other reasons that shutdown can be delayed.

If so, I would like you to check it out... if you start your computer while holding down the keys Apple and V, you should be getting the verbose startup mode (you'll notice as you're going to see a lot of text rolling by at boot). When you restart your computer after booting it up like that, it goes back into text mode just before reboot. Check if you ever see ntfs-3g being mentioned in any line before the system shuts down, for instance the message "ntfs-3g[123]: didn't act on SIGTERM" (123 is the process id, and will probably be a different number for each boot).

The issue with accents and umlauts in filenames is listed in the "known issues" section in the blog post.

em66 said...

Thanks for your anwser erik.

I know it's ntfs-3g fault because before I installed it, the shutdown was almost immediate. And recently, when I installed the latest Tiger security update, ntfs-3G stopped working (the bootcamp partition didn't mount). The shutdown became immediate. Then I "repaired autorisations" on the OSX partition and the bootcamp partition could mount, and the shutdown went slow again.
I tried the verbose mode but it didn't really help. At shutdown, I had the desktop background for a few seconds (which is now the longer step since I installed the latest ntfs-3g), then a black screen with no text for a few other seconds, then a very few lines of text I didn't have the time to read because it shutdown right after.

It may be twice faster than before though.

Erik said...

em66:

If it stops on the black text screen for just a few seconds, I think everything should be completely normal. When ntfs-3g (or any other process) doesn't terminate normally your mac should wait at the black screen for 30 seconds or so. And you should be able to notice the text about ntfs-3g in most cases, I'm sure.
OS X probably logs these shutdown messages somewhere so one could examine them afterwards, but I really don't know where. I haven't seen them in system.log or console.log.

If you're using the ublio build, I guess one explanation could be that it takes some time to flush the cache to disk. Either way, I don't think I can improve your shutdown time more than this. :) You could check if the stable build means less shutdown time.
I would be intrested to hear if it does.

em66 said...

Same with the stable build.
It takes about 15 seconds for the desktop background to disappear, then 3-4 seconds of a blue screen, then 15 seconds of another blue screen with the circle turning.
I've also tried unmounting the NTFS partition from the Disk Utility before shutting down, but it makes no difference.
That's not a big issue, I prefer having a slow shutdown and ntfs support than no ntfs support at all.

Thanks for your help

Erik said...

em66:

I'd like you to check another thing... before you shut down your computer, unmount all ntfs file systems in Disk Utility. Then open Activity Monitor and make sure that there are no processes named "ntfs-3g" running. Now force-terminate the process "ntfs-3g_daemon" and shutdown/reboot. Is it going any faster now?

The reason I want to investigate further is that it sounds mighty strange that ntfs-3g should have any impact at all on the shutdown time when you have unmounted all ntfs drives prior to shutdown. Basically, if there are no ntfs-3g related processes running at shutdown time, ntfs-3g can't (as far as I know) interfere with shutdown at all.

em66 said...

I unmounted the ntfs partition.
Then I killed the 'ntfs-3g_daemon" task which was the only task with ntfs-3g in its name.
Yes, it's faster. Once the desktop background has disappeared, the computer stops.

Erik said...

em66:

Okay... *sigh*
So now ntfs-3g_daemon is delaying shutdown? It shouldn't. :>

I'll do some more testing when I have time. Hopefully your data is safe though.

em66 said...

I think I haven't had any problem with the data.
Thanks again for your help erik, if you need me to do another test you can ask me here.

Tebo said...

Hey... is this release solving Special Character problems?

Erik said...

Tebo:

No, please read the "known issues" section.

Michael said...

Hi Erik,
now I tried the 1.2506 ublio version - much faster than the stable one, but it seems that it NEVER syncs the disk to write the cached directory structure! After writing a few dozen GB over several hours, I inserted a USB stick and for some reason this disconnected the USB connection to the disk (MacFuse or OS X 10.4.11 problem). All content written was lost and repair (on Windows) created only a big mess in the folders with the recovered files.
As NTFS-3G will be often used for extern disks, I think that it should update the directory structures on the disk from time to time.

Erik said...

Michael:

Well, what can I say. I'd also like the ublio patch to periodically flush data as you say, but I didn't write the code, and I have seriously tried to get into it to be able to maintain it myself, but it's not very well documented imo. It's a case of "too much effort, boring work, nobody pays me to do it".

So I guess you'll just have to unmount before you unplug, or disable ublio for the particular drives that you are worried about losing connection (put a file called .ntfs-noublio in a directory called .NTFS-3G in the root of the drive to disable ublio... a 0 byte file will be fine).

Kalev said...

This might be a completely duh-newbie question but can anyone share the commands I'd use to get my NTFS partition to unmount read/write and remount back the way it used to (read-only) so I can use it with Parallels?

Erik said...

Kalev:

In what way does Parallels complain about the partition being mounted with ntfs-3g?

David said...

I've tried using both the stable and ublio versions, and I do not see the daemon running in either. For reference, I'm running 10.5.3 on a macbook pro (2.4ghz, 4gb ram) with a bootcamp ntfs partition.

Erik said...

David:

The daemon should start when you mount the first ntfs file system with ntfs-3g.
What happens if you start it manually in the Terminal? Go to the Terminal and type "sudo /usr/local/bin/ntfs-3g_daemon", and report back what happens.

Plumbum said...

First of all, thank you Erik, for making this cool tool available for us, mac users. I have one trouble though. Though NTFS-3G claims to support Windows ACLs, they don't seem to work no matter what mounting options I choose in MacFUSE. All files and folders on NTFS volume get the full read/write access and just ignore chmod. Is it a known issue or is it just me? I am running OS X 10.5.3 with latest build of MacFUSE (10.5.-1.5.1).

Erik said...

Plumbum:

I have honestly not tested the ACL support at all, in any MacFUSE file system... so I'm clueless about this particular feature.
If you want the issue to be fixed, you need to help me and tell me what to do to fix it. Collaboration is the key to quality open source software. :)

Maybe you could check that it works well on a linux system, and then throw out a question in the MacFUSE mailing list on why it works differently in OS X.

interconnect said...

MacFUSE 1.7 is out.

Raymond said...

NTFS-3G 1.2712 is out. Can you update the package?

Erik said...

Raymond:

Done.