Friday, September 14, 2007

NTFS-3G 1.913 package for Mac OS X

A new revision of my package including the latest version of NTFS-3G.
This revision throws out shadowofged's binaries, which were probably not so legal to distribute anyway. I have written a replacement for shadowofged's fuse_wait utility, which is included in the package.

Download NTFS-3G 1.913 (package by catacombae)
Requirements: Mac OS X 10.4, a PowerPC or Intel computer, MacFUSE 0.4.0 (or later) installed.

The source code for fuse_wait is here. It is distributed under the General Public License version 2.

Note: Even though the binaries are built as universal binaries ("fat" binaries), I have had no chance to test them out on a PowerPC machine, so I really don't know if it works or not. You try it...

The source code for ntfs-3g 1.913 is available here.
The source code for ntfsprogs 1.13.1 is available here.

50 comments:

Anonymous said...

Works great (MacBook Pro, Intel, OS X 10.4.10). Thanks!

Erik said...

Wonderful. :) Now, I'd like some feedback from PowerPC users as well.

Anonymous said...

Automount seems to not working on an PPC Mac.

Anonymous said...

I'm running a Macbook Pro 15.4" 2.16Ghz model using a FW800 (Raid 0) 1.5 TB Drive. It seems to work well enough. But...

Xbench can't benchmark it, it quits with an -54 error. Daniel Johnson's 1.826 version worked with Xbench just fine. Disk Speed Bench X gave me a score of:

Elapsed time 84.955603 secs; transfer speed (6319429bytes/sec)

The score that Daniel Johnsons 1.826 version gave me:

Elapsed time 68.732899 secs; transfer speed (7810974bytes/sec)

So, this 1.913 version is slower according to that benchmark by 16.222704 secs. :-(

Just for comparison, HFS+ under Disk Speed Bench X with this FW800 drive gave me a score of:

Elapsed time 8.392136 secs; transfer speed (63973094bytes/sec)

So, it looks like there's quite a way to go yet, but still worth keeping an eye on.

Anonymous said...

works 100% on my hackintosh ;:) thanx

CeK! said...

Thank you for your great package & the time you have dedicated to it!

Here on a MBP 2.1 3Gb 10.4.10 it is working perfect.
2Things/quirks I've encountered:

1) I had to use your script to uninstall previous version as the installer refused to update to an "older version". (Maybe coz I messed around and adapted the version that I had to my needs)

2) I had to reboot to actually fix another quirk where the free space was wrongly reported.

May I talk about this in my blog, in Spanish (Spain) and put a link to your's?

CIAO!
CeK!

Unknown said...

Some people reported somehow reduced streaming write performance. This is an unexpected temporary side-effect of other performance fixes, nobody has noticed unfortunately during BETA and RC testing before the 1.913 release.

However the real performance issue is the lack of the user space caching library integration (Csaba Henk's ublio). The reason is that we have found some problems during our quality testing which are not resolved yet. But hopefully they will be soon which should increase performance on OS X by several folds.

Thanks a lot Erik for reviving NTFS-3G on OS X.

Rob Lewis said...

I'm very interested in this package, but the more I look into ntfs-3g, the confuseder I get. I've already installed MacFUSE 0.4.0 and fink's version of ntfs-3g. Can I install your package over this without screwing things up? Any risk or downside? How would I uninstall it if I needed to?

Oh, and what is fuse_wait?

Erik said...

anonymous, Sep 16 4.16 AM: Alright... PowerPC not working. That's sad. Please contact me if you want to be a tester so we can find out what's wrong. One intresting aspect is if it's possible to mount manually or not...

anonymous, Sep 16 6.57 AM: I have also noticed some speed decrease with the lastest version. What XBench does is unknown to me, but generally I wouldn't expect fantastic performance from a user space file system module.

cek!: I don't know what package you had installed previously, but it's possible to configure packages so that they don't update to older versions. The versioning of the package can be set differently from the NTFS-3G version, and I do so. I guess that's the issue there.
Free space reported incorrectly? Well, that's outside my scope, but it's strange that it didn't help unmounting and remounting...
You may link here, and talk about these things. :) Freedom of speech you know.

szaka: Intresting to hear. I have also noted reduced writing performance (specifically, when writing VMWare suspend images it becomes noticable). You have done a lot to benefit the community, I should be thanking you, not the other way around, if you're the one that I think you are. :)

