1. 安装iscsi (文件iscsi-initiator-utils-6.2.0.871-0.10.el5.x86_64.rpm在系统光盘可以找到)   rpm -ivh iscsi-initiator-utils-6.2.0.871- 0.10.el5.x86_64.rpm

2. 编辑iscsi.conf文件   vi /etc/iscsi.conf   文件末尾添加如下内容: 
  DiscoveryAddress=10.8.0.105 <磁盘阵列IP Address>   这就需要指定到你的UIT阵列的Group IP Address   SendAsyncText=yes 
  Initiator能从客户端接收到Vendor Specific的同步事件   Continuous=yes 
  为了能指定全部依然打开的会话

3. 配置iscsi.conf文件   # service iscsi start 
  为了验证iscsi服务在启动时将会生效,可以使用下面给出的chkconfig命令:   # chkconfig --list iscsi 
  iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off 
  在默认状态下,新添加的iscsi Initiator在启动后并不能自动工作,所以需要把每一个管理级别都设置为“关 闭”的状态。要想在启动后生效,使用下面的chkconfig命令就可以了:   # chkconfig -- add iscsi   # chkconfig iscsi on

上面的两个命令首先检查是否有必要的脚本来启动和停止这项服务,然后把服务指定到正确的管理级别上。然后检查这些更改是否生效: 
4. 配置iscsi.conf文件 
4 输入命令fdisk -1,查看当前应用服务器所有硬盘信息,界面显示如下。 Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes 
   Device Boot      Start         End      Blocks   Id  System /dev/sda1               1        1275    10241406   82  Linux swap /dev/sda2            1276        4463    25607610   83  Linux Disk /dev/sdb: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 2074 * 512 = 1061888 bytes Disk /dev/sdb doesn't contain a valid partition table 说明 
本例中有 1个LUN 映射给该应用服务器作为该应用服务器的逻辑硬盘 sdb。

5. 为sdb 创建文件系统 #mkfs.ext3 /dev/sdb1 界面显示如下。 
mke2fs 1.38 (30-Jun-2005) 
/dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y

Filesystem label= OS type: Linux 
Block size=4096 (log=2) Fragment size=4096 (log=2) 131072 inodes, 262144 blocks 
13107 blocks (5.00%) reserved for the super user First data block=0 8 block groups 
32768 blocks per group, 32768 fragments per group 16384 inodes per group 
Superblock backups stored on blocks:         32768, 98304, 163840, 229376 Writing inode tables: done 
Creating journal (8192 blocks): done 
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 
180 days, whichever comes first.  Use tune2fs -c or -i to override.

6、使用如下命令创建目录(请根据实际情况命名目录名称): # mkdir /directoryname

7、将设备挂载到已创建的目录上: # mount /dev/sdb1 /directoryname  
到此,配置完成!

Linux下挂载存储设备的更多相关文章

  1. Oracle Enterprise Linux 6.4 下挂载ISCSI 设备

    Oracle Enterprise Linux 6.4 下挂载ISCSI 设备一.发现① 要求安装iscsi客户端软件   yum install iscsi-initiator-utils ② 发现 ...

  2. Linux下挂载NTFS格式的U盘或硬盘

    我们知道在Linux下挂载fat32的U盘非常容易,使用mount /dev/drive_name /mnt/指定目录这样就可以挂载了,但是如果U盘或者硬盘的格式是NTFS的话,那么Linux是不能识 ...

  3. linux下挂载U盘

    转:http://www.cnblogs.com/yeahgis/archive/2012/04/05/2432779.html linux下挂载U盘 一.Linux挂载U盘: 1.插入u盘到计算机, ...

  4. VMware,win7与linux centos6.4文件互传,linux下挂载windows共享文件夹,vmware tools安装方法

    本方法是以win7,VMware9.0.1 ,centos6.4为基础实验的. 对于linux的初级使用阶段,都会Windows中使用linux虚拟机VMWare或者其它的.在Windows与linu ...

  5. linux下挂载ISCSI存储设备

    安装 首先要在存储设备上做好RAID,设置好iSCSI 目标方(target). 这里主要说明iSCSI initiator的安装. 不同的操作系统对应各自的iSCSI initiator,以Redh ...

  6. Azure上如何在Linux下挂载数据磁盘

    [原文首次发表于51cto http://cloudapps.blog.51cto.com/3136598/1653672] 在Azure上创建了虚拟机之后,我们在一些情况下会需要添加更多的数据磁盘来 ...

  7. Linux系统中存储设备的两种表示方法

    转:https://blog.csdn.net/holybin/article/details/38637381 一.对于IDE接口的硬盘的两种表示方法: 1.IDE接口硬盘,对于整块硬盘的两种表示方 ...

  8. linux下的块设备驱动(一)

    块设备的驱动比字符设备的难,这是因为块设备的驱动和内核的联系进一步增大,但是同时块设备的访问的几个基本结构和字符还是有相似之处的. 有一句话必须记住:对于存储设备(硬盘~~带有机械的操作)而言,调整读 ...

  9. linux下挂载VHD等虚拟磁盘文件

    1.RAW格式虚拟磁盘 linux下可以直接挂载raw格式的虚拟磁盘镜像文件. 例如,这里先用dd命令创建一个文件,然后将其格式化为ext4格式(只有一个分区),然后挂载到/mnt目录. 下面的raw ...

随机推荐

  1. debian8.2安装kubernetes

    master上通过kubeadm安装Kubernetes 添加国内阿里源后安装kubeadm: deb https://mirrors.aliyun.com/kubernetes/apt/ kuber ...

  2. DFS(7)——poj1011Sticks

    一.题目回顾 题目链接:Sticks 题意:给出一定数量的小木棒的长度,它是由等长的若干木棒随意砍断所得到的.对于给定的一组小木棒,请求出原始木棒的最小长度. 二.解题思路 DFS+剪枝 本题剪枝不到 ...

  3. NO1——线段树

    /* 数组存储 */ /* 预处理 */ #include <iostream> #include <cstdio> #include <algorithm> #i ...

  4. STL中mem_fun与mem_fun_ref的区别[转]

    http://www.cnblogs.com/Purple_Xiapei/archive/2012/05/27/2520483.html STL中mem_fun和mem_fun_ref的用法 分类:  ...

  5. LTE:上行调度请求(Scheduling Request,SR) LTE:下行资源分配类型

    http://blog.sina.com.cn/s/blog_927cff010101a7yh.html 上行调度请求(Scheduling Request,SR) 如果UE没有上行数据要传输,eNo ...

  6. js定时器实现图片轮播

    效果展示如下: setInterval(moverleft,3000);定时器设置为3秒,而且实现图片下方的小圆点序号跟图片对应,点击小圆点也能切换图片. 代码如下: <!DOCTYPE htm ...

  7. about !dbgprint to analyze BSOD dump file.

    基本规则: 只有debug mode enable的机器,产生的dump file才会保存dbgprint的buffer. 默认!dbgprint的buffer size是4k. 增加buffer s ...

  8. Access-Control-Allow-Methods: OPTIONS & CORS

    Access-Control-Allow-Methods: OPTIONS CORS https://stackoverflow.com/questions/20478312/default-valu ...

  9. Github & DMCA Takedown Policy

    Github & DMCA Takedown Policy Digital Millennium Copyright Act 数字千年版权法案 https://help.github.com/ ...

  10. Linux笔记二

    用户和组 添加一个tom用户,设置它属于users组,并添加注释信息分步完成:useradd tom usermod -g users tom usermod -c "hr tom" ...