Posted: Sun Apr 25, 2010 6:07 Post subject: Some Notes on HFS+ File System Support
Over the past couple of days I've run some experiments using USB disks formatted with the default apple file-system HFS+. The system I used was an ASUS WL520GU loaded with build 13525. My eventual goal was to set up a system where Apple's Time Machine application could use the router to backup over the network via Samba.
Here are a couple of notes for those who might be interested in attempting similar endeavours.
1) Modern apple computers (including their mobile siblings –i.e. iPods, iPhones) use a file-system called hfs+ by default. This file-system comes in several variants:
- journaled
- non-journaled
- case-sensitive
Journaled is the default and will be that used by all apple disks not explicitly formatted otherwise.
2) A kernel driver exists for Linux to read hfs+ file-systems. However, the Linux driver will only mount non-journaled variants of the file-system in full read/write mode. Journaled variants can only be mounted in read-only mode. (Although I believe these can be forced into read/write mode –with some risk - for a limited period of time by ignoring the journaling). On top of that, only kernel versions >= 2.6 can handle case-sensitive variants of the file-system. (My experience with using the ‘mount’ command on dd-wrt firmware specifically was that the journaled file-system wasn’t even mounted at all – not even read-only as they should have been).
3) This then implies that any work with Linux involving apple file systems requires the non-journaled variant. This easy enough to do when formatting a disk on an apple machine (it’s a format option), but it is also possible with a quick google to find the simples steps needed to convert an existing journaled file-system to a non-journaled one. Unfortunately with journaling gone, so too does a lot of the benefits of that file-system – especially in the area of file-system recovery should it be needed.
4) The second big surprise that hit me here was that OSX machines DO NOT SUPPORT ext2 or ext3 file systems. I found this quite amazing considering that they are basically proprietary Linux machines. Out of the box, they cannot read nor format ‘ext’ file-systems. Some (but little) support doesn’t exist in the way of third party applications. Unfortunately using a non-apple supported file system to store system backups on is problematic. For example, Time Machine (without modification) requires an HFS+ file-system connected locally to the machine. Modification can allow for backups to be made to both networked disks and to different file-systems, but when it comes to doing a full restore, there is only one way to go about that and that is an HFS+ file-system connected locally. If you cannot just plug in a backup and use it at a time of need, then it is mostly useless.
5) Support for hfs+ is not included in any of the standard dd-wrt packages, but the kernel driver can be found and added using the ipkg command. 'kmod-hfsplus' is the package name. The single file inside it 'hfsplus.o' can be loaded with the insmod command. As with most uses of the ipkg command, this implies that jffs file support must first be set up on the router. (The hfs+ driver is only about 56k or so). Installing samba proved no problem (I used SlimSamba) as long as the driver was loaded first.
6) The real stopping point for me proved to be the interesting situation with Linux support of HFS+ filesystems that when the usb disk wasn’t cleanly unmounted, it will mark the disk as being badly dismounted. (for example from unplugging a live disk or a router power cycle). The effect of this is that when the disk is remounted, it will only mount in READ-ONLY mode from then on. Nothing I could do (on the router) would allow the device to be remounted in read/write mode. Googling this eventually turned up that running the ‘ fsck.hfsplus –v’ program will fix this. However this program – part of the ‘hfsprogs’ package - is not yet available on the ipkg package system. And I’ve been unsuccessful with getting this program to work from other sources. Of course, you can always plug the usb disk back into the mac and get the OSX to fix it – but to me that kind of defeats the point.
Joined: 09 Feb 2008 Posts: 176 Location: Earth, but trying to leave
Posted: Fri Jun 04, 2010 19:00 Post subject:
Thank you for all the info. I'm just starting to look at this (HFS+ via dd-wrt), please do update this thread if you make more progress or even if you don't... I'm hoping for the former though.
Posted: Thu Mar 17, 2022 22:03 Post subject: Re: Some Notes on HFS+ File System Support
SouthernLlama wrote:
5) Support for hfs+ is not included in any of the standard dd-wrt packages, but the kernel driver can be found and added using the ipkg command. 'kmod-hfsplus' is the package name. The single file inside it 'hfsplus.o' can be loaded with the insmod command. As with most uses of the ipkg command, this implies that jffs file support must first be set up on the router. (The hfs+ driver is only about 56k or so). Installing samba proved no problem (I used SlimSamba) as long as the driver was loaded first.
Can this be used with the default Samba server provided by dd-wrt? _________________ Google is Spyware