Rob Lewis: I would uninstall the fink package first, if I were you. Fink puts its files in a separate location, isolating them from the normal unix hierarchy to avoid messing with things, so it shouldn't be a problem, but you never know...

Erik said...

thomas and others, my mail can be found through my regular web page:
http://hem.bredband.net/catacombae
Contact me if you want to help figuring out what is needed to make this package tick on PPC machines. I prefer not to post my mail address as text... I get enough spam as it is.

huntz said...

iBook 1.33ghz, PPC
OSX 10.4.10

The package is working perfectly (well, almost perfectly, the only problem is poor performances... but it's a know problem...)

Anonymous said...

Works like a charm, pretty nifty, although two notes:

1. VMware Fusion booting an NTFS Boot Camp partition used to dismount that NTFS volume in OS X before starting up that Boot Camp partition through VMware. Now it does not. I'm not sure if that's asking for trouble, or if VMware was being too conservative in dismounting a read-only volume.

2. Just for fun, I did a Repair in OS X's Disk Utility on an external NTFS drive I used as an old bootable backup of my Windows XP laptop. After the repair, OS X would no longer mount the drive (with or without NTFS-3g) and when the drive was plugged in running Windows Vista through Boot Camp it brought Vista to a halt until the drive was removed.

Spincycle said...

Hi Erik,

First, I'm really glad you wrote this, and I wish I would have discovered it sooner. I have tested very briefly, and it seems to work quite well, but there is a problem.

I DJ off of a laptop (have done so for years--pre iTunes!). When I went to test my NTFS drive in iTunes some of the songs that had previously worked using my NTFS drive (pre NTFS-3G installation) did not work. But most of them did.

I poked around a bit, and determined that NTFS-3G is choking on filenames and folder names that contain accent marks, for example:

03_Pedro Navaja_Rubén Blades - Willie Colón_Siembra.mp3

I'm not sure if this is a Unicode issue, or just using 7-bit v. 8-bit ASCII (I only know enough to be dangerous). What I do know is now I can read and write to my NTFS drive, but I can only a read a subset of the data on it. Whereas before, using straight OS X I could read it all.

I'm hoping you can solve the problem and let me know, because what you've done (and could do) have tremendous utility!

Thank you,

Jim Sowers (DJ SpinCycle)

Erik said...

darius:
1. Well, the volume should certainly be unmounted when VMWare is booted from that hard drive. Anything else would be dangerous. I don't know why it's not being done though. If VMWare issues a "umount -f" command, it should unmount, but I don't know what it does. Maybe it assumes that OSX is using the internal read only NTFS driver and issues commands specific to that file system package.
2. I haven't even tried to repair NTFS volumes with ntfsprogs like that. If it destroys the volume, it's best to exclude ntfsprogs from the package... in the meantime, be careful with those operations.
Did you find any way to recover the volume?

Spincycle:
Did you try the .ntfs-locale trick described in Installation.txt in the dmg?

Kevin said...

erik, I just want to clarify, will this work fine for external USB/FW drives that I share with XP?

It has been kind of round-aboutly answered, but I do want to make sure.

Thanks!!

Erik said...

Licotto:
The only answer I can give in these cases is that it shouldn't matter what type of physical connection you use to communicate with your drive. If it shows up in Disk Utility, NTFS-3G should also be able to mount it.
I have two external NTFS formatted USB2 drives myself, and when I insert the USB cable, they pop up and automatically mount with NTFS-3G. So... "it works for me".

Spincycle said...

Hi Erik,

No luck. I thought I submitted this comment earlier, but I don't see it posted.

Anyway, I previously installed NTFS-3G without using a .ntfs-locale file per my earlier post.

After reading your comment, I tried adding a .ntfs-locale.txt with one line "en_US".

The result was that now the drive does not show up at all. However, when I run DiskUtility, it shows the disk as being present and mounted (as an NTFS volume). Yet, I can't see it in the Finder and cannot access it in iTunes.

I have a feeling the solution requires delving into command line stuff which don't do much of.

Wish I knew how to make it work.

Thanks.

Erik said...

Spincycle:
The file is supposed to be called ".ntfs-locale", and not ".ntfs-locale.txt".
Is the drive not showing up at all? Have you unmounted/remounted it in Disk Utility? Have you checked /Volumes to see if it's listed? Have you rebooted? Sounds strange to me, because the presence of a file called ".ntfs-locale.txt" shouldn't alter the operation of ntfs-3g at all.
FYI, the contens of my ".ntfs-locale"-file reads in hex: 73 76 5F 53 45 0A. This reads "sv_SE" plus a linefeed (0x0A).

kea said...

hi! great job on creating this!
but i have a question:
i've got a PORTABLE HDD drive with ntfs file system on it.
After i set up ntfs-3g with macFuse, i still got ntfs on my HDD and read-only permission.
Can u help me?

Erik said...

kea & everyone else:
Please state what kind of Mac you have and what OS X version you're running when reporting problems.
Be verbose... you can't expect me to sit here and guess all the relevant details. ;)

kea:
I don't really know what the problem might be, but have you restarted your computer after the install? What does it say in Disk Utility, regarding partition system and file systems on that drive?

kea said...

mac os x 10.4.10
macbook pro intel
_____
rebooted, but still no changes
disc utility: can read & write
but finder's "disc options" tells that i have permission only to read.
Still Windows NT Filesystem

loak said...

10.4.6
PPC G4
macfuse0.4.0
ntfs-3g 1.913
--
everything is working fine, including automount with external usb drive

Erik said...

kea:
What version of MacFUSE do you have installed? If it's not 0.4.0, install that one.
Otherwise I can't think of a solution right away. If you know how to mount the drive from the terminal, please try that. If it works, and automatic mounting doesn't, there is some issue with my package...

Anonymous said...

Hi Erik!
Fabulous to see people like dedicating their time on such project :)

