Wie mache ich FreeBSD-Show-Initiatoren zu einem einbindbaren Ziel von einem Zpool aus?
Bei einer Neuinstallation von FreeBSD 10.2 (Hostname bohr
) habe ich einen Zpool tank
mit dem Namen und einem einzelnen Vdev erstellt, das aus 2 Festplatten in einem Spiegel besteht. Anschließend habe ich mithilfe von ZFS ein 4 GB großes Volume ( images
) erstellt. Ich habe eine iSCSI-LUN ohne Authentifizierung für die Gruppe und das Ziel (zum Testen) eingerichtet, die auf verweist images
. Linux-, FreeBSD- und OS X-Initiatoren können das Ziel erkennen und eine Verbindung herstellen, aber keiner von ihnen findet ein Volume, das ich formatieren oder mounten kann.
root@bohr:/tank/volumes # zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 4.13G 895G 96K /tank
tank/volumes 4.13G 895G 100K /tank/volumes
tank/volumes/images 4.13G 899G 64K -
root@bohr:/tank/volumes # zpool status
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
errors: No known data errors
root@bohr:~ # cat /etc/ctl.conf
auth-group ag0 {
chap house shortshortdress
}
portal-group pg0 {
discovery-auth-group no-authentication
listen 0.0.0.0
listen [::]
}
target iqn.2015-09.com.example:images {
auth-group no-authentication
portal-group pg0
lun 0 {
path /tank/volumes/images
size 4G
}
}
also, hier ist ein repräsentativer Linux-Initiator. Beachten Sie das Fehlen von /dev/sdd
in der Ausgabe von fdisk -l
:
niels@suse_linux:~> lsscsi
[0:0:0:0] disk ATA WDC WD1600AAJB-5 01.0 /dev/sda
[1:0:0:0] cd/dvd HL-DT-ST DVD-ROM GDR8162B 0015 /dev/sr0
[1:0:1:0] cd/dvd _NEC DVD+RW ND-1100A 10FD /dev/sr1
[2:0:0:0] disk ATA TOSHIBA DT01ACA2 MX4O /dev/sdb
[3:0:0:0] disk ATA TOSHIBA DT01ACA2 MX4O /dev/sdc
[21:0:0:0] disk FREEBSD CTLDISK 0001 /dev/sdd
niels@suse_linux:~> sudo /usr/sbin/fdisk -l
root's password:
Disk /dev/sda: 160.0 GB, 159974776832 bytes, 312450736 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000c3390
Device Boot Start End Blocks Id System
/dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris
/dev/sda2 * 4208640 46153727 20972544 83 Linux
/dev/sda3 46153728 312449023 133147648 83 Linux
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/md1: 2000.3 GB, 2000264691712 bytes, 3906766976 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Die Ergebnisse unter OS X sind ähnlich, Verbindung, aber nichts verfügbar diskutil
. Ich habe auch versucht, die FreeBSD-Box als Initiator zu verwenden, und sie wird die Verbindung herstellen, aber ich kann immer noch auf kein Gerät zugreifen. Zurück zu Bohr für ein weiteres Beispiel einer hergestellten Verbindung, aber
root@bohr:~ # iscsictl -L
Target name Target portal State
iqn.2015-09.com.example:images 192.168.1.148 Connected: da0
Ich habe das FreeBSD-Handbuch für ZFS und ISCSI befolgt.
Antwort1
Ok, ich musste also meine LUN über das spezielle Gerät /dev/zvol routen. Also path /tank/volumes/images
brauchte ich stattdessen path /dev/zvol/tank/volumes/images
. Und das war es.