Universal Disk Format
Universal Disk Format is a profile of the specification known as ISO/IEC 13346 and ECMA-167 and is an open vendor-neutral file system for computer data storage for a broad range of media. In practice, it has been most widely used for DVDs and newer optical disc formats, supplanting ISO 9660. Due to its design, it is very well suited to incremental updates on both recordable and writable optical media. UDF was developed and maintained by the Optical Storage Technology Association.
Usage
Normally, authoring software will master a UDF file system in a batch process and write it to optical media in a single pass. But when packet writing to rewritable media, such as CD-RW, UDF allows files to be created, deleted and changed on-disc just as a general-purpose filesystem would on removable media like floppy disks and flash drives. This is also possible on write-once media, such as CD-R, but in that case the space occupied by the deleted files cannot be reclaimed.Multi-session mastering is also possible in UDF, though some implementations may be unable to read disks with multiple sessions.
History
The Optical Storage Technology Association standardized the UDF file system to form a common file system for all optical media: both for read-only media and for re-writable optical media. When first standardized, the UDF file system aimed to replace ISO 9660, allowing support for both read-only and writable media. After the release of the first version of UDF, the DVD Consortium adopted it as the official file system for DVD-Video and DVD-Audio.UDF shares the basic volume descriptor format with ISO 9660. A "UDF Bridge" format is defined since 1.50 so that a disc can also contain a ISO 9660 file system making references to files on the UDF part.
Revisions
Multiple revisions of UDF have been released:- Revision 1.00. Original Release.
- Revision 1.01. Added DVD Appendix and made a few minor changes.
- Revision 1.02. This format is used by DVD-Video discs.
- Revision 1.50. Added support for 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. Add UDF bridge.
- Revision 2.00. Added support for Stream Files and real-time files and simplified directory management. VAT support was extended.
- Revision 2.01 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. Added the Metadata Partition facilitating metadata clustering, easier crash recovery and optional duplication of file system information: All metadata like nodes and directory contents are written on a separate partition which can optionally be mirrored. This format is used by some versions of Blu-rays and most HD-DVD discs.
- Revision 2.60. Added Pseudo OverWrite method for drives supporting pseudo overwrite capability on sequentially recordable media. Has read-only compatibility with UDF 2.50 implementations.
Specifications
The UDF standard defines three file system variations, called "builds". These are:- Plain. This is the original format supported in all UDF revisions
- Virtual Allocation Table a.k.a. VAT. Used specifically for writing to write-once media
- Spared. Used specifically for writing to rewritable media
Plain build
Since this is the basic format, practically any operating system or file system driver claiming support for UDF should be able to read this format.
VAT build
Write-once media such as DVD-R and CD-R have limitations when being written to, in that each physical block can only be written to once, and the writing must happen incrementally. Thus the plain build of UDF 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 an ISO 9660 file system gets written to CD media.To enable a CD-R to be used virtually like a hard disk, whereby the user can add and modify files on a CD-R at will, OSTA added the VAT build to the UDF standard in its revision 1.5. The VAT is an additional structure on the disc that allows packet writing; that is, remapping physical blocks when files or other data on the disc are modified or deleted. For write-once media, the entire disc is virtualized, making the write-once nature transparent for the user; the disc can be treated the same way one would treat a rewritable disc.
The write-once nature of CD-R or DVD-R media means that when a file is deleted on the disc, the file's data still remains on the disc. It does not appear in the directory any more, but it still occupies the original space where it was stored. Eventually, after using this scheme for some time, the disc will be full, as free space cannot be recovered by deleting files. Special tools can be used to access the previous state of the disc, making recovery possible.
Not all drives fully implement version 1.5 or higher of the UDF, and some may therefore be unable to handle VAT builds.
Spared (RW) build
Rewriteable media such as DVD-RW and CD-RW have fewer limitations than DVD-R and CD-R media. Sectors can be rewritten at random. These media can be erased entirely at any time, making the disc blank again, ready for writing a new UDF or other file system to it. However, sectors of -RW media may "wear out" after a while, meaning that their data becomes unreliable, through having been rewritten too often.The plain and VAT builds of the UDF format can be used on rewriteable media, with some limitations. If the plain build is used on a -RW media, file-system level modification of the data must not be allowed, as this would quickly wear out often-used sectors on the disc, which would then go unnoticed and lead to data loss. To allow modification of files on the disc, rewriteable discs can be used like -R media using the VAT build. This ensures that all blocks get written only once, ensuring that there are no blocks that get rewritten more often than others. This way, a RW disc can be erased and reused many times before it should become unreliable. However, it will eventually become unreliable with no easy way of detecting it. When using the VAT build, CD-RW/DVD-RW media effectively appears as CD-R or DVD+/-R media to the computer. However, the media may be erased again at any time.
The spared build was added in revision 1.5 to address the particularities of rewriteable media. This build adds an extra Sparing Table in order to manage the defects that will eventually occur on parts of the disc that have been rewritten too many times. This table keeps track of worn-out sectors and remaps them to working ones. UDF defect management does not apply to systems that already implement another form of defect management, such as Mount Rainier for optical discs, or a disk controller for a hard drive.
The tools and drives that do not fully support revision 1.5 of UDF will ignore the sparing table, which would lead them to read the outdated worn-out sectors, leading to retrieval of corrupted data.
The so-called UDF overhead that is spread over the entire disc reserves a portion of the data storage space, limiting the useable capacity of CD-RW with e.g. 650 MB of original capacity to around 500 MB.
Character set
The UDF specifications allow only one Character Set OSTA CS0, which can store any Unicode Code point excluding U+FEFF and U+FFFE. Additional character sets defined in ECMA-167 are not used.Since Errata DCN-5157, the range of code points was expanded to all code points from Unicode 4.0, which includes Plane 1-16 characters such as Emoji. DCN-5157 also recommends normalizing the strings to Normalization Form C.
The OSTA CS0 character set stores a 16-bit Unicode string "compressed" into 8-bit or 16-bit units, preceded by a single-byte "compID" tag to indicate the compression type. The 8-bit storage is functionally equivalent to ISO-8859-1, and the 16-bit storage is UTF-16 in big endian. The reference algorithm neither checks for forbidden code points nor interprets surrogate pairs, so like NTFS the string may be malformed.
Compatibility
Many DVD players do not support any UDF revision other than version 1.02. Discs created with a newer revision may still work in these players if the ISO 9660 bridge format is used. Even if an operating system claims to be able to read UDF 1.50, it still may only support the plain build and not necessarily either the VAT or Spared UDF builds.Mac OS X 10.4.5 claims to support Revision 1.50, yet it can only mount disks of the plain build properly and provides no virtualization support at all. It cannot mount UDF disks with VAT, as seen with the Sony Mavica issue. Releases before 10.4.11 mount disks with Sparing Table but does not read its files correctly. Version 10.4.11 fixes this problem.
Similarly, Windows XP Service Pack 2 cannot read DVD-RW discs that use the UDF 2.00 sparing tables as a defect management system. This problem occurs if the UDF defect management system creates a sparing table that spans more than one sector on the DVD-RW disc. Windows XP SP2 can recognize that a DVD is using UDF, but Windows Explorer displays the contents of a DVD as an empty folder. A hotfix is available for this and is included in Service Pack 3.
Due to the default UDF versions and options, a UDF partition formatted by Windows cannot be written under macOS. On the other hand, a partition formatted by macOS cannot be directly written by Windows, due to the requirement of a MBR partition table. In addition, Linux only supports writing to UDF 2.01. A script for Linux and macOS called handles these incompatibilities by using UDF 2.01 and adding a fake MBR; for Windows the best solution is using the command-line tool.