it doesn't seem to work for me though:
MacBook 2.16Ghz Intel OS X 10.4.10
macFUSE 0.4.0 ntfs-3G 1.913


I installed both macfuse and ntfs-3g (no prior install attempt of any version).
I have an external 500GB HDD connected firewire 400 with 2 partitions created under an IBM laptop running WinXP. First partition is FAT32 (disk1s1), works fine. 2nd partition is NTFS (disk1s5) and doesn't show up since the installation.
In disk utility: I see fat32 partition with a volume icon (mounted OK and ejectable).
I see the ntfs partition with a file icon and mounted. It is not unmountable and disk repair cannot work on it, error msg: "Repairing disk failed with error Could not unmount disk".
Any idea on what's going on or what I'm doing wrong?
Many thanks
Olivier

Erik said...

oliver:
1. Did it work before NTFS-3G installation, with the internal read only-driver?
2. Second partition, the NTFS one, is called disk1s5, when you'd expected it to be called disk1s2. Do you have any idea why?
3. What output do you get from the commands "diskutil info /dev/disk1" and "diskutil info /dev/disk1s5"?
4. Can you mount the partition manually from the command line? (sudo mount_ntfs-3g /dev/disk1s5 [your mount point])

Please reply in a mail, so this comment space isn't spammed with console output. My mail address can be found at:
http://hem.bredband.net/catacombae

Anonymous said...

Thanks a lot Erik for the prompt response!
I email you those infos

Unknown said...

