使用OpenFiler实现共享存储

使用OpenFiler实现共享存储

一、什么是OpenFiler

Openfiler是在rPath Linux基础上开发的,它能够作为一个独立的Linux操作系统发行。Openfiler是一款非常好的存储管理操作系统,开源免费,通过web界面对存储磁盘的管理,支持现在流行的网络存储技术IP-SANNAS,支持iSCSIInternet Small Computer System Interface, 学名ISCSI HBA)、NFSSMB/CIFSFTP等协议。

OpenFiler下载地址:http://www.openfiler.com/

二、使用VMWare 安装OpenFiler

使用VMWare workstation 12新建一台虚拟机,操作系统类型选择RHEL5_x64,磁盘大小为10g,内存1G,网络类型选择仅主机模式。将下载好的OpenFiler放入虚拟光驱并开机。进入如下界面

clip_image002[5]clip_image004[4]

clip_image006[4]clip_image008[4]clip_image010[4]clip_image012[4]clip_image014[4]clip_image016[4]clip_image018[4]

安装完成后点击重启

 

重启后界面如下

clip_image020[4]

三、使用OpenFiler搭建虚拟共享存储

为在虚拟机中添加一块10G的硬盘,作为共享盘

打开浏览器输入开机后画面中提示的地址进行管理,默认用户名为openfiler,密码为passwordclip_image021[4]

 

创建一个新的VG

clip_image023[5]clip_image025[4]clip_image027[4]

clip_image029[4]clip_image031[4]clip_image033[4]clip_image035[4]

 

clip_image037[4]clip_image039[4]clip_image041[4]

映射成功,接下来在客户端进行挂载

四、在客户端挂载

打开一台虚拟机作为客户端

使用yum安装ISCSI initiator

[root@oracle ~]# yum install iscsi-initiator-utils -y
[root@oracle ~]# service iscsi start

发现iSCSI目标

[root@oracle ~]# iscsiadm -m discovery -t sendtargets -p 192.168.100.50:3260
Starting iscsid:                                           [  OK  ]
192.168.100.50:3260,1 iqn.2006-01.com.openfiler:tsn.c6fc8c4f1e65

登陆target

[root@oracle ~]# iscsiadm -m node -p 192.168.100.50:3260 -l
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.c6fc8c4f1e65, portal: 192.168.100.50,3260] (multiple)
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.c6fc8c4f1e65, portal: 192.168.100.50,3260] successful.

此时使用fdisk -l可查看到系统上多了一块磁盘

[root@oracle ~]# fdisk -l

格式化磁盘并进行挂载

[root@oracle ~]# mkfs.ext4 /dev/sdd
[root@oracle ~]# mount /dev/sdd /mnt
[root@oracle ~]# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sr0 on /mnt/rom type iso9660 (ro)
/dev/sdd on /mnt type ext4 (rw)

开启另一台虚拟机执行同样的操作,然后进行挂载

此时两台主机共用一块硬盘

注销iSCSI

[root@oracle ~]# iscsiadm --mode node --targetname iqn.2006-01.com.openfiler:tsn.c6fc8c4f1e65 --portal 192.168.100.50:3260 --logout
Logging out of session [sid: 1, target: iqn.2006-01.com.openfiler:tsn.c6fc8c4f1e65, portal: 192.168.100.50,3260]
Logout of [sid: 1, target: iqn.2006-01.com.openfiler:tsn.c6fc8c4f1e65, portal: 192.168.100.50,3260] successful.

 

转载于:https://www.cnblogs.com/lord-dang/p/6371912.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值