Sei sulla pagina 1di 13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);

IM.GETTING(THIS);
Edit Delete Tags Autopost

NTFS WRITE SUPPORT ON OSX LION WITH NTFS-3G


8Aug2011 53Responses 30634views fuse fuse4x lion macfuse ntfs3g osx

Update2:CheckoutthispostforaprebuiltbinaryinstallerforNTFS3Gthatcanbeusedwith the Fuse4X solution detailed below (i.e., if you're not willing to go through all the steps of installingXCode,MacPorts,etc.that'sdetailedbelow,youcanjustinstallFuse4Xbinary(from here)andtheNTFS3GinstallerI'mprovidingonthepostlinkedabove). Update: Thanks to some suggestions from Marcos on the comments below, I kicked myself backintotryingtosolvethemountproblemwithuids/gidsonfuse4x/ntfs3g.I'veupdatedthe scriptbelow,itnowimprovesthingssomewhat.It'sstillnotperfectit'llworkfineifyouruser logsinautomatically,otherwise,it'lltrytowaitfor20seconds(adjustableontheTIMEOUT variable)untiltheusersessionisactiveanditpicksuptheuseridfromthesessionstarted,and ifthattoofails,itfallsbacktotheoldbehavior(fixeduids/gids).There'salsoanalternative solution for that provided by Marcos on the comments area of his post, check it out (in portugueseGoogleTranslateisyourfriend). It'sawellknownfactthatOSXhadNTFSreadsupportforalongtime,butwritesupportcould onlybeeasilyenabledeitherby: Buyingthirdpartysolutions,fromParagonorTuxera.Thelatterisactuallyaproductfied versionoftheopensourcesolutionmentionedbelow Enablingmanuallyonthenativedriverbymessingaroundwithsystemfiles.Thatoptionis knowntobeveryunstableandcanpotentiallycorruptyourNTFSpartition,soit'sstrongly NOTrecommended.Also,thisworkedonlyonearlyversionsofSnowLeopardapparently Appledisabledthis"feature"later(thoughitseemsnobodytrieditagainwithLion).It's obviousthatwiththismoveApplewasclearlysayingthatthedriverisnotreliableforwrite supportandshouldnotbeusedassuch. AportofMacFuseandNTFS3GprovidedbyTuxera.Theofficialversionsareoldanddon't workatallon64bitkernels(i.e.Lion). On the last case, there are unofficial builds of MacFuse that work on 64bit kernels, but not withoutafewissuesthispostwilloutlinethestepsongettingthisunofficialversionofMacFuse workingalongwiththeolderversionofNTFS3G(theversionthatwasstillfree,beforeTuxera went completely commercial with it). Also, while most of the procedures detailed here were testedinmyOSXLioninstallation,itshouldintheoryworkonSnowLeopardtoo,Ijusthaveno waytoconfirmthisatthistime.Feedbackiswelcomeonthat. I'm also going to outline the steps on getting to work a solution based purely on MacPorts, a packagemanagerforOSXthatworksbydownloadingthesourcecodetoapackage,compilingit onyourmachine,andinstallingit.Thatsolutionworksfineforthemostpart,withonlyasmall caveat,thatmayormaynotaffectyoudependingonhowyouworkwithyourMac.Inmyopinion, though, this solution is also more robust and (hopefully, once the small kinks get worked out) bugfreesolutionandeasiertomaintainandupdate(thankstoMacPorts)onthelongterm,andI hopeitgetsnoticedbythedevelopersinvolvedbecauseofthat.I'mpersonallyusingthissolution rightnow,butduetoitbeingsomewhatmorecumbersometosetup,itprobablyshouldbetaken as geared towards power users if you want something a bit easier to setup, you're probably betteroffwiththeMacFuse+Tuxera'sNTFS3Gsolutionpresentedbelow. Beforewestart:WhilethestepsIoutlineherearemoreorlessfoolproof,you'llbeinfactmessing around with a little bit of the inner workings of OSX. In theory, what you'll do shouldn't completelywreckyoursystem(atworst,you'llnolongerbeabletomountyourNTFSpartitions), but the standard disclaimers apply: Any problems caused by what you'll do henceforth are entirely YOUR responsibility, not mine. If your system stops working correctly, if your NTFS partitiongetscorrupted,ifyoursystemblowsuptopieces,etc.it'sYOURfault.Also,sincethe proceduresoutlinedheremodifiessystemfilesandneedsyoutoworkmostlyontheTerminal, someexperiencewithworkingwiththeterminalandthebashshellis,whilenotrequired,advised, speciallyinthecaseyoubumpintoproblems.Ifyou'renotconfortablewiththatandabsolutely need NTFS write support, do me and yourself a favor, and buy one of the paid solutions mentionedabove. I'llstartwiththeeasiersolution(fornow),sinceIsupposethiswillbetheonethatmostpeople willendupgoingwithasitrequireslesspresetupprocedures. Andbeforeyoustarteitheroftheproceduresbelow,umountyourNTFSvolumefirst(right click/ctrl+clickthevolumeicononthedesktopandselect"Eject").

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

1/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);

MacFuse+NTFS3G(olderopensourcereleasefromTuxera)
Get the latest opensource version of NTFS3G by Tuxera from hereandonlyhere don't get anythingnewerthanthat,thatwouldbeTuxera'scommercialversion,andit'llrequireyoutobuy itafterthe15daytrial. Fora64bitsupportedMacFuse,therearetwooptions:this(usethelinkforthefilemacfuse core10.52.1.9.zip) or this. The former is the last opensource version of MacFuse from Tuxerapatchedbyanindependentdevelopertoworkon64bit.Thelatterisapatchedversionof anewerversion(2.1.15)meantforWuala'sappalthough,forourpurposes,itshouldworkwith NTFS3Gjustaswell.Therearenonotableorevendocumenteddifferencesbetweentheolder andthenewer,sothechoiceisuptoyouduringtesting,I'veusedbothwithoutproblems. Unpack the zip file for MacFuse and doubleclick the pkg file to install. Next, install NTFS3G fromthelinkabove.Onceit'sdone,you'llberequestedtorestartdoso. Onceitcomesbackup,afewmomentsafterthedesktopcomesup,you'llbegreetedbysomething likethis:

