openfiler配置共享存储shared storage及如何在客户机发现使用共享存储卷

 

----先在使用共享存储的主机上使用如下命令找到共享存储的卷(我之前也是这样操作的,一直提示找不到记录,后来我把openfiler重新分了卷,就好了,明天再继续分析下,争取搞通这块)
--192.168.1.8为openfiler共享存储的主机
iscsiadm -m discovery -t st -p 192.168.1.8
192.168.1.8:3260,1 iqn.2006-01.com.openfiler:tsn.40678e950af8
192.168.1.8:3260,1 iqn.2006-01.com.openfiler:tsn.2e76ab1b2305
192.168.1.8:3260,1 iqn.2006-01.com.openfiler:tsn.88232589772b

 

---必须要在使用共享存储的主机上使用这个命令才能真正使用共享存储的卷,如下的iqn是源自于
[root@rhel5 by-path]# iscsiadm --mode node --targetname  iqn.2006-01.com.openfiler:tsn.88232589772b --portal 192.168.1.8:3260 --login

 

iscsiadm --mode node --targetname  iqn.2006-01.com.openfiler:tsn.88232589772b --portal 192.168.1.8:3260 --login
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.88232589772b, portal: 192.168.1.8,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.88232589772b, portal: 192.168.1.8,3260]: successful

---在使用共享存储的主机上这下就找到共享存储的卷了,另外:共享存储主机上面的共享卷是对应多个不同的iqn,要运行上面的--login多次,才会把所有相关的共享存储的共享卷在要使用共享存储的主机上面全面找到
[root@rhel5 dev]# fdisk -l

Disk /dev/sda: 11.3 GB, 11321475072 bytes
255 heads, 63 sectors/track, 1376 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1109     8908011   83  Linux
/dev/sda2            1110        1370     2096482+  82  Linux swap / Solaris

Disk /dev/sdb: 5402 MB, 5402263552 bytes
167 heads, 62 sectors/track, 1019 cylinders
Units = cylinders of 10354 * 512 = 5301248 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 335 MB, 335544320 bytes
11 heads, 59 sectors/track, 1009 cylinders
Units = cylinders of 649 * 512 = 332288 bytes

Disk /dev/sdc doesn't contain a valid partition table
[root@rhel5 dev]# iscsiadm --mode node --targetname  iqn.2006-01.com.openfiler:tsn.88232589772b --portal 192.168.1.8:3260 --login
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.88232589772b, portal: 192.168.1.8,3260]
iscsiadm: Could not login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.88232589772b, portal: 192.168.1.8,3260]:
iscsiadm: initiator reported error (15 - already exists)
[root@rhel5 dev]# iscsiadm --mode node --targetname  iqn.2006-01.com.openfiler:tsn.40678e950af8  --portal 192.168.1.8:3260 --login
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.40678e950af8, portal: 192.168.1.8,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.40678e950af8, portal: 192.168.1.8,3260]: successful
[root@rhel5 dev]# fdisk -l

Disk /dev/sda: 11.3 GB, 11321475072 bytes
255 heads, 63 sectors/track, 1376 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1109     8908011   83  Linux
/dev/sda2            1110        1370     2096482+  82  Linux swap / Solaris

Disk /dev/sdb: 5402 MB, 5402263552 bytes
167 heads, 62 sectors/track, 1019 cylinders
Units = cylinders of 10354 * 512 = 5301248 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 335 MB, 335544320 bytes
11 heads, 59 sectors/track, 1009 cylinders
Units = cylinders of 649 * 512 = 332288 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 167 MB, 167772160 bytes
6 heads, 54 sectors/track, 1011 cylinders
Units = cylinders of 324 * 512 = 165888 bytes

Disk /dev/sdd doesn't contain a valid partition table
[root@rhel5 dev]#

 

---测试下重启使用共享存储的共享卷的主机是否可以继续看到共享存储的共享卷


--如果是2个rac节点,要在每个rac节点上运行如上命令,查找及登陆发现;
然后在一个 rac 节点分区即可,另一个 rac节点可以自动同步获知分区信息

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-759778/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9240380/viewspace-759778/

你可能感兴趣的:(openfiler配置共享存储shared storage及如何在客户机发现使用共享存储卷)