openfiler配置共享儲存shared storage及如何在客戶機發現使用共享儲存卷

wisdomone1發表於2013-05-05

 

----先在使用共享儲存的主機上使用如下命令找到共享儲存的卷(我之前也是這樣操作的,一直提示找不到記錄,後來我把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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章