Downloadfullsize(43KB) Yeah, that's the issue I mentioned early on. It's not an usability issue, i.e. the partition will be mountedreadwritecorrectly(eventhoughitsaysonthedialogitwasn't),andyou'llbeablework withitwithoutanyproblemsorcorruptionissues,asfarasI'maware.Theissueisreallyjustthat naggingdialogthatpopsupeverytimeyoumountaNTFSvolume,includingonbootinthiscase, ifyou'vegotaWindowsinstallonyourMaclikeme.Inshort,everythingworksfinedespitethat dialog. Theproblemseemstostemfromthebinary"fuse_wait"fromNTFS3Gthat'srunasafinalpart ofthemountingprocedureforsomereasonitcan'tdetectthatntfs3gmountedthevolumeand staysonahopelesslooptryingtodetectthisconditionuntilitgivesupafter15seconds.Somy workaroundinvolvesreplacingthefuse_waitbinarywithascriptthatdoesmoreorlessthesame thing,butactuallydetecting(sortof)themountoperationandnottimingout. OpenaTerminalwindow.Firstofall,makeabackupoftheoriginalbinary:
sd m /s/oa/i/uewi /s/oa/i/uewi.rg uo v urlclbnfs_at urlclbnfs_atoi

Thencreatethefilethat'llholdourscriptandsetuptheproperpermissionsforit:
sd tuh/s/oa/i/uewi uo oc urlclbnfs_at sd cmd05 /s/oa/i/uewi uo ho 75 urlclbnfs_at sd con00/s/oa/i/uewi uo hw : urlclbnfs_at

Now,let'seditthefilesowecanpasteourscriptintoit:
sd nn /s/oa/i/uewi uo ao urlclbnfs_at

Here'sthescript,pasteitintotheeditor:
#/i/ah !bnbs MTON=1 NPIT$ sit hf TMOT$ IEU=1 sit hf MTM=1 NCD$ sit hf $NCD"@ & /a/o/tsn.o MTM $" > vrlgnfmtlg MTM_EVL$ NCDRTA=? i [$NCDRTA -q0] te f MTM_EVL e ; hn utl[`si/on |/s/i/rp- "MTON" -e1]| [$IEU -q0] ni /bnmut urbnge c $NPIT` g | TMOT e d o sep1 le ltTMOTe IEUdn oe

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

2/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


f i [$IEU -q0]& RTA= | RTA=MTM_EVL TMOT e & EVL1 | EVL$NCDRTA ei $EVL xt RTA;

PressCTRL+X,sayYestosavethefile,andpressEntertoacceptthefilename. Next,we'lleditanotherfile.StillontheTerminal,type:
sd nn /ytmLbayFlssesnf-gf/ts3.tl uo ao Sse/irr/ieytm/ts3.snf-gui

We'reonnanoagain.Findthelinethatlookslikethis:
DFUTNF_ON_PIN=at_at" EAL_TSMUTOTOS"uoxtr

Addsomeoptionstotheendsoitlookslikethis:
DFUTNF_ON_PIN=at_at,otm,uocce EAL_TSMUTOTOS"uoxtrnaieat_ah"

Again,CTRL+X,sayYtosaveandpressEnter. That'sit.Reboot,andyoushouldnolongergettheerrordialogthenexttimeyoumountyour NTFS partition. If you have any problems, look into the file /var/log/ntfsmnt.log, it should containsomedescriptionofanyproblemsfoundduringmount,butIhadn'tanysofar.

Fuse4x+NTFS3GfromMacPorts
Fuse4xisaforkofMacFuseintendedtobringtheoldandabandonedMacFusecodebaseupto date, and also improve compatibility with the Fuse upstream project, while maintaining compatibilitywithexistingfilesystemsforMacFuse. Togetitworking,you'llneedtoinstallXcodeonyoursystemifyou'reonLion,Xcode'safree download from the App Store. Since MacPorts works by compiling every package you ask to install,there'snowaytoescapethat.YoumayuninstallXcodeafteryouinstallthepackagesyou need,butthenyou'lllosetheabilitytoeasilyupgradepackages(usingportupgrade)oncenew versionsarereleasedyou'llneedtoinstallXcodeagainforthat. OnceyougetXcodeinstalled,getMacPortsandinstallit. Done?Ok,afteryougetallthisinstalled,openaterminalwindowandtype:
jvc aa

ThatshouldpopupanAppleUpdatewindowaskingifyou'dliketoinstallaJavaupdateandsome such.Dothat.That'sreallyjustasmallprecautionifyoudon'tdothatnow,thatwindowwill popupduringthebuildprocessonMacPortsinmycase,sinceIwasn'tpreparedforit,theJava updatekeptdownloadingonthebackgroundwhileMacPortswasstillbuildingthedependencies forFuse4xandNTFS3G.Thebuildprocesscompletedsucessfullydespitethatthough,soJavais probablynotarequireddependency,butitdoesn'thurttobecareful,soIrecommendtogetthis missingJavadependencyinstalledfirstsoyourbuildprocessgowithoutsurprises. NowthatyouhavetheJavadependencyinstalled,wecangettotherealmeat.First,ifyouhaven't donethatyet,updateyourMacPortsrepository:


sd pr sludt uo ot efpae sd pr ugaeotae uo ot prd udtd

Install NTFS3G as NTFS3G now depends on Fuse4x by default (which wasn't the case back whenthisarticlewasfirstwritten),usingthecommandbelowshouldinstallFuse4xautomatically beforeinstallingNTFS3G:
sd pr isalnf-g uo ot ntl ts3

Ok, at this point you should have a functional fuse4x and ntfs3g install. Unfortunately, since mostMacPortspackagesarereallyjustthestraightsourcecodefortheirupstreamprojectwith onlyafewpatchestomakeitcompilableonOSX,thosepackagesmostoftendon'treallyintegrate wellwiththeworkflowofthesystem,speciallyUIwise(e.g.,therearenopreferencepanesfor Fuse4x or NTFS3G). Most importantly, that means that this ntfs3g install won't automount NTFSvolumesatbootorvolumeinsertion(forremovabledisks)thiswouldstillbedonebythe standard NTFS driver on OSX. Due to the nature of how most packages are ported over to MacPorts, you'd be expected to mount your NTFS volumes via NTFS3G manually, via the terminal,whichsucks.We'llhavetohackourwayaroundtogetthatworkingsomewhatbetter. TheideaistotrickOSXintoredirectingtheautomountprocedureforOSX'snativeNTFStouse NTFS3G instead. Still on the terminal, make a backup of the file mount_ntfs, which is responsibleformountingNTFSvolumeswiththenativedriver:
sd m /bnmutnf /bnmutnf.rg uo v si/on_ts si/on_tsoi

Again,createanemptyfile,setupthepermissions,andopenitinaneditor:

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

3/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


sd tuh/bnmutnf uo oc si/on_ts sd cmd05 /bnmutnf uo ho 75 si/on_ts sd con00/bnmutnf uo hw : si/on_ts sd nn /bnmutnf uo ao si/on_ts

Ok,we'realmostthere.Pastethisscriptintheeditor:
#/i/ah !bnbs VLM_AE"{:#" OUENM=$@$} VLM_AE$VLM_AE/oue/ OUENM={OUENM#Vlms} UE_D51 SRI=0 GOPI=0 RU_D2 TMOT2 IEU=0

i [`urbnsa - "u /e/osl`-q0] te f /s/i/tt f %" dvcnoe e ; hn UENM=/s/i/ealsra /irr/rfrne/o.pl.oiwno |/s/i SRAE`urbndfut ed lbaypeeecscmapelgnidw urbn i ["UENM"=" ] te f $SRAE " ; hn utl[`tt- "u /e/osl`-e0]| [$IEU -q0] d ni sa f %" dvcnoe n | TMOT e ; o sep1 le ltTMOTe IEUdn oe i [$IEU -e0] te f TMOT n ; hn UE_D`urbnsa - "u /e/osl` SRI=/s/i/tt f %" dvcnoe GOPI=/s/i/tt- "g /e/osl` RU_D`urbnsa f %" dvcnoe f i es le UE_D`urbni - $SRAE SRI=/s/i/d u UENM` GOPI=/s/i/d- $SRAE RU_D`urbni g UENM` f i es le UE_D`urbnsa - "u /e/osl` SRI=/s/i/tt f %" dvcnoe GOPI=/s/i/tt- "g /e/osl` RU_D`urbnsa f %" dvcnoe f i /p/oa/i/ts3 \ otlclbnnf-g - vlae"{OUENM} \ o onm=$VLM_AE" - lcl\ o oa - ngtv_nah \ o eaievcce - at_at \ o uoxtr - at_ah \ o uocce - naie\ o otm - wnosnms\ o idw_ae - ue_at \ o srxtr - ihrt\ o nei - ud$SRI \ o i=UE_D - gd$RU_D\ o i=GOPI - alwohr\ o lo_te "@ & /a/o/tsn.o $" > vrlgnfmtlg ei $; xt ?

PressCtrl+X,sayYtosave,pressEntertoacceptthefilename. Now,notetheoptionuidandgid.Itteelsntfs3gwhichOSXuserandgroupshouldownthefiles onthemountedvolume.Ifyoudon'tprovidetheseoptions,ntfs3gwilldefaulttotherootuser, whichwillallowyoutodomostwritingoperationsonthevolumeexceptwrite/modifytoexisting filestobeablemodifyfiles,youshouldthenspecifytheuidandgidfortheloginyouuseonyour system.InastandardOSXinstallation,theuid501andgid20shouldbethefirststandarduser youprovidedonOSXinstall,andthe"staff"group,respectively.Tomakesuretheseuidandgid pairmatchtheonesfortheuseryouuseonyoursystem,typeintheTerminal(makesureyou're notonaroot("#")prompt):


