Konubinix' opinionated web of thoughts

UDF: A Multi Platform Filesystem


1 How to have a file system in an external drive accessible from windows/mac/linux ? :

1.1 FAT32 :

Accessible everywhere, but is limited to 4Go…

1.2 NTFS :

Good drivers on linux (NTFS-3G), but philosophically bad.
The specification has become open ?

1.3 UDF :

Should be the best option.

1.4 Comparison of udf, ntfs, ext :


1.4.1 Size limits :

File system Maximum filename length Allowable characters in directory entries Maximum pathname length Maximum file size Maximum volume size
ext4 255 bytes Any byte except NUL and / No limit defined 16 TB 1 EB
NTFS 255 characters Depends on namespace used 32,767 UCS with each path component (directory or filename) up to 255 characters long 16 EB 16 EB
UDF 255 bytes Any Unicode except NUL 1,023 bytes 16 EB 2 TB (hard disk), 8 TB (optical disc)

1.4.2 Metadata :

File system Stores file owner POSIX file permissions Creation timestamps Last access/ read timestamps Last content modification timestamps Disk copy created Last metadata change timestamps Last archive timestamps Access control lists Security/ MAC labels Extended attributes/ Alternate data streams/ forks Checksum/ ECC Max Timestamp Granularity
ext4 Yes Yes Yes Yes Yes Unknown Yes No Yes Yes Yes Yes 1 nanosecond
NTFS Yes Yes Yes Yes Yes No Yes No Yes Yes Yes No 100 nanoseconds
UDF Yes Yes Yes Yes Unknown Unknown Yes Yes Yes No Yes No Unknown

1.4.3 Features :

File system Hard links Symbolic links Block journaling Metadata-only journaling Case-sensitive Case-preserving File Change Log Snapshot XIP Encryption COW integrated LVM Data deduplication Volumes are resizeable
ext4 Yes Yes Yes Yes Yes Yes No No Yes Yes No No No Online
NTFS Yes Yes No Yes Yes Yes Yes Partial Yes Yes Partial Unknown No Online
UDF Yes Yes Yes Yes Yes Yes No No Yes No No No No Unknown

1.4.4 Allocation and layout policies :

File system Block suballocation Variable file block size Extents Allocate-on-flush Sparse files Transparent compression
ext4 No No Yes Yes Yes No
NTFS Partial No Yes No Yes Partial
UDF No No Yes Depends No No

1.4.5 Supporting operating systems :

File system DOS Windows 9x Windows NT Linux Mac OS Mac OS X FreeBSD BeOS Solaris AIX z/OS OS/2 Windows CE Windows Mobile VxWorks HP-UX
ext4 No No with Ext2Fsd (partial, extents limited) or Ext2Read (read-only, also on LVM2) Yes since kernel 2.6.28 No with fuse-ext2 (partial) and ExtFS (full read/write) No Unknown Unknown Unknown Unknown Unknown No Unknown Unknown Unknown
NTFS with third-party driver with third-party driver Yes Yes Kernel 2.2 or newer, or with NTFS-3G or ntfsprogs No with NTFS-3G with NTFS-3G with NTFS-3G with NTFS-3G on Opensolaris Unknown Unknown Partial read-only third-party driver with 3rd-party driver No Unknown Unknown
UDF Unknown Partial read-only support of UDF 1.02 since Win98 and WinME Yes Yes Yes since Mac OS 9 Yes Yes Unknown Yes Unknown Unknown Unknown Yes Unknown Unknown Unknown

1.5 Conclusion :

UDF is THE true universal file system. The drawback on using UDF is that is possesses less features that others. But the essentials are there. It also suffers from bad OS implementations that will consider a UDF filesystem as being a read only CD-Rom.

1.6 Test mkudffs for real


Zeroing the disk to avoid any confusion later.

dd if=/dev/zero of=/dev/sdx bs=512

Creating the new filesytem.

mkudffs --media-type=hd --blocksize=512 /dev/sdx

It worked perfectly on a 1Go micro sd card.