Hello:
I want use ctld(8) to share a ZVOL as iSCSI target :
I mount this target in Windows and format the whole disk to one NTFS partition and put some files on it, so far so good.
But after reboot :
So I check :
And if I use gdisk delete all partition and restart ctld(8), everything back to normal, but loop from step 1 .
What happen? The problem is in ZFS or ctld(8)?
I want use ctld(8) to share a ZVOL as iSCSI target :
Code:
root@test:~ # cat /etc/ctl.conf
portal-group pg0 {
discovery-auth-group no-authentication
listen 0.0.0.0
}
target iqn.2017-10.vhost:test {
auth-group no-authentication
portal-group pg0
lun 0 {
path /dev/zvol/pool/vol01
}
}
I mount this target in Windows and format the whole disk to one NTFS partition and put some files on it, so far so good.
But after reboot :
Code:
ctld: LUN creation warning: error opening /dev/zvol/pool/vol01: 2
So I check :
Code:
root@test:/dev/zvol/pool # ll
total 0
crw-r----- 1 root operator 0x6e Nov 21 16:27 vol01
crw-r----- 1 root operator 0x6f Nov 21 16:27 vol01p1
root@test:/dev/zvol/pool # gdisk vol01
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk vol01: 4294967296 sectors, 2.0 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): CCA9B29E-BC36-43A5-B3B3-4175B109307D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 4294967262
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4294965247 2.0 TiB 0700 Basic data partition
Command (? for help):
And if I use gdisk delete all partition and restart ctld(8), everything back to normal, but loop from step 1 .
What happen? The problem is in ZFS or ctld(8)?