iSCSI Services in Linux

Source: Internet
Author: User

###############
First step: Create a 2G partition
Step two: Yum install targetcli-y step three: Create a 2G partition and synchronize
Fourth Step: Execute TAGETCLI
LS View
/>/backstores/block Create westos:storage1/dev/vdb1 set/DEV/VDB1 as a shared hard drive and name
/>/ISCSI Create iqn.2018-08.com.westos:storage1 generate external share name
/> Iscsi/iqn.2018-08.com.westos:storage1/tpg1/acls Create Iqn.2018-08.com.westos:westoskey1 key generation
/> Iscsi/iqn.2018-08.com.westos:storage1/tpg1/luns Create/backstores/block/westos:storage1 associating an external name with an internal device
/> iscsi/iqn.2018-08.com.westos:storage1/tpg1/portals Create 172.25.254.204 Open Interface exit Save and exit

##############################################################
Client settings
Yum Install iscsi-initiator-utils-y Installation
Iscsiadm-m discovery-t st-p 172.25.254.204 View the ports that can be connected
Iscsiadm-m node-t iqn.2018-08.com.westos:storage1-p 172.25.254.204-l landed on this port at this time the login port will be found to be a failure, Because there is no password entered on the server-side set Key1
VIM/ETC/ISCSI/INITIATORNAME.ISCSI edit this file, set the password
Initiatorname=iqn.2018-08.com.westos:key1
Systemctl Restart Iscsid.service Restart this service

Iscsiadm-m node-t iqn.2018-08.com.westos:storage1-p 172.25.254.204-l login again, login successfully, at this time fdisk-l can display SDA hard disk
FDISK/DEV/SDA Creating a new partition


MKFS.XFS/DEV/SDA1 Formatting partitions
mount/dev/sda1/mnt/Mount Partition


Df-h
Vim/etc/fstab setting up auto mount on boot
/DEV/SDA1/MNT/XFS Defaults,netdev 0 0 Since this mount can only be mounted after the network service is started, the default parameters are added, _netdev

Mount-a
Df-h #####################
Delete and logout of SDB1 on client
Vim/etc/fstab Canceling the default mount
UMOUNT/DEV/SDA1 Uninstall
Dfisk-l See Also
Exit Login
[Email protected] ~]# iscsiadm-m node-t iqn.2018-08.com.westos:storage1-p 172.25.254.204-u
Delete a node
[Email protected] ~]# iscsiadm-m node-t iqn.2018-08.com.westos:storage1-p 172.25.254.204-o Delete
Yum Install tree tree/var/lib/iscsi/view
Systemctl Restart iSCSI
Fdisk-l found success at this time ############## #服务器上的删除
Targetcli
Clearconfig
Clearconfig Confirm=true
Ls
Exit


iSCSI Services in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.