如何在Mac OS X Lion(10.7) 中讀寫 NTFS 分區格式

來源:互聯網
上載者:User
文章目錄
  • Data Storages
  • Paid NTFS Solutions
  • Free NTFS Solution
  • Problems
  • UPD: Using native drivers from previous Mac OS X versions to speed up write operations

轉載自:http://blog.nolar.info/ntfs-3g-in-mac-os-x-lion-10-7-with-read-write-support/

簡單把文章內容說一下,其餘的細節和可能的問題等自己看英文吧。

問題:如何在Mac OS X Lion(10.7) 中讀寫 NTFS 分區格式?

回答:

  • 裝兩個軟體(* MacFUSE 64-bit 和 * NTFS-3G stable)即可。
    • MacFUSE 64-bit :https://www.tuxera.com/mac/macfuse/MacFUSE-Tuxera-2.2.dmg
    • NTFS-3G stable :http://sourceforge.net/projects/catacombae/files/NTFS-3G%20for%20Mac%20OS%20X/2010.10.2/
  • 若開啟NTFS-3G時出現問題(“15秒錯誤”提示,其實不影響讀寫,只是這個視窗會彈出來就讓人討厭),下載一個C程式在Mac下編譯即可解決。
    • C程式:https://gist.github.com/gists/1100318/download
    • 下載後在任意目錄下解壓,然後開啟終端進入該目錄,照著下面的複製粘貼執行就行了。
      • sudo mv /usr/local/bin/fuse_wait /usr/local/bin/fuse_wait.orig
      • chmod +x build.sh
      • ./build.sh . /tmp /


NTFS-3G in Mac OS X Lion (10.7) with read-write support


UPD 21.08.2011: There is even better way to solve the same issue with native Mac OS X drivers, but it has its own pros and cons. Read at the end for details.

UPD 12.09.2011 (IMPORTANT): Native driver makes NTFS unusable. Read below for details.

Mac OS X Lion (10.7) was released recently, in the end of July 2011. And many users had started to complain that their NTFS disks stopped working. And the much worse problem is that “old” solutions do not work well.

But after one or two weeks of researching of this issue, I’ve managed to make NTFS work in Mac OS X Lion (10.7). The key here is a proper combination of software versions.

So I will shortly describe the usual choices for external data storages, and what problems arises with each of them. And later I will show how you can get the most universal way — NTFS — to work where it does not work by default, with links and pictures.

Data Storages

The only reason to worry about this problem is an ability to access external storage drives. Even if these are your own drives and you can select a filesystem to use, that choice is not easy.

There are few possible choices for large (~1TB) file storages, but each has very unpleasant limitations and issues:

* HFS+/HFSX (or “Mac OS Extended”/”Mac OS Extended (case sensitive)”) — okay with big volumes and big files, but works natively under Mac OS X and Linuxes only. Windows need third-party software, which is either free file browser/extractor or paid low-level drivers.

* FAT32 work in each and every OS now, but has limitation for file size up to 4GB (so, you cannot store DVD image, which is usually 4.5+ GB).

* FAT64 (exFAT) is a new solution, but it works natively only in Mac OS X and Windows 7. Older Windows systems (Vista, XP) require Service Packs and updates to support exFAT. Linuxes do not support exFAT yet at all. More on that, it has only one file table, so if this only place will be corrupted on write, I will get all the data lost.

* NTFS. Okay with big files an bug volumes. Works natively in all Windows systems. Works fluently in all Linux systems. Has native read-only support in Mac OS X. But has not write support under Mac OS X.

As you can see, in terms of cross-compativility, NTFS is the best choice: it works almost everywhere, and with no limitations. The only issue is write mode in Mac OS X.

Taking into account that you probably have a lot of friends with NTFS volumes, who can visit you and bring you something interesting there, you actually have no choice except as try to make NTFS working.

So, let’s do it.

 

Paid NTFS Solutions

But first, in case you want to make your own research, or you are looking for a solution that just works out of the box, and you are ready to pay for it, you can give a try to Paragon NTFS for Max OS X 9.0 for $19.99 (5-days trial). That is much cheaper than Tuxera NTFS for Mac for $36.02 (with 15-days trial).

The former one definitely works – I’ve tried it in trial. Just install and get everything ready: both read and write modes, auto-mount, and also NTFS formatting in Disk Utility, disk checking, etc.

I haven’t tested the latter one, so you can leave a comment here about your experience with Tuxera paid solution.

 

Free NTFS Solution

This free solution requires some efforts. Not so much, of course. Well, if you are going to make your own research, it can be lots of efforts, since the situation with NTFS-3G is not very clear now.

But if you are just about a ready, copy-n-install solution, it will be easy, and requires only these two or three steps:

* MacFUSE 64-bit.

* NTFS-3G stable.

* “15 seconds” error work-around (optional).

MacFUSE 64-bit

First, you need MacFUSE with 64 bit support. That is the main problem with Mac OS X Lion — it uses 64-bit kernel, and all previous version of Mac OS X used 32-bit one. So, old MacFUSE binaries won’t work anymore.

You can get Tuxera MacFUSE 2.2 image for free (could not find a page with it, just a download links) or try to compile OSXFUSE from sources. I’ve used the former one.

You can see MacFUSE preferences in “System Preferences”. Well, actually these are not preferences, but only “update” and “uninstall” actions, and current version info:

NTFS-3G stable

Second, you will need working copy of NTFS-3G. Long story short, NTFS-3G is either already dead or is going to die. There is its ancestor: Tuxera NTFS for Mac (paid).

But we are going to use old version of NTFS-3G — the one from 2010. I’ve got one from here. But you can try googling for it, or browse here for this exact version (not 2011 — I’m not sure they work).

