Hi,

Richard Betham wrote:
> ln -s /dev/sg0 /dev/scd0
> ln -s /dev/sg2 /dev/scd2
> [...]
> wodim: Overview of accessible drives (2 found) :
>  0  dev='/dev/scd1'     rwrw-- : 'hp' 'DVD-RAM GHD0N'
>  1  dev='/dev/scd2'     rwrw-- : 'HUAWEI' 'Mass Storage'
> However I used sg? not sr? .

/dev/sg* enumerates all devices which are controlled by SCSI drivers.
I assume that /dev/sg2 is not an optical drive.
Better do not try what happens if you let wodim operate on it.

The old /dev/scd* files where 1:1 related to the /dev/sr* files.
So if you link /dev/scd0 to /dev/sr0 and /dev/scd1 to /dev/sr1 you
will surely only see the first two optical drives and not your hard
disk, USB sticks, digital cameras, ...


If you have more than one optical drive and want to operate them
simultaneously, you might really have to use /dev/sg*, because
/dev/sr* suffers from a global lock introduced in 2010.
Two /dev/sr* together get less burn throughput than one alone.

Nevertheless you should then use only those /dev/sgN as link target
for /dev/scdM of which you know that they are optical drives.
You may determine them by cdrskin, which only lists optical drives:

  $ cdrskin drive_scsi_dev_family=sg --devices
  ...
  cdrskin: Overview of accessible drives (5 found) :
  ------------------------------------------------------------
  0  dev='/dev/sg2'  rwrw-- :  'HL-DT-ST'  'BDDVDRW GGC-H20L'
  1  dev='/dev/sg3'  rwrw-- :  'HL-DT-ST'  'DVDRAM GH24NSC0'
  2  dev='/dev/sg4'  rwrw-- :  'HL-DT-ST'  'BD-RE GGW-H20L'
  3  dev='/dev/sg5'  rwrw-- :  'Optiarc '  'BD RW BD-5300S'
  4  dev='/dev/sg6'  rwrw-- :  'ASUS    '  'BW-16D1HT'
  ------------------------------------------------------------

A disadvantage of using /dev/sg for burning is that it is not easy
to coordinate with processes using /dev/sr.
Normally, both wodim and libburn should refuse to operate a drive which
is already in use with O_EXCL flag by another process or mount(8).
But in order to learn whether /dev/sg2 is the same device as /dev/sr0
one has to open both, which will fail with a /dev/sr0 that is in use.

So i advise to use /dev/sr unless there are strong reasons not to do so.


Have a nice day :)

Thomas

Reply via email to