i - & i d u & d g

Thisshouldoutputtwolines,thefirstcontainingtheidforyouruser,andthesecondtheidofthe defaultgroupforyouruser.Iftheydon'tmatchtheonesonthescript,editthescriptagainand modifyitaccordingly.Update: This is needed only in a worst case scenario where you have autologin disabled and you don't login manually within 20 seconds (adjustable in the TIMEOUTvariable). Now,here'sthecaveatwiththewholeFuse4xmethod:sincewehadtoexplicitlyprovidetheuid andgidfortheuser/groupthat'llownthefilesonthevolumeinordertohavefullaccesstoit,this meansthatthismethodwillhaveproblemsinmultiuserMacstations. Forexample,ifyouhavetwouserssay,john,andmaryonyourMac,johnwillhaveauidof501 andmarywillhaveauidof502.Ifthemountscriptissetupasabove,johnwillhavefullaccessto thevolume,butmary,whilebeingabletomountNTFSvolumesjustfine,won'tbeabletomodify existing files on the volume, just like mentioned earlier when you don't provide the uid/gid parameter. There'snowayoutofthat,asfarasIknow.I'vetriedatonofargumentcombinationsforntfs3g whiletryingtoavoidtheuid/gidarguments,nothingworked.Iwelcomesuggestions.Butfornow, itworkswellenoughformeasitis,I'mtheonlyuseronmyMacanyway,andIsupposethat'sthe caseformostMacusers,soIdidn'tbothertosweataboutittoomuch.Ifthat'sreallyaproblem foryouthough,thenyoushouldbebetteroffwiththeMacFuse+TuxeraNTFS3Gsolution,that doesn'thavethisproblem.

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