I also tried to install later version from MacPorts, but it does not work too: mounts something that stills unreadable. That is in addition to an error in installation process (“mv” does not see the libntfs-3g file or so).

Now, when you have installed two binary packages, you can restart Mac OS X and try to attach the drive. It should work.

NTFS-3G preferences pane looks populated and interesting:

“15 seconds” error work-around

But it will show you the error message saying that there were not signal in 15 seconds:

This is not a big problem, because everything works fine. Only annoying message box is a problem.

So the third, optional step is to address this issue. You can follow this link: https://gist.github.com/1100318 (see first and the only comment under the code). You just download this attached C file, run “gcc” command line from the comment, and replaces the “fuse_wait” binary as said there. Yes, you will need “gcc” here.

And voila! Now you have working NTFS filesystem for free with no “15 seconds” error message. Profit!

本人註:附上comments的原文。上述代碼:https://gist.github.com/gists/1100318/download

Because of a change in Mac OS X 10.7, fuse_wait (a tool distributed with NTFS-3G for Mac OS X) displays a "15 seconds" timeout error every time a NTFS volume is mounted.

Download this gist and run the following commands to build and install this unofficial version of fuse_wait, that fixes the issue. Please note that Xcode has to be installed for this to work.

sudo mv /usr/local/bin/fuse_wait /usr/local/bin/fuse_wait.origchmod +x build.sh./build.sh . /tmp /

NTFS-3G and other filesystems using fuse_wait should now mount fine (without the timeout error) and stay mounted. Don't forget that this is just a workaround. This issue has to be fixed in an updated version of NTFS-3G.

To revert to the original fuse_wait, run the following command in Terminal:

sudo mv -f /usr/local/bin/fuse_wait.orig /usr/local/bin/fuse_wait

I Hope this helps.

 

Problems

Nevertheless, Mac OS X is a Unix-based system. And Unix-based system is a big problem when they work as desktop OS (earlier I thought that on Linux-based system because of community-driven and crowd-based development concept). This solution has some problems too. Though they are not about the solution itself, but about the components used.

The most important problem now is the speed: with this NTFS-3G on MacBook Air (4GB, i7 CPU) write speed for USB 2.0 drive is about 3.3 MB/s. Just to compare, the same drive in the same port, but with exFAT/FAT64 partition can write with ~38 MB/s (or fast enough to make exact estimation; will try larger files later).

Also, immediately following the mount of a drive, there is a line in system log with an error message saying:

8/20/11 6:27:48.394 AM fseventsd: could not open <</Volumes/MYPASSPORT/.fseventsd/fseventsd-uuid>> (No such file or directory)8/20/11 6:27:48.434 AM fseventsd: log dir: /Volumes/MYPASSPORT/.fseventsd getting new uuid: FA7C5FF2-4B57-40CA-9BC6-871C36C13C23

Where MYPASSPORT is a volume label. This file exists there, but it is updated each and every time you mount this filesystem. I guess this is because of fuse_wait wrapper, which ignores the signals that filesystem was successfully mounted, and “fseventsd” tries to read the file while filesystem is only being mounted. But it makes no problems, luckily.

 

UPD: Using native drivers from previous Mac OS X versions to speed up write operations

There is even better way to solve the same issue with read-write access to NTFS volumes, which involves native drivers from previous Mac OS X versions. It is described in Russian here. Credits for this method go to Casing from macdaily.me blog.

In a nutshell, you should use classic solution with “/sbin/mount_ntfs” wrapper script (that does not work in Lion on its own), and you should replace the kernel extension module for NTFS with the one from Mac OS X 10.6.8 (only one binary file: /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs).

To do so, download this archive (mirror: NTFS_Enabler.zip), and follow the instructions in “Terminal-CMD” text file. Do not forget to “disable” NTFS-3G (globally or for your specific drive) in System Preferences before using this method.

PROS:

  • High speed of write operations – about 30 MB/s (compare to 3 MB/s with NTFS-3G).
  • Deleted files go to the Trash folder rather than deleted instantly as with NTFS-3G.

CONS:

  • Well, this is a hack after all. One day it will stop working.
  • Mac OS X updates can overwrite your replaced NTFS driver, and you have to re-install it again.
  • Disk Utility cannot create new NTFS volumes with the native NTFS driver.
  • If a volume was ungracefuly unmounted in Windows, it will be mounted read-only in Mac OS X, saying this message in system log:
8/21/11 12:48:43.000 AM kernel: NTFS-fs error (device /dev/disk1s1, pid 4859): ntfs_system_inodes_get(): $LogFile is not clean. Mounting read-only. Mount in Windows.

All the “cons” can be solved by installing NTFS-3G and keeping it disabled all the time, except when you need to format new volume, or to mount a problematic volume. Actually, it is better to enable NTFS-3G, mount it with NTFS-3G, then unmount, disable NTFS-3G, and mount it with native drivers; or use “ntfsfix” if you are not afraid of command line after all these hacks

IMPORTANT UPD 12.09.2011: Please read comments below: people say that this driver makes NTFS filesystem corrupted and unusable.

I had the same experience: my NTFS volume become only partially readable in Mac OS X, and completely unusable in Windows.  More on that, when I tried to attach the drive, Windows kernel started to use 100% CPU, and did not stop to do so even when the drive were detached. Drive letter never appeared.

Luckily for me, I had two backups of the whole volume (I do so when experimenting with new drives, since I once lost my whole photo archive due to burned out new drive). To solve the whole problem of NTFS@Mac, I’ve finally bought Paragon NTFS for Mac.

  • Category: Knowhows
  • Tags: apple, disk, fat, fat32, fat64, fuse, hfs, mac os x, macbook, macfuse, ntfs, ntfs-3g, paragon, partition, storage, tuxera
  • 22 Comments
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.