Skip to contentSkip to conversation

testing the /dev/cciss/c0d0 device names

DISCUSSION Loic Dachary 2 participants 3 messages Dec 5, 2015 – Dec 7, 2015

lore
Share & tools
lore
#0 lore raw

Hi Ilya,

ceph-disk has special handling for device names like /dev/cciss/c0d1 [1] and it was partially broken when support for device mapper was introduced. Ideally there would be a way to test that support when running the ceph-disk suite [2]. Do you know of a way to do that without having the hardware for which this driver is designed ?

Maybe this convention (/dev/cciss/c0d0 being mapped to /sys/block/cciss!c0d0 is not unique to this driver and I could use another to validate the name conversion from X/Y to X!Y and vice versa is handled as it should ?

Cheers

[1] https://github.com/ceph/ceph/blob/infernalis/src/ceph-disk#L438
[2] https://github.com/ceph/ceph/blob/infernalis/qa/workunits/ceph-disk/ceph-disk-test.py

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#1 lore raw
Quoted 5 lines · Loic Dachary

Hi Ilya,

ceph-disk has special handling for device names like /dev/cciss/c0d1 [1] and it was partially broken when support for device mapper was introduced. Ideally there would be a way to test that support when running the ceph-disk suite [2]. Do you know of a way to do that without having the hardware for which this driver is designed ?

Maybe this convention (/dev/cciss/c0d0 being mapped to /sys/block/cciss!c0d0 is not unique to this driver and I could use another to validate the name conversion from X/Y to X!Y and vice versa is handled as it should ?

No, it's not unique. driver core does strreplace(s, '/', '!') at register time to work around such block devices. The list includes DAC960, aoeblk, cciss, cpqarray, sx8 and probably more, but I don't think anything widespread uses this naming scheme. IIRC dm actually won't let you name a device with anything that contains a slash.

If you really wanted you could set up aoeblk I guess, but a simple unit test should be be more than enough ;)

Thanks,

Ilya

#2 lore raw

Hi,

Quoted 7 lines · Ilya Dryomov
Quoted 5 lines · Loic Dachary

Hi Ilya,

ceph-disk has special handling for device names like /dev/cciss/c0d1 [1] and it was partially broken when support for device mapper was introduced. Ideally there would be a way to test that support when running the ceph-disk suite [2]. Do you know of a way to do that without having the hardware for which this driver is designed ?

Maybe this convention (/dev/cciss/c0d0 being mapped to /sys/block/cciss!c0d0 is not unique to this driver and I could use another to validate the name conversion from X/Y to X!Y and vice versa is handled as it should ?

Quoted 8 lines

No, it's not unique. driver core does strreplace(s, '/', '!') at register time to work around such block devices. The list includes DAC960, aoeblk, cciss, cpqarray, sx8 and probably more, but I don't think anything widespread uses this naming scheme. IIRC dm actually won't let you name a device with anything that contains a slash.

If you really wanted you could set up aoeblk I guess, but a simple unit test should be be more than enough ;)

Thanks for the information. I'll refrain from attempting integration tests and try to make it solid with unit tests :-)

Cheers

Quoted 5 lines

Thanks,

Ilya

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre