Universal Disk Format

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 62.77.181.1 (talk) at 18:38, 19 January 2007 (→‎Native OS Support: can't say its highly reliable but it does read all versions, driver claims it writes but I've never tried it...). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Jump to navigation Jump to search

The Universal Disk Format (UDF) is a format specification of a file system for storing files on optical media. It is an implementation of the ISO/IEC 13346 standard (also known as ECMA-167). It is considered to be a replacement of ISO 9660, and today is widely used for (re)writable optical media. UDF is developed and maintained by the Optical Storage Technology Association (OSTA).

History

Initially, UDF was primarily intended for use with ROM media and media with limited rewriting conditions such as:

Later, it became popular with large and fully rewritable cross-platform media such as:

UDF has increased in popularity since the late 1990s, when both CD-RW media and hardware for CD writing reached price levels making them interesting for the mass market.

UDF is practically the successor of ISO 9660, supporting larger files, larger disk and more information about individual files and folders. It includes support for special file properties, such as Apple's File Types, resource forks, and other OS-specific data.

Where the UDF format is used

DVD-Video media use UDF version 1.02. These discs contain a so-called UDF Bridge format, where both an ISO 9660 as well as a UDF 1.02 filesystem are present on the same disc, describing the same filesystem.

All standard formats for video recording on DVD-style media use some version of the UDF filesystem.

When combined with packet writing technology, UDF has the advantage of allowing files to be added to and removed from a disc through the normal filesystem mechanisms. That is, the contents of a disc can be manipulated in the same way a hard disk, floppy disk, or USB flash drive might be. This even works for sequentially written media such as CD-R, although files that are deleted remain on the disc occupying space. In Windows the disc appears as a drive letter, while in Unix/Linux or Mac OS X it is mounted to a directory.

Typically for writing UDF in Windows, third-party burner software such as DirectCD, DLA, InCD, Toast, and WriteUDF is required. As shipped by Microsoft, Windows (before Windows Vista) can only read UDF discs, while current (2006) releases of Mac OS X, Linux, and several other Unixes include UDF writing capability with no additional software required. Older versions of these operating systems may have limited reading capabilities, and may not support more recent versions of UDF. See the table below for more detailed information.

Revisions of the UDF format

UDF has been released in multiple revisions:

  • Revision 1.02 (August 30, 1996). This format is used by DVD-Video discs.
  • Revision 1.50 (February 4, 1997). Added support for (virtual) rewritability on CD-R/DVD-R media by introducing the VAT structure. Added sparing tables for defect management on rewritable media such as CD-RW, and DVD-RW and DVD+RW.
  • Revision 2.00 (April 3rd, 1998). Added support for Stream Files and real-time files (for DVD recording) and simplified directory management. VAT support was extended.
  • Revision 2.01 (March 15, 2000) is mainly a bugfix release to UDF 2.00. Many of the UDF standard's ambiguities were resolved in version 2.01.
  • Revision 2.50 (April 30, 2003). Added the Metadata Partition facilitating metadata clustering and optional duplication of file system information.
  • Revision 2.60 (March 1, 2005). Added Pseudo OverWrite method for drives supporting pseudo overwrite capability on sequentially recordable media.

For next releases of UDF, changes are discussed in relation to using UDF on very large hard disk media, and using UDF on holographic storage media.

Flavors of UDF

While the UDF specification has never been explicit about it, all UDF revisions since 1.5 actually describe three different variations of the format. For lack of an official name from OSTA they are called flavors here.

These flavors are:

  • Plain (Random Read/Write Access). This is the original format supported in all UDF revisions
  • VAT (Incremental Writing). Used specifically for writing to CD-R and DVD-R (write-once) media
  • Spared (Limited Random Write Access). Used specifically for writing to CD-RW and DVD-RW (rewritable) media

Plain (original) flavor

This format can be used on any type of disk that allows random read/write access, such as hard disks and DVD-RAM media. Similar to other common file system formats, such as FAT, directory entries point directly to the block numbers of their file contents. When writing to such a disk in this format, any physical block on the disk may be chosen for allocation of new or updated files.

Since this is the basic format, practically any OS or File System Driver claiming support for UDF should be able to read this format.

VAT flavor

DVD-R and CD-R media has some limitations when being written to: Every physical block can only be written to once, and writing must happen incrementally.

This means that the plain UDF flavor can only be written to CD-Rs by pre-mastering the data and then writing all data in one piece to the media, similar to the way ISO 9660 gets written to CD media.

To allow CD-R to be used virtually like hard disks, meaning that you could add and modify files on a CD-R at will (so-called drive letter access on Windows), OSTA added the VAT flavor to the UDF standard.

The VAT is an additional structure on the disk that helps remapping physical blocks when files or other data on the disc gets modified. The nature of the write-once media leads to the effect that when a file gets first added and later deleted on the disk, the file's data remains still on the disk. While it does not appear in the directory any more, special tools may be used to access the previous state of the disc before the delete occurred, making recovery possible. Additionally, incremental writing also means that eventually the disk will be full and free space cannot be recovered by deleting files. This behavior can be used to an advantage for archiving data, though.

