Playing Nice with Filesystems

If you have played around with any 2 of the 3 major operating systems (Windows, OS X and Linux) and start transferring files to and from external hard disk you will probably run into an issue with the type of filesystem you choose for your hard disk. Windows likes NTFS, OS X likes HFS and Linux likes ext. As you can see none of them are the same. Being different is not so much an issue, but being compatible and accessible to all is.

Based on default system settings:

  • NTFS is readable on all operating systems, but not writable on OS X. Most modern Linux distributions can write to NTFS drives
  • HFS is readable on OS X and modern Linux distributions, and not writable on Windows or Linux
  • ext is only readable on Linux and not writable on Windows or OS X.

or to put it based on operating system

  • Windows can only read and write to NTFS, nothing else
  • OS X can read and write to HFS and read NTFS
  • Linux can read and write to ext and NTFS and read HFS

Take note that there is also the older FAT32 filesystem that is fully supported for reading and writing by all operating systems but due to limitations of FAT32, I rather not consider this. Basically the main issues with FAT32 is that the maximum file size is 4GB and the maximum partition size is 32GB (actually Windows can’t format a FAT32 partition greater than 32GB but can read FAT32 partitions of more than 32GB. Use GParted or just filter this Google search to be able to create and format a partition of 32GB). If these are limitations you can deal with, for the sake for interoperability stick with FAT32.

Now to solve the problem of support for each filesystem in each operating system:

NTFS:

  • OS X: NTFS-3G + MacFUSE
  • Linux: NTFS-3G
  • I’ve been using NTFS-3G in Linux for many years and haven’t had any problems with it and so far it’s working well with OS X too
  • On another note if the NTFS drive is not unmounted properly or there are some issues with the file system integrity, it is necessary to use Windows scan disk to rectify the problem. Thus this requires a copy of Windows to fix the filesystem.

ext:

  • Windows: Ext2 Installable File System for Windows
  • OS X: Mac OS X Ext2 filesystem
  • I’ve had issues of only being able to mount an ext2 partition in Linux and it gave a mount error in Windows and OS X and was due to an inode issue as new Linux distributions create the file system with inodes of 256 bytes but Ext2 fs only supports the older version with 128 bytes. And the only solution is to back up the files, and reformat partition with inodes of 128 bytes (-I 128) and restore the files.
  • Filesystem integrity issues should be able to be fixed with “fsck” from a Linux distribution / live CD. The great thing about this is that you can get a Linux distribution for free and this recovery can be done with out any strings attached.

HFS:

  • Windows: MacDrive (US$50, read and write), Paragon HFS for Windows (read only)
  • Linux: Enabling HFS writing in Ubuntu
  • Note: I have not personally tested these so I cannot give first hand experience of how well it works or what issues can be had with this.
  • I believe that HFS+ journal
  • I would believe any filesystem repairs would have to be done in OS X (similar to NTFS and Windows) and if so this enforces that you have OS X at hand, and in order to have OS X you must have Apple hardware or a Hackintosh either way this is very restrictive.

So it is pretty easy to get full read and write support of all 3 default file systems on the 3 major OS’s but there are issues. So far I’m inclined to stick with ext2/ext3 just due to the fact that it has no restrictions in terms of filesystem repair. I’ve had many NTFS issues related to damaged filesystems that required Windows and the inconvenience of taking the drive out of my box to find a Windows box was too much.

Advertisements

5 thoughts on “Playing Nice with Filesystems”

  1. I assume you mean directly connecting a hard disk to a computer both with differing file systems (e.g. hooking up an NTFS hard disk to Linux).

    I remember when I was file sharing between my Windows and OS X Samba did a pretty good job on OS X’s side. The only trouble is that copying files from OS X to Windows would sometimes mess up the User permissions on Windows’ side, particularly the owner. My automated backup procedure would often have problems with these files because their owner was different from the User Account under which it was running as at the time.

    Just FYI.

  2. Yes I’m talking about external hard drives. So far I haven’t had any real issues so far like your Samba issues. For Samba servers you can configure the owner and group file attributes (at least in Linux) and the files being transferred over, not sure how it is on a Mac though. Surprised Windows didn’t handle that properly though

  3. “Basically the main issues with FAT32 is that the maximum file size is 4GB and the maximum partition size is 32GB.”

    Re: partitions, I have a 75 GB FAT32 partition on a USB HDD. I made it with the GParted live CD. I have accessed it from Debian Etch, Windows XP and OSX Leopard. Also I recall someone making a whole-disk 160 GB FAT32 partition in OSX Leopard.

    From http://support.microsoft.com/kb/314463:
    “You cannot format a volume larger than 32 gigabytes (GB) in size using the FAT32 file system during the Windows XP installation process. Windows XP can mount and support FAT32 volumes larger than 32 GB (subject to the other limits), but you cannot create a FAT32 volume larger than 32 GB by using the Format tool during Setup.”

  4. Thanks Sven for the information. I stand corrected and I guess I should have read the page fully =) But it seems that formatting a larger partition size is more of a ‘hack’ of sorts and you can’t normally do it in Windows without 3rd party applications. I did have a friend who couldn’t format a FAT32 drive partition larger than a 16GB (if I remember correctly). Not too sure on why that was though

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s