I installed newest package of fuse and ntfs-3g on my osx 10.4.10 but read and write performance sucks.
Its below 1MB/sec. it takes 27 minutes or so to copy a game image. Please tell me that there will be a fixed version soon that does not feel like 56K :-((((
Its horrible slow

Anonymous said...

ViennaLinux.at & Erik:
The slowness on OS X and FreeBSD has been solved using a caching layer in January of 2007 by Csaba Henk. Alejandro Pulver and Paul Marks ported and integrated this work into NTFS-3G on OS X. All the needed code is freely available and could be used already: http://shadowofged.blogspot.com/2007/05/ntfs-3g-performance-gains.html
I'm sure Erik could do it and I would also happily help if needed in general NTFS-3G issues (I don't have OS X).

Erik said...

ViennaLinux.at & Szabolcs Szakacsits:
I don't know... personally I don't experience this horrible slowness. I did a quick test with a 469 MB image that I had lying around, and copied it first from the NTFS partition to the HFS+ partition on my laptop, and then back the other way.
NTFS -> HFS+: 11,7 MiB/s
HFS+ -> NTFS: 10.4 MiB/s
This is all done using the exact build that's included in the package. No tweaks, no tricks.
Okay, it could be faster, probably, but it's perfectly reasonable for this type of driver. I mean, doing the same in Windows yields a speed between 10 and 30 MiB/s (on my Windows hardware at least... Seagate PATA/100 drive at 7200 rpm).

I'll gladly apply these patches, but I don't think I'll be able to verify that they do what they're supposed to do.

@viennalinux.at... what are your hardware specs?

OT: olivier and I have had some conversation on his problems, and it turned out that his partition was marked as FAT32 in the partition table when it was NTFS formatted. So OS X wouldn't call the right probe script, and wouldn't mount it.
...just in case someone would like to know the solution to that specific problem.

Erik said...

Today, I'm confused...
That previous OT-section wasn't olivier's problem at all. It was thomas' problem. :)

Anonymous said...

Erik:
I wasn't aware speed can be 10+ MB/s on OS X. I thought it's maximum around 1-2 MB/sec.

If NTFS-3G uses 100% CPU then it's an NTFS-3G issue, otherwise typically it isn't.

A common USB problem is if it's not running in high-speed mode but only in low-speed or full-speed. This is a completely file system independent issue.

I can get 60 MB/sec write speed on Linux but the maximum is around 100 MB/sec. With zero-copy FUSE this could be increased to 400-500 MB/sec and much more only if the Linux kernel would support large block sizes (work in progress) and/or eliminate the needless context switches.

I don't know what are the performance bottlenecks on OS X.

Anonymous said...

For some reason, I can only mount RW the first partiotion on each of my 2 Firewire drives... Their connected through the same enclosure (running Oxford 924) and after getting MacFUSE and this, I can only mount read-write the first partition of each drive!

I tried unmounting them all, and then picking just one of the other that was not mounting RW and it still wouldn't do it for those...

Help? :)
Thanks in advance!!

Anonymous said...

Works great so far on an Intel Mac 10.4.10 kernel 8.10.1, however a few issues, my GUI locks up when moving around files >200mb since i install the driver [doesnt make a difference what format the destination is]. also, i guess its an issue within BSD coding, hotlinking some filenames with accents on letters is rejected. itunes gives me no issues, other programs have, but its not common, so i'm not sure what to think. i run two internal drives [on OS, one data] so it will definately persuade me to format the data drive to NTFS, much more stable filesystem.

definitely makes my external drive useful again! and this driver also worked...previous driver had not worked at all...i have iMountit installed, but i guess its not necessary, but i keep it anyway.

Erik said...

Szabolcs Szakacsits:
I'm not even sure what speed I get when running Windows, but 100 MiB/s seems a lot to me. I wonder if my drive will be able to deliver that in Windows.
Anyway, I can see that performance tuning/work for OS X is needed, although CPU usage is seldom noticable (1-2%) when doing disk operations on my computer.

Levi Figueira: Did you go through the "Troubleshooting" post on this blog?

bonestonne: I haven't ever experienced any issues with the UI locking up... so I can't help you there. About the "hotlinking" issue... are you referring to symbolic links? Trying to create links from a folder in your HFS+ file system to files/folders on the NTFS volume? In that case I can imagine that it could become problematic, since I think HFS+ and NTFS have different policies on how to store Unicode filenames. HFS+ enforces that the characters should be stored decomposed (umlauts and accents stored separate from the characters that they're modifying) while I'm not sure that NTFS enforces any policy. Thus it may be that the HFS+ driver refuses to create a link to a file with composed characters in its name. It's just a wild guess though.
Do you get any specific error message when doing this?

Anonymous said...

Thanks a zillion Erik!!
It's working fine now (pb desc was my second partition not able to be mounted, disk1s5).
You were right, my external HDD wasn't unmounted properly in WinXP. So I connected it to WinXP, ejected it, replugged it to the Macbook and it's working fine. It also recognize the right capacity (448Go instead of 118Go when I had the problem).

Anonymous said...

erik:
Going above 20-60 MB/s today typically needs RAID. If the NTFS-3G CPU usage is so low then the problem is quite probably the synchronous reads/writes without any caching, read-ahead and write-behind.

The UBLIO caching layer should address these somehow. Using the patches the usage should be the same as for FreeBSD:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/fusefs-ntfs/files/pkg-message.in?rev=1.4

Anonymous said...

Works great on my MBP Santa Rosa 2.2 - only the volume doesn't show up in the side bar of my finder windows anymorek. Thanks for this package.

Anonymous said...

Erik,

first off this version is much faster then the previous. I'm able to run parallel images off of my external firewire drive.

Now my problem. Is there anyway to configure it, so that it will not automount my "boot camp" partition? I've noticed that my performance has dropped with it. If I uninstall ntfs-3g it goes back to its normal speed.

Thanks

Rich

Anonymous said...

I've just installed MacFUSE and NTFS-3G. Great! However, if I may, I have a couple of suggestions for the developers of the Mac OS X version:
- Make it possible for automatic DVD playback operation not to be broken by MacFUSE/NTFS-3G. As it is now, you have to insert the DVD and then run the Mac DVD Player application.
- Automate (perhaps via a configuration file on the relevant NTFS drive) if .DS_Store files should be written by Mac OS X in the folders visited by Finder on the NTFS drive.

Erik said...

anonymous, September 27, 2007 10:59 AM:
1. I can't confirm that bug. My DVDs play automatically when I insert them, and I haven't had any issues at all with that. Are you really 100% sure it is NTFS-3G that is causing your DVD problem?
2. This is really about controlling the behavior of the Finder. There is a way to turn off creation of .DS_Store files on network mounts... perhabs it also affects MacFUSE mounts (they're at least displayed with network icons, so you could at least try ;>). Download TinkerTool and check the appropriate checkbox for not creating .DS_Store files and see if it helps. I don't know a way to turn it on or off for specific mounts. That's way too deep into the Finder for me.

Anonymous said...

Where can one set the FUSE mount options? I assume one has to create a file in the root directory of the FUSEd drive. What should its name be?

Anonymous said...

Erik, you are right. Amazingly, DVD Player works automatically today upon disc insertion. I can't figure out what was wrong yesterday.

As for the per-drive settings, I know it isn't an NTFS-3G issue, but rather a MacFUSE issue (which will pass on instructions to UNIX). Apparently, there's a noapplespecial MacFUSE mount option, but, much as I've read, I've been unable to find out where on earth that option -onoapplespecial should be inserted.

Regards

Dwovar said...

Just thought i would let you know that i installed MacFUSE and NTFS-3G_1.913-catacombae.dmg on my laptop and was able to automount and read a Win XP Pro w/SP2 install disk with no problems. I didn't do anything else with it as all i needed to do was look at a README, but thought that i would let you know...

Thanks for your work on this!

Machine Info:

Machine Name: PowerBook G4 17"
Machine Model: PowerBook5,9
CPU Type: PowerPC G4 (1.5)
Number Of CPUs: 1
CPU Speed: 1.67 GHz
L2 Cache (per CPU): 512 KB
Memory: 1 GB
Bus Speed: 167 MHz
Boot ROM Version: 4.9.6f0

Model: MATSHITADVD-R UJ-846
Revision: FAAG
Serial Number:
Detachable Drive: No
Protocol: ATAPI
Unit Number: 1
Socket Type: Internal

Anonymous said...

Please excuse my ignorance, but how do I uninstall the NTFS-3g version that I have installed that I think is by Daniel Johnson.

Erik said...

Atom:
I just added a line in the post "Troubleshooting / FAQ" for that. I added a link to a universal package removal script which you can use to remove any package.

Anonymous said...

Hi, I just tried this out but I can only read and still can't write to my NTFS ext drive. What I did was install MacFUSE Core-0.40 from google, then install NTFS-3G_1.913, restart my Mac and turn on my ext hdd (firewire) and tried to copy a simple rtf file over, but it wouldn't let me. Is there anything else I should do other than installing these 2 pkgs? Thank you.

Machine config:
PowerMac 2xG5 running 10.4.10

Erik said...

howard: Do you know whether NTFS-3G has become the active file system driver for your drive or not? It's pretty easy to tell... as soon as NTFS-3G mounts the drive, the volume icon changes from the standard hard disk icon to the one used for network mounts.
To be really sure, open Disk Utility and browse to your NTFS drive, click on the NTFS partition and check whether it says "Windows NT Filesystem" or "Windows NT Filesystem 3G" in the file system field.

Anonymous said...

Erik, you were right, I guess NTFS-3G is not the current active FS because it still says "Windows NT Filesystem" on the mounted ext hdd. How to I make it the active FS? "m not good at using the console on the Mac. Please advise, thank you.

Erik said...

howard: I think we have to sort that problem out by mail, because is _should_ become the default file system driver for NTFS file systems automatically. Please drop me a mail... my address can be found through my regular web site http://hem.bredband.net/catacombae (I prefer not to write it out in plain text due to all the spambots crawling the web).

Anonymous said...

Sure, I'll send u an email, thank you for helping me out.