Understanding this VAT structure's contents is necessary to be able to read such written discs as well, but not all UDF file systems support this flavor. See also chapter "Why your computer might not read a particular UDF disk" below.

Spared (RW) flavor

DVD-RW and CD-RW media have fewer limitations than DVD-R and CD-R media: While sectors can be rewritten at random, these sectors may "wear out" after a while, meaning that their data becomes unreliable after having been rewritten too often (typically after a few hundred rewrites with CD-RW).

RW media can be erased entirely at any time, making it blank again, ready for writing a new UDF or other file system (e.g. ISO 9660 or CD Audio) to it. The wear-out effect is not an issue here unless the disk gets erased more than a few hundred times or the Spared flavor was used.

RW disks may be formatted in the plain UDF flavor, in the VAT flavor and in the Spared flavor.

The consequences of using these flavors are as follows:

  • When using the plain flavor, in theory a disc driver may allow to rewrite any disc sector at random, meaning the RW is truly rewritable in the fashion of hard disks. However, because of the wear-out effect, this would soon lead to loss of data. For that reason, if a plain UDF file system is written to RW media, the file system should lock (write protect) the UDF volume to prevent accidental modification by a computer, or better, disc drivers should never even attempt to provide random-write access to RW media unless they can assure that no data loss due to wear-out can happen.
  • When using the VAT flavor, RW media effectively appears as CD/-R or DVD-R media to the computer. However, the media may be erased again at any time.
  • Finally, the Spared flavor works basically like the plain flavor, but uses an extra Sparing Table to remap worn-out sectors. This allows to reclaim most of the disk's space back when deleting a file.

Understanding this Sparing Table is necessary to be able to read discs written in this flavor. The problem is that some existing versions of UDF File System software ignore this extra information and treat such UDF discs as if they had the plain flavor. As long as the media has no worn-out sectors, this does not matter - the files can be read properly. But once sectors are remapped, a File System not paying attention to the Sparing Table will read outdated sectors, leading to retrieval of the wrong data.

Why a computer might not read a particular UDF disk

Even if a computer claims to be able to read UDF 1.50, it still may only support the plain flavor but not the VAT or Spared flavors.

An example is Mac OS X (10.4.5), which claims to support UDF 1.50 (see man mount_udf), yet it can only mount disks of the plain flavor properly (it cannot mount UDF disks with a VAT at all, see Sony Mavica problem, and while it appears to be able to mount CD-RWs written with a Sparing Table, it does not read its files correctly in the case that files are actually remapped).

Standalone DVD Player Compatibility

Some users have reported that video DVDs burned on their computers in UDF version 1.5 are not compatible with their set-top video DVD players. These players seem to be only compatible with UDF version 1.02. As some popular DVD burning programs such as Roxio' Easy CD & DVD Creator default to UDF version 1.5 when burning video DVDs, users have found it necessary to avoid using the software wizard and instead manually configure the burn to version 1.02.

References

  • ISO/IEC 13346 standard, also known as ECMA-167.

Native OS Support

Note: Unless otherwise noted, read and write support means that only the plain UDF flavor is supported, but not the VAT and spared flavors.

  • AIX 5.1, 5.2, 5.3 (Read+write)
  • eComStation [all] (Read+write) 2.0x
  • FreeBSD 5.X (Read) 1.02, 1.50, 2.0x
  • FreeBSD 6.X (Read) 1.02, 1.50, 2.0x, 2.50
  • FreeBSD 7.X (Read) 1.02, 1.50, 2.0x, 2.50, 2.60
  • Linux 2.4.X (Read) 1.02, 1.50
  • Linux 2.6.X (Read+write) 1.02, 1.50, 2.0x (write supported on HDD, DVD-RAM, DVD+RW and CD-RW from 2.6.10 onward, earlier versions support less media), 2.50 (read, via patch)
  • Mac OS 9 (Read+write) 1.02, 1.50
  • Mac OS X 10.4 (Read+write) 1.02, 1.50
  • magnussoft ZETA 1.2.1 (Read+write) 1.02, 1.50, 2.0x, 2.50, 2.60
  • NetBSD 4.0 (Read) 1.02, 1.50, 2.0x, 2.50, 2.60. Reading multi-session VAT, spared and metapartition variants from all CD, DVD, HD-DVD and BD variants as well as HDD and Flash media. Write support is work in progress.
  • Novell NetWare 5.1 (Read)
  • Novell NetWare 6.x (Read)
  • OpenBSD 3.8 (Read) 1.02, 1.50, 2.0x, 2.50, 2.60
  • OS/2 Additional fee drivers (Read+write) 2.0x
  • Solaris 7 11/99+ (Read) 1.02, 1.50
  • Solaris 8,9,10 (Read+Write) 1.02, 1.50. Write supported "on RAM media" [udfs(7FS) man page: Solaris 9]; works on HDD partition and DVD-RAM (with suitable DVD writer).
  • Windows 98/Me (Read) 1.02
  • Windows 2000 (Read) 1.02, 1.50
  • Windows XP/2003 (Read) 1.02, 1.50, 2.0x
  • Windows Vista (Read+write) 1.02, 1.50, 2.0x, 2.50, (Read) 2.60