Re: CDROM not recognised: 'Device is not a TYPE_DISK block device'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

On 10/15/2014 02:11 PM, Andrew Watt wrote:
  Hello all,

I'm having a problem creating an iblock backstore from the CDROM drive in my HP Microserver.

The command:

create name=cdrom dev=/dev/sr0

Will return the following error:

Generating a wwn serial.
Device is not a TYPE_DISK block device.

I have been able to create a pscsi backstore to this device, and I can access it from my Windows 7 laptop, although it can get confused and lock the drive tray if I mount it within the server - which is why I'm trying the iblock configuration.

This behaviour is for a TSST Corp CDDVDW SH-24DBSCSI CDRom in a HP Microserver N54, with a clean install of Ubuntu 14.04 server, and targetcli.

Could you please give me the major device number for your CDROM drive?
In case you are not familiar with this, simply run:

# ls -l /dev/sr0

You should get something like that:

brw-rw---- 1 root cdrom 11, 0 Oct 13 16:01 /dev/sr0

In that case, 11 is the major number and 0 the minor.

Note that if I remember correctly, not adding CD-ROM majors as TYPE_DISK was a deliberate decision, I'll have to go through my notes to find out exactly why. In the meantime, you could add it manually to the type_disk_known_majors list found in utils.py from the python-rtslib package:

--- /usr/lib/python2.7/dist-packages/rtslib/utils.py 2014-10-13 16:04:08.000000000 +0200
+++ /tmp/utils.py	2014-10-15 14:24:31.932000000 +0200
@@ -219,6 +219,7 @@
     type_disk_known_majors = [1,    # RAM disk
                               8,    # SCSI disk devices
                               9,    # Metadisk RAID devices
+			       11,   # Temporary hack for CD-ROM
                               13,   # 8-bit MFM/RLL/IDE controller
                               19,   # "Double" compressed disk
                               21,   # Acorn MFM hard drive interface

Please report here on the outcome, and let me know how the CD-ROM behaves with iblock. I am not convinced that this is a good idea at all, but feel free to test it :-)


Any help would be greatly appreciated.

Thanks in advance,
a.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux