redhat创建并挂载scsi磁盘测试

更新时间:2023-06-07 11:11:20 阅读: 评论:0

redhat创建并挂载scsi磁盘测试
实验设备:
    用虚拟机虚拟两个 redhat linux 6.3 -64bit 系统,并配置好yum
ip设置:
    scsi服务端:10.1.1.222
    scsi客户端(挂载端):10.1.1.1
实验开始:
1、在服务端安装软件并配置好共享的磁盘,首先在虚拟机中新加入一块硬盘,大小随意。(这里添加100G)
   
[root@localhost ~]# fdisk -l
 
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 ctors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005bb6c
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26         281     2048000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             281        2611    18717696   83  Linux
 
Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 ctors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077087
 
   Device Boot      Start         End      Blocks   Id  System
2、安装scsi服务端软件
   
yum install scsi-target-utils -y
    共享磁盘(在配置文件中加入以下代码即可)
vim /etc/f 
    <target ample:rver.target1>
        backing-store /dev/sdb
    </target>
    启动服务
1
rvice tgtd restart
    关闭防火墙和linux
3、在客户端安装客户端软件,并设置挂载
    安装客户端软件
yum install iscsi-initiator-utils -y
    查看是否有共享磁盘
iscsiadm --mode discoverydb --type ndtargets --portal 10.1.1.222 --discover
出现以下则表示有共享磁盘 10.1.1.222:3260,1 ample:rver.target1
    挂载磁盘
iscsiadm --mode node --targetname ample:rver.target1 --portal 10.1.1.222:3260 --login
注意:中间2008-09这段是填写上面查询出来的那个磁盘名
    成功挂载后有以下提示
[root@localhost ~]#  iscsiadm --mode node --targetname ample:rver.target1 --portal 10.1.1.222:3260 --login
Logging in to [iface: default, target: ample:rver.target1, portal: 10.1.1.222,3260] (multiple)
Login to [iface: default, target: ample:rver.target1, portal: 10.1.1.222,3260] successful.
    查看以下挂载成功没有
[root@localhost ~]# fdisk -l
 
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 ctors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00036380
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26         281     2048000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             281        2611    18717696   83  Linux
 
Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 ctors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077087
 
   Device Boot      Start         End      Blocks   Id  System
成功挂载100G硬盘。
实验结束

本文发布于:2023-06-07 11:11:19,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/zhishi/a/1686107480212738.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:redhat创建并挂载scsi磁盘测试.doc

本文 PDF 下载地址:redhat创建并挂载scsi磁盘测试.pdf

标签:磁盘   挂载   软件   共享   实验   客户端
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 实用文体写作网旗下知识大全大全栏目是一个全百科类宝库! 优秀范文|法律文书|专利查询|