Add LUN on Centos using iscsi

1. Nama iscsi
cat /etc/iscsi/initiatorname.iscsi

2. Edit File
vi /etc/iscsi/iscsid.conf
Isi sesuai dengan storage
# To enable CHAP authentication set node.session.auth.authmethod
# to CHAP. The default is None.
node.session.auth.authmethod = CHAP

# To set a CHAP username and password for initiator
# authentication by the target(s), uncomment the following lines:
node.session.auth.username = iqn.1994-05.com.redhat:4eaa355a3e87
node.session.auth.password = CHAPsecret11

# To set a CHAP username and password for target(s)
# authentication by the initiator, uncomment the following lines:
node.session.auth.username_in = chapuser
node.session.auth.password_in = CHAPsecret22

3. Check target
iscsiadm -m discovery -t sendtargets -p zfs7420

4. restart service
iscsiadm -m node -p zfs7420 -l

5. Check disk
fdisk -l

6.check label
e2label /dev/sdc1

7. Buat folder shared nya

8. edit /etc/fstab
[root@dtodrcapp3 /]# vi /etc/fstab

LABEL=/1                /                       ext3    defaults        1 1
LABEL=/opt1             /opt                    ext3    defaults        1 2
LABEL=/boot1            /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
LABEL=/OLTP_NAS         /oltp_nas               ext3    _netdev         0 0
LABEL=/OLAP_NAS         /olap_nas               ext3    _netdev         0 0
LABEL=/FTP_NAS          /ftp_nas                ext3    _netdev         0 0

0 comments:

sealkazzsoftware.blogspot.com resepkuekeringku.com