update slices on (a)cd devices

Martin Laabs martin.laabs at mailbox.tu-dresden.de
Wed Jan 23 11:35:14 PST 2008


I ask the same question some day on -questions before but got
no usefull answer. Since it is also more technical
related I try it here again.

I created a dvd with two slices a and b. (Don't ask for the
reason - it is a test for my backup system)
This slices are ufs formated and gbde encrypted. However -
if I insert the DVD (and also a read access is done) the device
nodes acd0a and acd0b are not created automaticly. But if
the DVD is inserted *before* boot this two nodes are there
and stay even if I insert a "normal" DVD without slices.

An other way to update the device nodes is to detach an
attach the ata channel with atacontrol while the "sliced" DVD
is beeing inserted. But this is not very smart. (In particular
if there is i.e. a second device at this channel that is then
disconnected too.)
A similar way it to reload the atapicam modul. In this case
the cd0* device nodes are updated. The problems are the same
as with atacontroll de-/attach.

So I'am searching for a better way to tell the kernel/devfs
to update the device node list of the atapi devices. Unfortu-
nately I couldn't find a appropiate ioctl in the source of
atacontrol. Since I didn't understand the conecpt of geom
fully now I'm not sure whether geom also handle the
"single" (a)d[0-] and (a)cd[0-] devices and if there is maybe
a geom command for the "slice reread"

Thank you,
   Martin L.

More information about the freebsd-hackers mailing list