2020-11-04 21:50:25 +03:00
|
|
|
==Unplug a SCSI disk and then plug it again==
|
|
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-zeroes": true}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "blockdev-del", "arguments": {"node-name": "hd0"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2021-05-03 14:01:06 +03:00
|
|
|
.==Attach two SCSI disks using the same block device and the same iothread==
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true, "read-zeroes": true}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
2019-01-22 18:53:22 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd1"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd1"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "blockdev-del", "arguments": {"node-name": "hd0"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2021-05-03 14:01:06 +03:00
|
|
|
.==Attach two SCSI disks using the same block device but different iothreads==
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true, "read-zeroes": true}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "object-add", "arguments": {"id": "iothread1", "qom-type": "iothread"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
2019-01-22 18:53:21 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi1", "iothread": "iothread1"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"bus": "scsi0.0", "drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"bus": "scsi1.0", "drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd1"}}
|
2019-04-26 20:29:47 +03:00
|
|
|
{"error": {"class": "GenericError", "desc": "Cannot change iothread of active block backend"}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"bus": "scsi1.0", "drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd1"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd1"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "blockdev-del", "arguments": {"node-name": "hd0"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2021-05-03 14:01:06 +03:00
|
|
|
.==Attach a SCSI disks using the same block device as a NBD server==
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true, "read-zeroes": true}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "nbd-server-start", "arguments": {"addr": {"data": {"path": "SOCK_DIR/PID-nbd.sock"}, "type": "unix"}}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "nbd-server-add", "arguments": {"device": "hd0"}}
|
2019-01-22 18:53:23 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
2019-05-24 11:41:34 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
2019-05-24 11:41:34 +03:00
|
|
|
{"return": {}}
|
2020-11-04 21:50:25 +03:00
|
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
2019-05-24 11:41:34 +03:00
|
|
|
{"return": {}}
|
2021-05-03 14:01:06 +03:00
|
|
|
.
|
2020-11-04 21:50:25 +03:00
|
|
|
----------------------------------------------------------------------
|
|
|
|
Ran 4 tests
|
|
|
|
|
|
|
|
OK
|