Choosing a Filesystem for Shared Data

Support for most filesystems varies substantially between OSs. As such, a good shared filesystem for one pair of OSs may not be as good for another pair. Some possible filesystems for use in data exchange include:

FAT This filesystem originated with DOS and was intended for use on floppy disks. In the years since, it has developed in two ways. First, FAT comes with different pointer sizes—12-bit, 16-bit, and 32-bit. These define the maximum partition sizes, and they sometimes appear after the FAT name, as in FAT-32, to indicate the pointer size. Second, the original FAT supports only short filenames of eight characters with a three-character extension (the so-called 8.3 filename limit). An extension known as VFATsupports long filenames, though. Most OSs, including Linux, include excellent support for all of these FAT variants, although some OSs, such as DOS, don't support VFAT or FAT-32. Such OSs can read VFAT partitions, but they ignore the long filenames. If an OS lacks FAT-32 support, it won't read the partition at all. FAT lacks support for Linux ownership and permissions, although a special Linux-only variant known as UMSDOS adds these features. On the whole, FAT makes the best data-exchange filesystem because of its wide support, but you may want to use something else in some situations.

NTFS Microsoft created NTFS for Windows NT. NTFS is highly proprietary; only Windows NT and its descendents include good NTFS support. Linux includes an NTFS driver, but it's reliable only for read access; the read/write support often corrupts data. Thus, you might use this driver to read data from a Windows partition, but you should not use it for writing unless and until the driver's reliability improves. Some distributions, including Red Hat, don't include even the read-only NTFS driver in their standard kernels, so you must add this driver from a third-party package or recompile your kernel to get NTFS support.

HPFS Microsoft created HPFS for OS/2 when Microsoft and IBM were still partners. Today, HPFS is used natively only by OS/2, although Windows NT 3.1 through 3.51 included HPFS support. Linux's HPFS drivers are fairly reliable, and they even support Linux ownership and permissions, although OS/2 ignores this information. HPFS makes a good data exchange filesystem in a system with Linux and OS/2—better than FAT, in fact, because OS/2's native FAT support doesn't handle FAT-32 or VFAT, although both are available as third-party modules. HPFS isn't a good choice for data exchange with any other OS, except possibly Windows NT 3.1 through 3.51.

Ext2fs Because the ext2fs code is freely available, implementations abound for other OSs, as described in more detail in the upcoming section, "Reading Linux Filesystems in Other OSs." Unfortunately, most of these implementations are limited in one way or another—they may not handle recent variants of ext2fs, they may be read-only, they may occasionally cause filesystem corruption, and so on. For this reason, ext2fs isn't a good choice for a data exchange partition, although you might want to read native Linux filesystems from other OSs if you find you need to read a file without rebooting. You might also set aside an ext2fs partition for data exchange with another Unix-like OS if you want to preserve ownership and permission information.

UFS and FFS The Unix File System (UFS) was the original native Unix filesystem. More recently, a similar filesystem, the Fast File System (FFS) has emerged for FreeBSD, NetBSD, OpenBSD, and Mac OS X. Both FFS and UFS are handled by Linux's ufs driver, which includes an option (ufstype) to set the variant, as in ufstype=44bsd for a BSD system's FFS. Unfortunately, these filesystems aren't well supported outside of the Unix world. Indeed, even Linux's UFS/FFS driver is not completely reliable. Therefore, like ext2fs, it's useful mainly for exchanging data between Unix-like OSs when you need to preserve ownership and permission information. In that situation, you should create a separate data-transfer partition and not access other operating systems' main partitions from Linux.

HFS Apple's Hierarchical File System (HFS) has long been the standard filesystem in the Macintosh world, although Mac OS X also supports FFS. Therefore, a multiboot Macintosh may use HFS as a data-exchange filesystem. Unfortunately, Linux's HFS support isn't as good as its FAT support, so you should be very careful to create a separate data-transfer partition and not write to a Macintosh's boot and data partitions from Linux.

Overall, the best choice for data exchange is FAT, because of its excellent support in most OSs. FAT can even be a good choice for data exchange between OSs for which FAT isn't native, such as Linux and FreeBSD. Other potential choices for such combinations, such as ext2fs and FFS, are weak choices because neither OS's support for the other's native format is particularly reliable. Other filesystems that deserve attention are HPFS (only for Linux-OS/2 transfers) and HFS (on Macintosh systems).

Linux native filesystems beyond ext2fs are poor choices for data transfer because these filesystems are supported by few other OSs. Ext3fs is a partial exception because ext2fs drivers and utilities can sometimes handle ext3fs, although they ignore the ext3fs journaling features and may only provide read-only access. Another partial exception is the Journaled File System (JFS). IBM donated the OS/2 JFS code to Linux. JFS is also available on IBM's AIX OS. Silicon Graphics (SGI) donated XFS, but only SGI's IRIX supports XFS, although work is underway to port it to FreeBSD.

0 0

Post a comment