linux如何搭建iscsi共享存储
副标题[/!--empirenews.page--] iscsi服务端IP192.168.254.172 客户端1 192.168.254.46 客户端2 192.168.254.158 一、服务端的配置 1、服务端安装scsi-target-utils [root@localhost ~]# yum install scsi-target-utils -y 2、如果有独立的分区,可以使用独立的分区,如果没有合适的分区可以dd一个大文件来作为共享磁盘 [root@localhost /]# dd if=/dev/zero of=/disk1 bs=1M count=3000 3000+0 records in 3000+0 records out 3145728000 bytes (3.1 GB) copied, 11.618 seconds, 271 MB/s 3、修改iscsi的主配置文件 [root@localhost ~]# vi /etc/tgt/targets.conf <target iqn.2013-12.com.make:ws.httpd> backing-store /disk1 </target> 4、启动tgtd服务 [root@localhost ~]# /etc/init.d/tgtd restart Stopping SCSI target daemon: Stopping target framework daemon [ OK ] Starting SCSI target daemon: Starting target framework daemon 二、客户端的配置 1、安装客户端 [root@zabbix-client1 ~]# yum install iscsi-initiator-utils -y 2、启动客户端 [root@zabbix-client1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.254.172 正在启动 iscsid:[确定] 192.168.254.172:3260,1 iqn.2013-12.com.make:ws.httpd 192.168.254.172:3260,1 iqn.2013-12.com.make:ws.mysqld 3、使用客户端发现挂载存储 [root@zabbix-client1 ~]# iscsiadm -m node -T iqn.2013-12.com.make:ws.httpd -l Logging in to [iface: default, target: iqn.2013-12.com.make:ws.httpd, portal: 192.168.254.172,3260] (multiple) Login to [iface: default, target: iqn.2013-12.com.make:ws.httpd, portal: 192.168.254.172,3260] successful. 4、在 客户端上对挂载的两个磁盘进行分区并格式化成ext4格式的文件系统 (编辑:佛山站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |