[CentOS] formating DVR-RW

Fri Apr 27 10:58:31 UTC 2018
Thomas Schmitt <scdbackup at gmx.net>


i am upstream developer of libburn. Nevertheless, the following is intended
to be purely technical info, not advertising.

Better do not use wodim with DVD media. It was forked from a CD-only
version of cdrecord and got added not-so-skilled code for operating DVD.
One should use dvd+rw-tools or a program that has libburn as backend.
I am not aware whether cdrecord is meanwhile willing to format DVD-RW.

With dvd+rw-tools and according to an old cheat sheet of mine, a DVD-RW
gets formatted like this:

  dvd+rw-format -force /dev/sr0

(Iirc, the option -force was needed if there is already an ISO filesystem
 on the medium.)

libburn's frontend cdrskin has a command line interface that is roughly
compatible to wodim or cdrecord. (There are also Xfburn, xorriso, and
Brasero's libburn plugin.)
A formatting run looks like this:

  cdrskin -v dev=/dev/sr0 blank=format_overwrite

Fred Smith wrote:
> Why would one format a cd/dvd?

DVD-RW can have two states: unformatted sequential and formatted to
"restricted" overwritable.

The latter can take 32 KiB chunks of write data at 32 KiB-aligned addresses.
It does not have to be blanked before re-use. growisofs and libisoburn
can do multi-session on it, like they do with DVD+RW, DVD-RAM, BD-RE.

Unformatted DVD-RW behave much like DVD-R (which is good for testing).
Blanking them for re-use is only swift if you do not want to do multi-session
on the blank medium. For multi-session they must be blanked fully, which
lasts as long as a full write run.

My own experince since 2004 is that formatted DVD-RW can be re-used more
often before they die. Unformatted DVD-RW seem to be less long living.
The older the drive, the earlier they fail.

Giles Coochey wrote:
> In order to delete something that you had previously written to it?

Formatted DVD-RW can be used as random access read-write device by help
of buffering device /dev/pktcdvd* created by pktsetup(1).
But this is an invitation for trouble, as is with the other overwritable
optical media types. Random access is slow and the frequent overwriting
of particular media blocks reduces life time.

(The other overwritable DVD and BD types need no /dev/pktcdvd* because
 they can be used for addressing with 2 KiB granularity.)

Nataraj wrote:
> I suggest that you try xorriso.

Thank you for flying xorriso. :))
It has a cdrecord-wodim-compatibility mode described in man 1 xorrecord.
Formatting is done by:

  xorrecord -v dev=/dev/sr0 blank=format_overwrite

The native command mode is more versatile but demands learning new names
and new rules. See man 1 xorriso.

  xorriso -outdev /dev/sr0 -format as_needed

The mode "as_needed" formats what can be formatted and is not formatted yet.
It throws no error if the medium is not suitable for formatting.

Have a nice day :)