Erinevus lehekülje "FreeBSD iSCSI" redaktsioonide vahel
34. rida: | 34. rida: | ||
Seejärel jagame välja ketta. Selleks on meil /dev/ad0 suurusega 70GB | Seejärel jagame välja ketta. Selleks on meil /dev/ad0 suurusega 70GB | ||
− | |||
48. rida: | 47. rida: | ||
iscsi_target_enable="YES" | iscsi_target_enable="YES" | ||
− | Ja stardime serveri | + | Ja stardime serveri |
# /usr/local/etc/rc.d/iscsi_target start | # /usr/local/etc/rc.d/iscsi_target start | ||
58. rida: | 57. rida: | ||
DISK: LUN 0: 71680 MB disk storage for "target0" | DISK: LUN 0: 71680 MB disk storage for "target0" | ||
TARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target | TARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target | ||
+ | |||
===Kliendi seadistus=== | ===Kliendi seadistus=== | ||
+ | |||
+ | Esimesena on vajalik teha seadistusfail kust ja mida on võimalik külge haakida | ||
# nano /etc/iscsi.conf | # nano /etc/iscsi.conf | ||
69. rida: | 71. rida: | ||
} | } | ||
− | Laadime iscsi mooduli | + | Laadime seejärel iscsi mooduli mis FreeBSD7'mes vaikuimisi juba kaasas |
# kldload iscsi_initiator | # kldload iscsi_initiator | ||
− | Selleks ,et automaatselt moodul laaditaks lisame | + | Selleks ,et automaatselt moodul laaditaks lisame rc.confi read |
− | |||
− | |||
iscsi_initiator_load="YES" | iscsi_initiator_load="YES" | ||
− | Ning haagime ketta külge | + | Ning haagime seejärel ketta külge |
# iscontrol -n target0 | # iscontrol -n target0 | ||
95. rida: | 95. rida: | ||
====Kasutamine ja katsetamine==== | ====Kasutamine ja katsetamine==== | ||
+ | |||
+ | Värskelt masinasse ilmunud block devicele uus failisüsteem | ||
# newfs /dev/da1 | # newfs /dev/da1 | ||
104. rida: | 106. rida: | ||
12796128, 13172480, 13548832, 13925184, 14301536, 14677888, 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352, 17688704, 18065056 ... | 12796128, 13172480, 13548832, 13925184, 14301536, 14677888, 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352, 17688704, 18065056 ... | ||
+ | Seejärel ühendame selle külge /home/net alla | ||
# mount /dev/da1 /home/net/ | # mount /dev/da1 /home/net/ | ||
111. rida: | 114. rida: | ||
/dev/da1 71085512 4 65398668 0% /usr/home/net | /dev/da1 71085512 4 65398668 0% /usr/home/net | ||
− | 1. | + | Ja testime 1.1gigabaidise failiga kirjutuskiirust 100Mb võrgus |
# dd if=/dev/zero of=zero-file bs=1024 count=1048576 | # dd if=/dev/zero of=zero-file bs=1024 count=1048576 |
Redaktsioon: 21. juuni 2008, kell 13:23
Sissejuhatus
iSCSI tehnoloogia võimaldab üle TCP/IP võrgu ühendada klientarvutile külge plokk-seadme vastavat teenust pakkuvast serverist, kusjuures on kombeks kasutada selliseid nimetusi kliendi ja serveri kohta
initiator - iSCSI klient target - iSCSI server
Target ja initiator arvutid võivad kasutada erinevaid operatsioonisüsteeme ning asuda ka erinevatel riistvaralistel platvormidel. Kuna andmevahetuse maht võib kujuneda suureks, siis võib olla mõistlik lisaks kasutusele võtta ainult iSCSI jaoks eraldatud võrgusegment. Tundub, et initiatori osas on suurem arendajate tähelepanu koondunud projektile [1] ning targeti osas projektile [2].
Serveri install
# cd /usr/ports/net/iscsi-target/ # make install ===> Installing rc.d startup script(s) ===> Compressing manual pages for iscsi-target-20080207_2 ===> Registering installation for iscsi-target-20080207_2 ===> SECURITY REPORT: This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/bin/iscsi-target This port has installed the following startup scripts which may cause these network services to be started at boot time. /usr/local/etc/rc.d/iscsi_target If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.netbsd.org/
Seejärel jagame välja ketta. Selleks on meil /dev/ad0 suurusega 70GB
# nano /usr/local/etc/iscsi/targets
# NAME DEVICE START LENGTH extent0 /dev/ad0 0 70GB # NAME ACCESS STORAGE NETMASK target0 rw extent0 193.40.0.0/24
et reboodil automaatselt server starditaks Avame /etc/rc.conf ja lisame rea
iscsi_target_enable="YES"
Ja stardime serveri
# /usr/local/etc/rc.d/iscsi_target start Starting iscsi_target. Reading configuration from `/usr/local/etc/iscsi/targets' target0:rw:193.40.0.0/24 extent0:/dev/ad0:0:75161927680 DISK: 1 logical unit (146800640 blocks, 512 bytes/block), type iscsi fs DISK: LUN 0: 71680 MB disk storage for "target0" TARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target
Kliendi seadistus
Esimesena on vajalik teha seadistusfail kust ja mida on võimalik külge haakida
# nano /etc/iscsi.conf
target0 { # nickname targetaddress = 193.40.0.194 targetname = iqn.1994-04.org.netbsd.iscsi-target:target0 }
Laadime seejärel iscsi mooduli mis FreeBSD7'mes vaikuimisi juba kaasas
# kldload iscsi_initiator
Selleks ,et automaatselt moodul laaditaks lisame rc.confi read
iscsi_initiator_load="YES"
Ning haagime seejärel ketta külge
# iscontrol -n target0 # iscontrol[1464]: running iscontrol[1464]: (pass1:iscsi0:0:0:0): tagged openings now 0 iscontrol[1464]: cam_open_btl: no passthrough device found at 1:0:1 iscontrol[1464]: cam_open_btl: no passthrough device found at 1:0:2 iscontrol[1464]: cam_open_btl: no passthrough device found at 1:0:3 iscontrol: supervise starting main loop
dmesgi/message logi peaks ilmuma read
da1 at iscsi0 bus 0 target 0 lun 0 da1: <NetBSD NetBSD iSCSI 0> Fixed Direct Access SCSI-3 device
Kasutamine ja katsetamine
Värskelt masinasse ilmunud block devicele uus failisüsteem
# newfs /dev/da1 /dev/da1: 71680.0MB (146800640 sectors) block size 16384, fragment size 2048 using 391 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792, 6398144, 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608, 9408960, 9785312, 10161664, 10538016, 10914368, 11290720, 11667072, 12043424, 12419776, 12796128, 13172480, 13548832, 13925184, 14301536, 14677888, 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352, 17688704, 18065056 ...
Seejärel ühendame selle külge /home/net alla
# mount /dev/da1 /home/net/ # df Filesystem 1K-blocks Used Avail Capacity Mounted on ... /dev/da1 71085512 4 65398668 0% /usr/home/net
Ja testime 1.1gigabaidise failiga kirjutuskiirust 100Mb võrgus
# dd if=/dev/zero of=zero-file bs=1024 count=1048576 1048576+0 records in 1048576+0 records out 1073741824 bytes transferred in 117.719325 secs (9121203 bytes/sec)