4/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


Phew,thatwasalongone.Commentsarewelcome,ofcourse.Cheers!

Like

13

53responses Like Comment 8monthsagoMitchellresponded:

Thisisgreat.Workswell,andIdon'thavetopaytouseNTFS. 8monthsagomegastorus(Twitter)responded:

Thisisagreatarticle.Thanksalot. Isentalinktoyourblogposttofuse4xmaillist https://groups.google.com/forum/#!topic/fuse4x/mCgddOK3zHI 8monthsagoFernandoFigueiredoresponded:

@megastorus:Ohwow.TookmeawhiletofigureoutwhoyouareIguessit'sme whoowethanksfortheprestigiouslinking,andobviously,theawesomejob you'redoingwithFuse4x.It'sshapingupasnice,stable,andupstream compatiblereplacementtoMacFuse. So,thankYOUalot!:) 8monthsagoAkagiresponded:

Ialwaysgetapopupthatsaysthatthemediumcouldnotberead.Anditoffersto initializethemedium,ignoretheproblemortoejectthemedium. 8monthsagoFernandoFigueiredoresponded:

@Akagi:firstofall,isthataremovablevolume,orapartitiononyourdisk?Are youusingthesolutionbasedonMacFuseorFuse4x? Withthatsaid(orasked),itlookslikeyourvolumeiseithercorruptorformatted inanonstandardway.Intheformercase,however,ntfs3goughttobeableto recover/fixthemorecommonerrorsonthediskatmounttime,soeitheryour disk/partitionisinprettybadshape,oryourfuse/ntfs3ginstallismessedup somehow,inwhichcaseOSXmaybetryingtomountthevolumewiththenative driver,andifthentfsvolumehaveevenasmallconsistencyerror,thenative driverwillrefusetomountthediskandnoteventrytofixit(becausethereare nonativetoolsonOSXforthat),andthatsituationwouldprobablymakeOSX spitoutanerroralongthelinesofwhatyou'reseeing.Eitherway,ifthatvolume isapartitiononyourmainMacdisk,I'dtrybootingintoWindowsandscheduling adiskcheckinthere.Goodluck! 8monthsagoAkagiresponded:

Hi, thanksforyouranswer! IusetheFuse4xwithntfs3gviaMacPorts.TheoriginalNTFSdriverfrom Tuxera(thelastfreerelease)werecompletelydeinstalled. ThedeviceisafreshformattedUSBstick.IformatteditwithUbuntu(ina VirtualBoxinstallationonmyMacBookPro).Therethestickismounted correctly. IcanalsomountthestickonmyMacBookProviacommandline(e.g. mount_ntfs/dev/disk4s2/Volume/...). MaybeIdamagedsomethingwithinmyLioninstallation. Bestregards! 8monthsagoFernandoFigueiredoresponded:

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

5/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);

@Akagi:Haveyouactuallyreplacedthemount_ntfsbinaryasmentionedinthe post?Abettertestwouldbetryingtomountusingacommandlike"ntfs3g /dev/disk4s2/Volume/...",whichiswhatactuallydoesthejobofmountingand workingwiththevolume. Youmayalsotryrunning"ntfsfix/dev/disk4s2"ontheterminalandcheckingthe outputfromit. 8monthsagoMarcosresponded:

DearFernando, Firstofall,thankyouforyourexcellentarticle! IwouldliketoletyouknowI'vefoundasolutionforthemultiuserissue. Basicallywhatyouhavetodoisgetthecurrentactiveuserwiththefollowing command:lsl/dev/console|awk'{print$3}' Youmaytakealookatmyblogforfurtherdetails (http://blogdopersonaltec.wordpress.com).I'vegaveyouthepropercredits,of course...) Bestregards! 8monthsagoMarcosresponded:

OlFernando! Euquetenhoqueagradecerpeloseuartigoqueserviudeinspirao...:) Sobreasoluo,funcionousemproblemasaqui,masdeuumtrabalho encontraressaalternativa...rsrsTodasasoutrasquetenteiretornavamroot comousurio...AcheiatumprogramaemCquedesenvolveramparaessa finalidade,masnofinalopteipelasoluomaissimples(mtodo"KISS",rsrs). Abraos! Atmais! Marcos. 8monthsagoMarcosresponded:

Fernando, Dumalidanarespostaquepubliqueiparavocnomeublog.Aquestoque voclevantoutemsoluotambm...Snomencioneinoartigoparano complicardemaisavidadosleigos...rsrs Abraos! 8monthsagoAnilKuppa(Facebook)responded:

DearFernando, Icouldn'tinstallntfs3g.Itgivesmeerrorssaying "Thefollowingdiskimagescouldnotbeopened:" Thereasonis"notrecognized".IfollowedyourstepsIfirstinstalledMacfuse andtriedinstallingNtfs3g. Myntfs3gversionis"ntfs3g2010.10.2macosx.dmg"andMacfuseversion is"2.1.15" PleaseletmeknowwhereIwentwrong. I'mtryingsecondstep,butitwouldtakealotmoretime.I'vejustbegunthe downloadanditmight56hours. 8monthsagoFernandoFigueiredoresponded:

