9srv Manual Collection/plan9/cdfs(4) | 9srv Manual Collection/plan9/cdfs(4) |
---|
The top level directory contains one file per disc track. The files are named cNNN, where c is a type character (a for audio tracks and d for data tracks) and NNN is the track number.
If the device can write discs and contains a writable disc, the top-level directory also contains an empty directory wd and, for CDs only, an empty directory wa. Files created in these directories appear in the top-level directory as new data or audio tracks, respectively, regardless of name.
At any time, any number of tracks may be open for reading or a single track may be open for writing. Writing a disc track is a quasi-real-time operation: the disc writer should be kept saturated with new data to avoid buffer underruns, but modern drives will be told to cope with underruns transparently. To ensure saturation, copying from a file system stored on local disk or memory is recommended.
BD-R discs are `formatted' upon first use, for sequential writing with spare sectors for hardware defect management, so BD drives should not report errors when writing BD-R discs; any such errors may be a sign that the laser of an old drive is fading.
To fixate a disc (close a recordable disc by writing its permanent table of contents), simply remove the wa or wd directory. The directory removed selects whether the disc is fixated as an audio or data disc; since each track carries its own type information, very few readers care which fixation type was used. Rewritable discs do not require fixation.
The top level directory also contains a ctl file, into which control messages may be echoed. The current control messages are:
Reading the ctl file yields information about the drive. If the drive contains an audio CD, the first line will be an aux/cddb command that can be run to query an internet CD database to get a table of contents. Subsequent lines contain the current and maximum reading and writing speeds. Additional lines may further describe the current disc.
Aux/cddb
takes 4 optional arguments.
The
-s
option makes
aux/cddb
use
server
for the query instead of
freedb.freedb.org.
The
-D
option causes the raw database response from the server to be dumped
to standard output.
The
-t
option causes the time of each track to be appended to the normal output.
-T
is like
-t
but prints a final line with the total time.
Copy the audio tracks from a CD:
Copy the tracks onto a blank CD inserted in the drive, and then fixate the disk as an audio CD.
Closing a just-written DVD-R track can take minutes while the drive burns the unused part of the track reservation (for the whole disc). Thus only a single DVD-R track can be written on a DVD-R disc; use other media if you need more than one track per disc.
There are too many combinations of optical media, each with unique quirks, approximately the cross-product of these tuples: (CD DVD- DVD+ BD), (-ROM -R -RW), (single-layer dual-layer), plus oddities like DVD-RAM. Triple- and quad-layer BD drives and discs are starting to appear.
Only MMC-compliant disc readers and writers are supported, but it would be easy to add support for early CD writers if desired.
Cdfs can take some seconds to figure out that it has a BD in the drive and how many layers are on the disc.
9srv Manual Collection/plan9/cdfs(4) | Rev: Fri Feb 01 00:15:08 GMT 2013 |