
Ubuntu 22.04(Ubuntu 저장소 버전, 1.0.80)에서 "tgt" iSCSI 대상 데몬을 사용하여 DVD+R 레코더를 에뮬레이션하려고 합니다.
빈 파일 /tmp/cdimage를 만들고 /etc/tgt/conf.d/test.conf에 다음을 추가하여 구성했습니다.
<target iqn.2024-1.com.example:test1>
backing-store /tmp/cdimage
device-type cd
</target>
다음 명령을 사용하여 장치에 추가 매개변수를 수동으로 설정했습니다(문서에서 가져옴).여기):
tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 1 --params vendor_id=STGT_DVD,product_id=DVD101,product_rev=0010,scsi_sn=$SN,removable=1
이것의 최종 결과는 다음과 같이 생성된 대상에 대한 설명입니다 tgtadm --lld iscsi --op show --mode=target
.
Target 1: iqn.2024-1.com.example:test1
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 2
Initiator: iqn.1991-05.com.microsoft:furrina alias: none
Connection: 1
IP Address: 192.168.1.111
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: cd/dvd
SCSI ID: IET 00010001
SCSI SN: XYZ123
Size: 0 MB, Block size: 1
Online: Yes
Removable media: Yes
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: mmc
Backing store path: /tmp/cdimage
Backing store flags:
Account information:
ACL information:
ALL
Windows iSCSI 초기자를 사용하여 연결할 수 있고 Windows에서 DVD 레코더에 연결되어 있다고 생각하는 드라이브 문자가 매핑되어 있으므로 여기에 파일을 쓰겠다고 제안하지만 쓰려고 하면 "" 오류와 함께 즉시 실패합니다. 이 디스크를 굽는 중 오류가 발생했습니다. 디스크를 더 이상 사용할 수 없습니다." 이 일이 발생한 후에는 다음 명령을 사용하여 디스크를 변경할 때까지 굽기 프로세스를 다시 시작할 수 없습니다.
tgtimg --op new --device-type cd --type dvd+r --file /tmp/emptycd2.iso
tgtadm --tid 1 --lun 1 --op update --mode=logicalunit --params path=/tmp/emptycd2.iso
(필요에 따라 파일 이름을 변경)
이 작업을 수행하면 다음 로그 항목이 표시됩니다.
Jan 24 21:02:30 ubuntu-lxc-1 tgtimg[1318]: DVD+R /tmp/emptycd2.iso being created
이는 전체 프로세스 중에 생성되는 유일한 로그 항목입니다.
무엇이 잘못되었는지 제안하거나 디버깅하기 위해 취해야 할 추가 단계가 있습니까?