@AnilKuppa:Itlooksliketomeit'sjustthedmgfileforntfs3gyoudownloaded that'scorrupt.Deleteitandtrydownloadingitagain(emptyyourbrowser'scache first,toavoidgettingalocalcachedcopyofthecorruptfilefromthebrowser).I downloadedhere,fromthelinkonthepost,andtheinstallimageisopeningfine here. 7monthsagoAnilKuppa(Facebook)responded:

Ifollowedthesecondmethod,itworksperfectlyfine!!!!.Ijustcheckedyour comment,butnowIdon'twanttomakeanychanges. Duringthe2ndprocedure,therewere2placesofdifference: 1)WhenIenteredjavac,theterminalgavemedifferentoptionsishouldrun alongwithjavac

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

6/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


2)Icouldnotrunsudoportupgradeoutdated Error:Noportsmatchedthegivenexpression WhenIinstalledntfs3g,usingthecommandyougaveearlier,itautomatically fetchedandinstalledfuse4x. Thanksalotfortheblog:).IhadearlierreformattedmyexternalHDDto extFAT. ButextFATwashorriblyslow,soI'mnowhappilyusingNTFS. 7monthsagoFernandoFigueiredoresponded:

@AnilKuppa: >Duringthe2ndprocedure, >therewere2placesofdifference: >1)WhenIenteredjavac,theterminal >gavemedifferentoptionsishouldrun >alongwithjavac That'sfine,itonlymeansyoualreadyhadthejavacdependency,probablyyou've installeditbeforewhiledoingsomethingelse. >2)Icouldnotrun >sudoportupgradeoutdated >Error:Noportsmatchedthegivenexpression That'soktoo,it'snotreallyan"error",itjustmeanstherewasnothingto upgrade,whichisusuallythecaseinafreshMacPortsinstall. >WhenIinstalledntfs3g,using >thecommandyougaveearlier, >itautomaticallyfetchedand >installedfuse4x. Hm,soifIunderstoodcorrecly,youjustdid"portinstallntfs3g"directlyinstead ofinstallingfuse4xexplicitlyfirst.Well,aren'tyouastubbornguy?:)Butyeah, itlooksliketheMacPortsmaintainershavefinallydeprecatedMacFuseandsetup Fuse4xasthedefaultdependencyforNTFS3G,soyougotlucky:)Butthanks anyway,itwould'vetakenlongerformetonoticeifyouhadn'ttakenthatchance. I'llupdatetheposttoreflectthat. >Ihadearlierreformatted >myexternalHDDtoextFAT. >ButextFATwashorriblyslow, >soI'mnowhappilyusingNTFS. I'veneverbenchmarkedexFATonOSXmyselfsoIcan'tbesureaboutit,but eitherMacFuse+NTFS3G(Tuxera)orFuse4x+NTFS3G(OSS)isnotreally knowntobeahighperformancesolutiontheyareactuallyknowntobequite slow(onmyMBP,Igetabouta25MB/sreadperformance,whichisprettyslow comparedtothenativedriverorpaidsolutionshaven'ttriedwriting,butthe performanceusuallyisatleasthalfthereadnumbers).Buthey,it'sfree,itworks, andit'sstable.Andforthosethat,likeme,useWindowsontheirMacs,it'salsoa damnconvenientsolution,evenwiththeslowperformanceforexample,Iuse MozillaThunderbirdonmyMacwithmymailboxfilesstoredontheNTFS3G partition(soIcanusethesamemailboxonThunderbirdforWindows)andit worksfine,anditdoesn'tfeelslowatall. 7monthsagomegastorus(Twitter)responded:

>EitherMacFuse+NTFS3G(Tuxera)orFuse4x+NTFS3G(OSS)isnotreally knowntobeahighperformancesolutiontheyareactuallyknowntobequite slow. ItistrueforanyFusefilesystem.Everyfilesystemsyscallmakesoneadditional contextswitch(inpracticeitmakes2ormore).Thecontextswitchisreally expensiveoperationandthusanyFusefilesystemalwaysbeslowerthattheone implementedinkernel(asakernelextension). 7monthsagoFernandoFigueiredoresponded:

@megastorus:Hey,hiagain:) Yes,I'mawareofallthat.ThoughIrecallreadingsomewherethatTuxera's

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

7/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


commercialsolutiondoessomefunkycachingstufftoachievebetter performance(thoughIbelieveit'snotreallythatmuchbetterthantheOSS solution),butallthewhilecompletelybreakingcompatibilitywithFuse. NotthatIcare,ofcourseI'mperfectlyhappywiththeOSSsolutionasitis:)It's notworthittobreak(orworsen)Fuseupstreamcompatibility(andhence,its usefulness)forafewdozenMBmoreofperformance.Peoplethatneedabsolute performanceisbetteroffusinganativesystembackedFS,likeexFAT,for portabledata. 7monthsagoMichaelresponded:

Thisisawesome.OnlypageIcouldfindwithclearinstructions.Workedthefirst time.Lionhasbeenahugedisappointmentsofar.Thanksforyourhelp! 7monthsago__B__responded:

Mydriveismounted,butit'sfilesystemisreadas"Unknown(fuse4x)"whenIdo cmd+IonSnowLeopard.Doyouknowwhatitcanbe? 7monthsagoFernandoFigueiredoresponded:

It'snotaproblem.It'sjustthatFuse4x,sinceit'smuchclosertotheupstream Fuseproject,it'snotcurrentlytightlytieddowntoOSXUIAPIsandsuch,soit doesn'texposeadescriptivefilesystemnameforitself(orthepluggedin filesystem,NTFS3Ginthiscase)toOSX,soOSXnamesitas"Unkown".Thisis purelyacosmeticproblem,itdoesn'taffectthefilesystemfunctionalityatall. 7monthsagomegastorus(Twitter)responded:

AsFernandomentionedthisisreallyaminorcosmeticissueanddoesnotaffect thefunctionality. Thereasonwhyyoudon'tseetheFSNamehere(andwhyyouseeitwith MacFUSE)isthatMacFUSEhardcodedthefilesystemnamesinitssourcecode https://github.com/macfuse/macfuse/blob/master/core/10.5/fusefs/fusefs.fs/Con... TheNTFS3GpassesitsidandthenmacfusefetchestheFSName. Butitisnotscalable.IstronglybelievethatitisbadideatohardcodetheFSName onlyforafewfilesystems.Allmacfuse/fuse4xfilesystemswerebornequaland allfilesystemsshouldbeabletochangetheFSName,otherwisenoneofthem shouldbeallowedtodothis. I'lltakealookandtrytofindanyworkaroundsforit.OrprobablyIshouldseta humanreadableFSNameforallfilesystems(e.g."Genericfusefilesystem"). 6monthsagoNorbertresponded:

