СХД: различия между версиями
Нет описания правки |
Нет описания правки |
||
Строка 3: | Строка 3: | ||
<pre> | <pre> | ||
# apt-get install kernel-modules-zfs-std-def kernel-modules-qla2x00t-std-def kernel-modules-iscsi_scst-std-def zfs-utils iscsi-scst | # apt-get install kernel-modules-zfs-std-def kernel-modules-qla2x00t-std-def kernel-modules-iscsi_scst-std-def zfs-utils iscsi-scst | ||
# systemctl enable zfs.target | |||
</pre> | </pre> | ||
<pre> | |||
# echo "options scst scst_max_dev_cmd_mem=2048 scst_max_cmd_mem=4096" > /etc/modprobe.d/scst.conf | |||
# echo "blacklist qla2xxx" > /etc/modprobe.d/blacklist-qla2xxx.conf | |||
# modprobe -a scst_vdisk iscsi_scst | |||
</pre> | |||
<pre> | <pre> | ||
# modprobe zfs | |||
# zpool create ZALT /dev/sdb1 /dev/sdc1 | # zpool create ZALT /dev/sdb1 /dev/sdc1 | ||
# zfs create -V 32G ZALT/pve04 | # zfs create -V 32G ZALT/pve04 | ||
Строка 21: | Строка 30: | ||
TARGET iqn.2016-10.ru.basealt.office:pve04-disk { | TARGET iqn.2016-10.ru.basealt.office:pve04-disk { | ||
enabled 1 | enabled 1 | ||
GROUP PVE04 { | GROUP PVE04 { | ||
Строка 32: | Строка 40: | ||
<pre> | <pre> | ||
# rmmod qla2xxx | |||
# modprbe -a qla2xxx_scst qla2x00tgt | |||
# cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name | # cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name | ||
</pre> | </pre> | ||
Строка 79: | Строка 89: | ||
TARGET iqn.2016-10.ru.basealt.office:pve04-disk { | TARGET iqn.2016-10.ru.basealt.office:pve04-disk { | ||
enabled 1 | enabled 1 | ||
GROUP PVE04 { | GROUP PVE04 { | ||
Строка 117: | Строка 126: | ||
# scstadmin -open_dev pve03-disk -handler vdisk_blockio -attributes filename=/dev/zvol/ZALT/pve03 | # scstadmin -open_dev pve03-disk -handler vdisk_blockio -attributes filename=/dev/zvol/ZALT/pve03 | ||
# scstadmin -add_target iqn.2016-10.ru.basealt.office:pve03-disk -driver iscsi | # scstadmin -add_target iqn.2016-10.ru.basealt.office:pve03-disk -driver iscsi | ||
# scstadmin -add_group PVE03 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk | # scstadmin -add_group PVE03 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk | ||
# scstadmin -add_lun 0 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk -group PVE03 -device pve03-disk | # scstadmin -add_lun 0 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk -group PVE03 -device pve03-disk |
Версия от 12:38, 27 октября 2016
# apt-get install kernel-modules-zfs-std-def kernel-modules-qla2x00t-std-def kernel-modules-iscsi_scst-std-def zfs-utils iscsi-scst # systemctl enable zfs.target
# echo "options scst scst_max_dev_cmd_mem=2048 scst_max_cmd_mem=4096" > /etc/modprobe.d/scst.conf # echo "blacklist qla2xxx" > /etc/modprobe.d/blacklist-qla2xxx.conf # modprobe -a scst_vdisk iscsi_scst
# modprobe zfs # zpool create ZALT /dev/sdb1 /dev/sdc1 # zfs create -V 32G ZALT/pve04
HANDLER vdisk_blockio { DEVICE pve04-disk { filename /dev/zvol/ZALT/pve04 } } TARGET_DRIVER iscsi { enabled 1 TARGET iqn.2016-10.ru.basealt.office:pve04-disk { enabled 1 GROUP PVE04 { LUN 0 pve04-disk INITIATOR iqn.2016-10.ru.basealt.office.pve04:01:289e86f45e5f } } }
# rmmod qla2xxx # modprbe -a qla2xxx_scst qla2x00tgt # cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name
HANDLER vdisk_blockio { DEVICE pve04-disk { filename /dev/zvol/ZALT/pve04 } } TARGET_DRIVER qla2x00t { TARGET 21:00:00:e0:8b:81:65:de { HW_TARGET enabled 1 GROUP PVE04 { LUN 0 pve04-disk INITIATOR 21:00:00:e0:8b:81:9a:e2 } } TARGET 21:00:00:e0:8b:81:ff:e3 { HW_TARGET enabled 1 GROUP PVE04 { LUN 0 pve04-disk INITIATOR 21:00:00:e0:8b:81:ee:db } } }
HANDLER vdisk_blockio { DEVICE pve04-disk { filename /dev/zvol/ZALT/pve04 } } TARGET_DRIVER iscsi { enabled 1 TARGET iqn.2016-10.ru.basealt.office:pve04-disk { enabled 1 GROUP PVE04 { LUN 0 pve04-disk INITIATOR iqn.2016-10.ru.basealt.office.pve04:01:289e86f45e5f } } } TARGET_DRIVER qla2x00t { TARGET 21:00:00:e0:8b:81:65:de { HW_TARGET enabled 1 GROUP PVE04 { LUN 0 pve04-disk INITIATOR 21:00:00:e0:8b:81:9a:e2 } } TARGET 21:00:00:e0:8b:81:ff:e3 { HW_TARGET enabled 1 GROUP PVE04 { LUN 0 pve04-disk INITIATOR 21:00:00:e0:8b:81:ee:db } } }
# zfs create -V 32G ZALT/pve03 # scstadmin -open_dev pve03-disk -handler vdisk_blockio -attributes filename=/dev/zvol/ZALT/pve03 # scstadmin -add_target iqn.2016-10.ru.basealt.office:pve03-disk -driver iscsi # scstadmin -add_group PVE03 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk # scstadmin -add_lun 0 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk -group PVE03 -device pve03-disk # scstadmin -add_init iqn.2016-10.ru.basealt.office.pve03:01::249ddda522 -driver iscsi -target iqn.2016-10.ru.basealt.office:pve03-disk -group PVE03 # scstadmin -enable_target iqn.2016-10.ru.basealt.office:pve03-disk -driver iscsi