设为首页 收藏本站
查看: 1105|回复: 0

[经验分享] Open Filer安装及连接WIN\linux主机

[复制链接]

尚未签到

发表于 2019-1-27 08:04:38 | 显示全部楼层 |阅读模式
转载1.安装iscsi initiator
  #rpm –ivh iscsi.initiator.rpm
2.编辑iscsi配置文件
  编辑/etc/iscsi.conf加入以下行
  DiscoveryAddress=172.16.11.250
  Continuous=yes
  SendAsyncText=yes
  
  其中172.16.11.250是OPENFILER的IP地址
  
3.启动iscsi服务
  [root@mylinux  etc]# chkconfig iscsi on
  [root@mylinux etc]# chkconfig --list |grep scsi
  iscsi           0:off   1:off    2:on    3:on    4:on     5:on    6:off
  
  [root@mylinux  etc]# service iscsi restart
  Searching for iscsi-based multipath maps
  Found 0 maps
  Stopping iscsid: iscsid not running
  Checking iscsi config:  [  OK   ]
  Loading iscsi driver:  [  OK   ]
  mknod: `/dev/iscsictl': File exists
  Starting iscsid: [  OK  ]
  
  [root@mylinux etc]# iscsi-ls
  *******************************************************************************
  SFNet iSCSI Driver Version ...4:0.1.11-4(15-Jan-2007)
  *******************************************************************************
  TARGET NAME             :  iqn.2006-01.com.openfiler:ricky.vote
  TARGET ALIAS            :

  HOST>
  BUS >
  TARGET>  TARGET ADDRESS          :  172.16.11.250:3260,1
  SESSION STATUS          :  ESTABLISHED AT Thu Oct  1 00:00:07 CST  2009

  SESSION>  *******************************************************************************
  [root@mylinux etc]# iscsi-rescan
  Rescanning host1
4.识别openfiler存储
  [root@mylinux openfiler]#  iscsi-iname
  iqn.1987-05.com.cisco:01.a1577bbb48ad
  [root@mylinux etc]# fdisk  -l
  Disk /dev/sda: 8589 MB, 8589934592 bytes
  255  heads, 63 sectors/track, 1044 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sda1   *           1          13      104391    83  Linux
  /dev/sda2              14          89      610470    82  Linux swap
  /dev/sda3              90        1044     7671037+   83  Linux
  
  Disk /dev/sdb: 2147 MB, 2147483648 bytes
  255  heads, 63 sectors/track, 261 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sdb1               1         261     2096451     5  Extended
  /dev/sdb5               1          74      594342    83  Linux
  /dev/sdb6              75         136      497983+   83  Linux
  /dev/sdb7             137         173      297171    83  Linux
  /dev/sdb8             174         186      104391    83  Linux
  /dev/sdb9             187         199      104391    83  Linux
  /dev/sdb10            200         206       56196    83  Linux
  /dev/sdb11            207         213       56196    83  Linux
  /dev/sdb12            214         220       56196    83  Linux
  /dev/sdb13            221         223       24066    83  Linux
  
  Disk /dev/sdc: 2147 MB, 2147483648 bytes
  255  heads, 63 sectors/track, 261 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sdc1               1         261     2096451     5  Extended
  /dev/sdc5               1           7       56164+   83  Linux
  /dev/sdc6               8          20      104391    83  Linux
  /dev/sdc7              21          27       56196    83  Linux
  /dev/sdc8              28          30       24066    83  Linux
  /dev/sdc9              31          33       24066    83  Linux
  
  Disk /dev/sdd: 100 MB, 100663296  bytes
  4 heads, 48 sectors/track, 1024  cylinders
  Units = cylinders of 192 * 512 = 98304  bytes
  
  Disk /dev/sdd doesn't contain a valid partition table
  [root@mylinux etc]#
  
  [root@mylinux etc]# iscsi-device  /dev/sdd
  /dev/sdd is an iSCSI device
  [root@mylinux etc]#
  
5.分区并创建文件系统
  [root@mylinux etc]# fdisk /dev/sdd
  
  Command (m for help): m
  Command action
  a   toggle a bootable flag
  b   edit bsd disklabel
  c   toggle the dos compatibility  flag
  d   delete a partition
  l   list known partition types
  m   print this menu
  n   add a new partition
  o   create a new empty DOS partition  table
  p   print the partition table
  q   quit without saving  changes
  s   create a new empty Sun  disklabel

  t   change a partition's system >  u   change display/entry units
  v   verify the partition table
  w   write table to disk and  exit
  x   extra functionality (experts  only)
  
  Command (m for help): n
  Command action
  e   extended
  p   primary partition (1-4)
  p
  Partition number (1-4): 1
  First cylinder (1-1024, default 1):
  Using default value 1
  Last cylinder or +size or +sizeM or +sizeK (1-1024, default 1024):
  Using default value 1024
  
  Command (m for help): w

  The  partition table has been>  
  Calling ioctl() to re-read partition table.
  Syncing disks.
  [root@mylinux etc]# fdisk -l /dev/sdd
  
  Disk /dev/sdd: 100 MB, 100663296 bytes
  4  heads, 48 sectors/track, 1024 cylinders
  Units = cylinders of 192 * 512 = 98304 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sdd1               1        1024       98280    83  Linux
  [root@mylinux etc]# mkfs -t ext3  /dev/sdd1
  mke2fs 1.35 (28-Feb-2004)
  Filesystem label=
  OS  type: Linux

  Block>
  Fragment>  24576 inodes, 98280 blocks
  4914 blocks (5.00%) reserved for the super user
  First data block=1
  Maximum filesystem blocks=67371008
  12  block groups
  8192 blocks per group, 8192 fragments per group
  2048 inodes per group
  Superblock backups stored on blocks:
  8193, 24577, 40961, 57345,  73729
  
  Writing inode tables: done
  Creating journal (4096 blocks): done
  Writing superblocks and filesystem accounting information:  done
  
  This filesystem will be automatically checked every 26 mounts  or
  180  days, whichever comes first.  Use tune2fs  -c or -i to override.
  [root@mylinux etc]#
  
6.读写测试
  [root@mylinux etc]# mount /dev/sdd1  /openfiler
  [root@mylinux etc]# df -h

  Filesystem           >  /dev/sda3              7.3G  3.5G   3.5G  51% /
  /dev/sda1               99M  8.6M    86M  10% /boot
  none                   157M     0   157M   0% /dev/shm
  /dev/sdd1               93M  5.6M    83M   7% /openfiler
  [root@mylinux etc]#
  
  [root@mylinux /]# tar -cvf  /openfiler/var.tar /var
  /var/www/manual/mod/module-dict.html.ko.euc-kr
  /var/www/manual/mod/index.html.de
  /var/www/manual/mod/mpm_winnt.html.es
  /var/www/manual/mod/mod_info.html.ja.euc-jp
  /var/www/manual/mod/mod_dav.html
  /var/www/manual/mod/mpm_winnt.html.en
  /var/www/manual/mod/mod_imap.html
  /var/www/manual/mod/mod_status.html.ja.euc-j
  
  [root@mylinux openfiler]# ls
  lost+found   var.tar
  [root@mylinux openfiler]#
  
  [root@mylinux  openfiler]# df -h

  Filesystem           >  /dev/sda3              7.3G  3.5G   3.5G  51% /
  /dev/sda1               99M  8.6M    86M  10% /boot
  none                   157M     0   157M   0% /dev/shm
  /dev/sdd1               93M   75M    14M  85% /openfiler
  [root@mylinux openfiler]#
  
  
  
  
  
  
  
  


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-668033-1-1.html 上篇帖子: fopen和open函数的区别 下篇帖子: Open×××网桥模式实现LAN
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表