Thanksforthepost,veryuseful,butIhaveoneaddition:Iwouldnotusethe noappledoublemountoption,becauseitmakesthefinderbehavestranglyand createdthehorriblydreadedErrorcode:36here. Thanks Norbert 6monthsagoepresponded:

Greatpost!thanksforthescript.Onlynotelefthereforfuturereference:for homebrewusertheexecutableinthescriptneedbe /usr/bin/local/ntfs3g ratherthanthe/opt/localoneyouused. 5monthsagoYbalridresponded:

Thankyou,itworkswithfuse4x:) itwastheonlyproblemIhavewithOSXLion 5monthsagoFernandoFigueiredoresponded:

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

8/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


@Norbert:The"noappledouble"optionisn'tstrictlynecessary,it'ssafetoleave itoutifyouhaveproblems.Idohavesomestrangebehaviouroccasionallywith someapplications,likeMSOffice,thoughnotwiththeFinder. ThereasonthatIuseitisbecausewithoutitOSXlitterstheentireNTFSpartition with.DSStoreandotherfilescontainingOSXmetadata.That'sOSX'sstandard behaviourbtw,itdoesthattoowithwindowsnetworkshares,anditannoysmeto noendbecausethosefilesservenopurposeatallforotherOS'sapartfromOSX anditendspollutingmyfilelists.That'smenitpicking,Iknow,butI'dratherhave theoccasionalweirdnessonOSXbecauseofnoappledoublethanhavingmy partitionlitteredwithuselessfiles.:P 4monthsagoVitoresponded:

changewiththese USER_ID=$(idu)#501 GROUP_ID=$(idg)#20 allisworkinghere! V 4monthsagoFernandoFigueiredoresponded:

IhavetriedsomethinglikethiswhenIwashackingaroundthatscript,anditsorta works"sorta"becauseitworkswhenyoumountvolumeswhenyou'realready loggedin.Inmycase,myMacProharddiskhasaWindowspartitionthatIuse, andthatIwantmountedonboot.Theproblemisthatthemount_ntfs binary/scriptiscalledduringboot,itisdonebeforetheuserisloggedin,soitis calledasroot.Inshort,duringboot,theresultofyourexpressionwouldbe"0" fortheUIDandGID.That'swhydoesn'treallyworkthatwell.Itshouldworkwell ifyou'redealingwithanexternalNTFSvolumethatyoupluginonlyafterlogin, though. 3monthsagonikkitousenresponded:

WorkedlikeacharmwithLion64bits:)Thanks! 3monthsagoXiyueDengresponded:

Whenusingntfs3gonLinuxIusedtouse"oumask=0"switchforntfsdrives, whichresultsinallfilegets777permission,butworkswell.Haven'ttriedmyself asI'musingtheOSXFUSE+ntfs3g.2010.10.2on64bitSnowLeopard. Hopefullythesamecanbeappliedhereaswell. 2monthsagoTonyRegnauldresponded:

Thank'sMan. Work'sgreat. about1monthagokeesresponded:

hadLioninstalledandyes,NTFS3Gdidn'tworkanymore.Triedthefixfrom hereaboveandalldisksmountedagain.Greatandgoodjobyou'vedid! Thanksforthat. Kees about1monthagoEmilianoresponded:

IamusingOSXFUSE+ntfs3g.2010.10.2onLionandthetricksuggestedby Fernandotoavoidgettingthepopuperror,thatworksperfectlyusingMacFuse (Itriedthattooandcouldgetitworkingevenwiththe32bitmacFusebundled withthentfs3gdriver),doesn'tseemtofixtheproblem:thentfs3gdriver apparentlygetsdisabledasthedrivegetsmountedinreadonlymodeusing Lion'snativeNTFSdrivers... about1monthagoStefanresponded:

WorksfinewithLionandOSXFUSE&NTFS3G. Greatjob,thanksalot! about1monthagoFernandoFigueiredoresponded:

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

9/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);

@Emiliano:Well,Ican'tvouchforOSXFUSE,sinceIdon'tuseit,butIcansay this:OSXFUSE,whileit'smorecloselyrelatedtoMacFuseasfarasclient Filesystemcompatibilitygoes,seemstobeoperatedmore(i.e.installed/ configured)moreorlessinthesamewayasFuse4x.Ofcourse,Icouldjustbe wrong.Also,I'dsuggestyoulookintoinstallingamoreupdatedversionofNTFS 3G,theoneyou'reusingisfartoooutdated. about1monthagoEmilianoresponded:

@Fernando:Ifoundasolution/workaroundformyproblemhere: https://gist.github.com/1100318 ThereasonwhyI'musingsuchanoldversionofntfs3gisthat,asfarasIknow,is thelastversionofthefreedriverthatcanbefoundalready"packaged"for installation,andOSXFUSE,differentlyfromfuse4x,canalsobeinstalledfroma dmgimage,insteadofhavingtocompileit. Ifollowedyourguideandusedfuse4x+ntfs3gfromMacPortsfrommywork laptop,whereIhaveXCodeinstalledtodevelopforiOS/OSX,anditworks perfectly.Butonmygirlfriend'slaptopIwantedtokeeptheinstallationas simple/smallasitcanbe,soIchoseOSXFUSEandtheoldversionofntfs3g. I'mstillabeginnerintheMacworld,butIguessI'lleventuallyfigureouthowto compileaninstallerpackagefromsourcesonmyworkmachineandbringhome thecandyreadytobeeaten) about1monthagoFco.JavierPrezVelsquezresponded:

