Difference between revisions of "ISCSI: Connect Ubuntu ke iSCSI Volume"
Onnowpurbo (talk | contribs) (New page: Q. How do I format and connect to an iSCSI Volume under Debian / Ubuntu Linux? A. You need to install open-iscsi package for high performance, transport independent iSCSI implementation u...) |
Onnowpurbo (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | ==Install Aplikasi== | |
− | + | Install | |
− | Install | ||
− | |||
− | |||
$ sudo apt-get install open-iscsi | $ sudo apt-get install open-iscsi | ||
− | + | Pastikan ada /etc/iscsi supaya iscsiadm tidak complain | |
− | + | ln -s /etc/{iscsid.conf,initiatorname.iscsi} /etc/iscsi/ | |
− | |||
− | + | ==Edit Konfigurasi== | |
+ | |||
+ | Konfigurasi default ada di /etc/iscsi/iscsid.conf atau ~/.iscsid.conf. Buka /etc/iscsi/iscsid.conf | ||
# vi /etc/iscsi/iscsid.conf | # vi /etc/iscsi/iscsid.conf | ||
− | Set node.session.auth.username, node.session.auth.password | + | Set node.session.auth.username, node.session.auth.password dan parameter lainnya sebagai berikut: |
node.startup = automatic | node.startup = automatic | ||
Line 36: | Line 34: | ||
node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536 | node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536 | ||
− | + | Versi minimal sekali, ubah | |
+ | |||
+ | node.startup = manual | ||
+ | |||
+ | menjadi | ||
+ | |||
+ | node.startup = automatic | ||
+ | |||
+ | ==Restart== | ||
+ | |||
+ | Restart open-iscsi | ||
+ | |||
+ | /etc/init.d/open-iscsi restart | ||
− | + | ==Discovery Target== | |
− | + | Jalanan discovery terhadap iscsi target host: | |
# iscsiadm -m discovery -t sendtargets -p ISCSI-SERVER-IP-ADDRESS | # iscsiadm -m discovery -t sendtargets -p ISCSI-SERVER-IP-ADDRESS | ||
− | + | Jika iSCSI server IP address adalah 192.168.1.100, tulis: | |
− | # iscsiadm -m discovery -t sendtargets -p 192.168.1. | + | # iscsiadm -m discovery -t sendtargets -p 192.168.1.100 |
− | + | atau | |
− | # iscsiadm --mode discovery --type sendtargets --portal 192.168.1. | + | # iscsiadm --mode discovery --type sendtargets --portal 192.168.1.100 |
− | + | Akan keluar kira-kira | |
− | # iscsiadm -- | + | # iscsiadm -m discovery -t sendtargets -p 192.168.1.100 |
+ | 192.168.1.101:3260,3 iqn.1992-04.com.emc:cx.ckm00100900301.a3 | ||
+ | 192.168.1.102:3260,1 iqn.1992-04.com.emc:cx.ckm00100900301.b2 | ||
+ | 192.168.1.103:3260,4 iqn.1992-04.com.emc:cx.ckm00100900301.b3 | ||
+ | 192.168.1.100:3260,2 iqn.1992-04.com.emc:cx.ckm00100900301.a2 | ||
− | + | Login menggunakan perintah | |
+ | |||
+ | # iscsiadm --mode node --targetname iqn.1992-04.com.emc:cx.ckm00100900301.a2 --portal 192.168.1.100:3260 --login | ||
+ | |||
+ | Restart iscsi | ||
# /etc/init.d/open-iscsi restart | # /etc/init.d/open-iscsi restart | ||
− | Format iSCSI Volume | + | ==Cara Cepat== |
+ | |||
+ | Login ke iSCSI target secara cepat | ||
+ | |||
+ | iscsiadm --mode node -l | ||
+ | |||
+ | Unload iSCSI target secara cepat | ||
+ | |||
+ | iscsiadm --mode node -u | ||
+ | |||
+ | |||
+ | ==Format iSCSI Volume== | ||
− | + | Seharusnya akan ada tambahan drive misalnya /dev/sdc. Gunakan /var/log/messages untuk melihat nama device: | |
# tail -f /var/log/messages | # tail -f /var/log/messages | ||
− | + | Jika nama device adalah /dev/sdc, masukan langkah berikut untuk membuat partisi: | |
# fdisk /dev/sdc | # fdisk /dev/sdc | ||
− | + | Format partisi tersebut: | |
# mkfs.ext3 /dev/sdc1 | # mkfs.ext3 /dev/sdc1 | ||
Line 82: | Line 111: | ||
* http://www.cyberciti.biz/faq/howto-setup-debian-ubuntu-linux-iscsi-initiator/ | * http://www.cyberciti.biz/faq/howto-setup-debian-ubuntu-linux-iscsi-initiator/ | ||
+ | * https://help.ubuntu.com/11.10/serverguide/iscsi-initiator.html | ||
==Pranala Menarik== | ==Pranala Menarik== |
Latest revision as of 12:38, 5 December 2012
Install Aplikasi
Install
$ sudo apt-get install open-iscsi
Pastikan ada /etc/iscsi supaya iscsiadm tidak complain
ln -s /etc/{iscsid.conf,initiatorname.iscsi} /etc/iscsi/
Edit Konfigurasi
Konfigurasi default ada di /etc/iscsi/iscsid.conf atau ~/.iscsid.conf. Buka /etc/iscsi/iscsid.conf
# vi /etc/iscsi/iscsid.conf
Set node.session.auth.username, node.session.auth.password dan parameter lainnya sebagai berikut:
node.startup = automatic node.session.auth.username = MY-ISCSI-USER node.session.auth.password = MY-ISCSI-PASSWORD discovery.sendtargets.auth.username = MY-ISCSI-USER discovery.sendtargets.auth.password = MY-ISCSI-PASSWORD node.session.timeo.replacement_timeout = 120 node.conn[0].timeo.login_timeout = 15 node.conn[0].timeo.logout_timeout = 15 node.conn[0].timeo.noop_out_interval = 10 node.conn[0].timeo.noop_out_timeout = 15 node.session.iscsi.InitialR2T = No node.session.iscsi.ImmediateData = Yes node.session.iscsi.FirstBurstLength = 262144 node.session.iscsi.MaxBurstLength = 16776192 node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536
Versi minimal sekali, ubah
node.startup = manual
menjadi
node.startup = automatic
Restart
Restart open-iscsi
/etc/init.d/open-iscsi restart
Discovery Target
Jalanan discovery terhadap iscsi target host:
# iscsiadm -m discovery -t sendtargets -p ISCSI-SERVER-IP-ADDRESS
Jika iSCSI server IP address adalah 192.168.1.100, tulis:
# iscsiadm -m discovery -t sendtargets -p 192.168.1.100
atau
# iscsiadm --mode discovery --type sendtargets --portal 192.168.1.100
Akan keluar kira-kira
# iscsiadm -m discovery -t sendtargets -p 192.168.1.100 192.168.1.101:3260,3 iqn.1992-04.com.emc:cx.ckm00100900301.a3 192.168.1.102:3260,1 iqn.1992-04.com.emc:cx.ckm00100900301.b2 192.168.1.103:3260,4 iqn.1992-04.com.emc:cx.ckm00100900301.b3 192.168.1.100:3260,2 iqn.1992-04.com.emc:cx.ckm00100900301.a2
Login menggunakan perintah
# iscsiadm --mode node --targetname iqn.1992-04.com.emc:cx.ckm00100900301.a2 --portal 192.168.1.100:3260 --login
Restart iscsi
# /etc/init.d/open-iscsi restart
Cara Cepat
Login ke iSCSI target secara cepat
iscsiadm --mode node -l
Unload iSCSI target secara cepat
iscsiadm --mode node -u
Format iSCSI Volume
Seharusnya akan ada tambahan drive misalnya /dev/sdc. Gunakan /var/log/messages untuk melihat nama device:
# tail -f /var/log/messages
Jika nama device adalah /dev/sdc, masukan langkah berikut untuk membuat partisi:
# fdisk /dev/sdc
Format partisi tersebut:
# mkfs.ext3 /dev/sdc1
Mount file system:
# mkdir /iscsi # mount /dev/sdc1 /iscsi
Referensi
- http://www.cyberciti.biz/faq/howto-setup-debian-ubuntu-linux-iscsi-initiator/
- https://help.ubuntu.com/11.10/serverguide/iscsi-initiator.html