isthereawaynowtoformatapendriveinntfsusingdiskutility....orusingthe commandline? about1monthagoFernandoFigueiredoresponded:

@Fco.Javier: Yes,thereis,throughthecommandline.Youusethe"mkntfs"commandforthat, whichispartofthentfs3gdistributiononMacPorts(don'tknowifyoucangetit elsewhere).Type"mkntfshelp"forusageinstructions,butifyoudon'tcare aboutthedetails,youcanjustgo"mkntfs/dev/diskNsN",replacing"N"bythe diskandpartitionnumberwhereyouwishtocreatethentfsfilesystemwhich you'llhavetofigureoutyourselfbyclickingthe"Info"toolbarbuttononDisk Utility. about1monthagoFco.JavierPrezVelsquezresponded:

Allreadydiditusingalinuxdistro....Now,Ihavetosaythatwritingperformance isweak,veryweak. Thanksanywayforthetutorial.Everythingworkedwell. about1monthagoZakresponded:

@Fernando, YoustatedtoEmilianotheheshouldgetamoreuptodateversionofNTFS3G. Likehim,IamusingOSXFUSE+ntfs3g.2010.10.2.Thelinkyoupostedisfor version2010.10.2.Wheredoyouseeanewerversion? about1monthagoFernandoFigueiredoresponded:

@Zak:ThelinkIpostedisfortheNTFS3Gversionthat'scompatiblewiththe olderMacFuse.SinceOSXFuseissupposedtobesuccessortoMacFuse,thenyes, thatNTFS3GversionforMacFuseshouldworkonOSXFusealso,butthepointI wastryingtomakewithEmilianoisthatsincethisversioniswayoutdated,you're probablymissingoutonbugfixes,stabilityimprovementsandeffeciency(though notnecessarilyanybigperformanceimprovementyoushouldn'teverexpect thatfromanyfilesystemimplementedviaFuse). MacPortscurrentlypackagesamuchnewerversionofNTFS3GIbelievethe latestisfromjanuarybutit'scompiledagainstFuse4X,whichistheonlyFuse implementationprovidedonMacPorts(and,I'dargue,thebestandmore properlymaintainedanyway).Isupposeit'spossibletogetNTFS3Gsourcefrom MacPortsandtrytorewirethebuildconfigurationsoyoucancompileit

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

10/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


manuallyagainstOSXFuse,butIdon'texpectthattobeasimpletaskandhenceI havenomotivationtotryit(installing/usingFuse4x+NTFS3GviaMacPorts workswellenoughforme). Ofcourse,IunderstandusingMacPortsisnotaviablesolutionforeveryone.The easiestpathformewouldbetorecommendpeopletouseFuse4x,downloading theprebuiltbinaryimageavailableonFuse4x'ssite,butyou'dhavetohavea NTFS3Gbinaryimagetogoalongwithit,andIcouldn'tfindanythingnewer fromTuxera's2010build. SowhatI'mcurrentlyinvestigatingisbuildingthesebinaryimageswithMacPorts that'spossible,buthaveafewgotchasthatI'mstilllookinginto,andanyway,I needaMacwithoutMacPortsinstalledsoIcanhaveapropertestcasefor installingthesepackagesandseeiftheyworksoIdependonlendingother people'sMacstodoitIdohavesome,buttheydon'tcomebyeveryday,soit's kindofaslowprocess.ButifImanageit,I'llmakesuretopostanewarticlewith downloadlinks. about1monthagoAnatolPomozovresponded:

JusttoclarifythelatestversionofFuse4X(0.9.0)hasMacFusecompatibility layerandthusNTFS3GbinariescompiledagainstMacFuseshouldalsowork finewithFuse4X(butIdidnottestit). 28daysagodoalwa(Twitter)responded:

Thanksalotforthis,washavingalotofissueswithTuxera'sfreeNTFS3G implementation,yourguideworkedlikeacharm! I'mrunningOSX10.7.3andMacPorts2.0.4btw. 28daysagoFernandoFigueiredoresponded:

@Robson:Yes,performanceisslowyoushouldn'texpectabsoluteperformance outofanyfilesystemimplementedwithFuse.Withthatsaid,areyoucopying 50GbFROMtheNTFSdisk,orTOit? Ifyou'recopyingTOit,then18hourssoundsaboutright,andthere'snothingyou candobutwaitfornewerNTFS3GorFuse4xreleasesthatimprove performance,although,again,youshouldn'texpectdramaticimprovementseven then(i.e.,Ifinditunlikelythatanyimprovementwilltrimoffmorethanhalfof thattime). Ifyou'recopyingFROMitthough,then18hisabittoomuch.Ifyou'recopying fromanUSBdiskthough,thenUSBIOoverheadmaybeplayingaparthere. 20daysagoMrMikeresponded:

ItriedtheNtfs3gMacPortVersion,buttheautomountstillwon'twork. Itried"ntfs3g/dev/disk1s1/Volumes/..."butallIgetisthefollowingerror message: "UnprivilegedusercannotmountNTFSblockdevicesusingtheexternalFUSE library.Eithermountthevolumeasroot,orrebuildNTFS3Gwithintegrated FUSEsupportandmakeitsetuidroot.Pleaseseemoreinformationat http://tuxera.com/community/ntfs3gfaq/#unprivileged" Iknowithassomethingtodowiththeuseridorgroupid,butIdideverythingas describedinyourguideso...doyouhaveanyideawhatcouldhavegonewrong? 20daysagoFernandoFigueiredoresponded:

@MrMike:Justtoclearthingsup:You'reusingthesolutionwithFuse4X,not MacFuse,right?Imean,youeitherinstalledFuse4XandNTFS3Gfrom MacPorts,orinstalledFuse4Xfromthebinaryinstalleravailableon www.fuse4x.organdthebinaryinstallerforNTFS3GIprovide,correct? Ifso,you'renotsupposedtomountyourNTFSvolumesusingthentfs3g commanddirectlyyoushouldfirsteitherfollowthescriptreplacement procedure(mount_ntfs)detailedonthepost,orusethe"Switch"scriptavailable onmybinaryinstallerforNTFS3Gthatautomatesthis.Onceyoudothat,you canmountyourNTFSvolumewiththefollowingcommand: diskutilmount/dev/disk1s1 Ofcourse,sincethescriptreplacementtrickissupposedtomakemountingof ntfsvolumesviantfs3gtransparenttoOSX,yourvolumeshouldalsobe

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

11/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


mountedautomaticallyuponbootorconnection(incaseofanexternaldrive). Letmeknowifyoustillgetanyproblems,andgivemoredetailsofhowyou've installedFuse4X/NTFS3G,whichsystemyou'rerunningon,etc. 19daysagoMrMikeresponded:

I'musingthesolutionwithFuse4XandNTF3GviaMacPort. Ialsodidthescriptreplacment(mount_ntfs)asdescribed,butthentfsdisks won'tmountautomatically.Sameproblemwiththeonesconnectedafterstartup. Ionlyusedthentfs3gcommandtoseewheretheproblemcouldcomefrom. I'mrunningMacOSXLion10.7.3(11D50b),onaMacBookPro8thGeneration. fuse4x0.9.0_1andntfs3g2012.1.15_2bothinstalledwith"sudoport <program>" Iupdatedjustacoupleofdaysago,butitalsodidn'tworkbefore. 19daysagoFernandoFigueiredoresponded:

@MrMike:Ok,pleasecheckifyouhavethefile/var/log/ntfsmnt.loginyour system,andpasteithereifyoudo.Itmightgiveaclueastowhat'sgoingon. 18daysagoMrMikeresponded:

thefileexists,butit'sempty.:/ 18daysagoFernandoFigueiredoresponded:

@MrMike:Ok,revertingtothemethodyouwereusinginitiallythen:)Haveyou triedyourmethodloggedasroot?Somethinglikethisonterminal: $sudoi [typeinyourpassword] #mkdir/tmp/mnttest #ntfs3g/dev/disk1s1/tmp/mnttest Andseewhat'stheresult.Sinceyoudidn'tgetyourvolumetomountthroughthe normalmethodssofar,Ithinkit'sunlikelythatit'llmountnow,butatleastthere shouldbeanerrormessageorsomeothercluetowhat'stheproblem. 18daysagoMrMikeresponded:

Itriedasannormaluser,whichreturnedtheerrormessageIalreadyposted. WhenItryitasroot,everythingworksfine,butthemounteddiskisnotshownin thefinder(butitcanbeaccessedviatheterminal).Inbothcasesnothinggets loggedintothentfsmntlogfile. 12daysagoFernandoFigueiredoresponded:

@MrMike:Well,sortofaccessingyourmachinedirectly,I'malloutofguesses here...You'rethefirstandonlytoreportsuchaproblemanyway,soit'sprobably safetoassumetheproblemissomethingspecificinyoursystem/OSinstall that'scausingtheproblem. TheonlysuggestionI'dhavebeforeresortingtoreinstallingOSXistouninstall allports(startingbyntfs3gandfuse4x)andremovemacportscompletely,and thenlookaroundin/usr,/usr/localandalso/Libraryand/System/Libraryfor kernelextensionstomakesurethatthereisn'tanyleftoverlibrary/binary/kernel extensionfromfuse4xorntfs3gfromolderinstallsthatmaybeinterferingwith thenewerinstall. 5daysagoErikresponded:

Hello:) Iusedthesecondsolution(Fuse4x+NTFS3GfromMacPorts),aditworkedOK forsometime.ButthenIstartedgettinganerror(TheFindercantcompletethe operationbecausesomedataincantbereadorwritten.(Errorcode36)) whentryingtocopysomefilestoantfsformattedexternalHDDconnectedover USB.Curiously,thisonlyhappenswhenItrytocopylargefiles(suchasmovies), andnotwhenItrytocopyfolderscontainingsmallfiles(suchasafolder continingseveralmp3files).AnothercuriousthingisthatthebigfilescopyOKif ItrytocopythemfromTerminal,usingthecpcommand.Doesanyonehaveany ideawhatthef***isgoingon?

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

12/13

17/04/12

NTFS write support on OSX Lion with NTFS3G im.getting(this);


5daysagoFernandoFigueiredoresponded:

@Erik:Thissortofoccasionalcrypticerrorstendtohappenwhenusingthe "noappledouble"mountoption,asalsonoticedbyNorbertinthecomments above.Youmaytryremovingthelinecontainingthatoptiononthe /sbin/mount_ntfsscriptandseeifithelps,butthenyou'llgetyourNTFSfilled evenmorewithalotofthosehiddenfoldersandfilesthatOSXcreatestostore itsmetadata.Youcanmitigatethisproblemalittleusing"asepsis"asexplained onmyblogpostrightafterthisone. I'lleditthisblogpostremovingthe"onoappledouble"linefromthescriptI addedthisinitiallybecauseIhavethispetpeevewithOSXpollutingnonHFS volumeswithuselessfiles,butonsecondthoughtIsupposeit'sbetterforthe generalusertohaveafullyfunctionalvolumeonOSXthanhavinganicelooking one:P 4daysagoErikresponded:

@Fernando:Thatdidthetrick,thanks!:)

Leave a Comment
Name: blanktocomment. Homepage: Leavethisfield Email:

Want to skip this stuff?


Loginwithanyofthefollowing: RegisterorlogintoPosterous Comment:

Post this Comment

Archive
2012(4) 2011(5)

Get Updates
Followbyemail Getthelatestupdatesinyouremail boxautomatically. SubscribeviaRSS

Search

fernandoff.posterous.com/ntfswritesupportonosxlionwithntfs3gf

13/13

Potrebbero piacerti anche