openfiles 配置管理地址: https://192.168.62.238:446/ //openfiles 安裝服務器)
節點1服務器安裝iscsi客戶端包,並掛載磁盤:
[root@node1 opt]# rpm -qa |grep iscsi
[root@node1 opt]# rpm -ivh iscsi-initiator-utils-6.2.0.871-0.20.el5_5.i386.rpm
warning: iscsi-initiator-utils-6.2.0.871-0.20.el5_5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 192a7d7d
Preparing... ########################################### [100%]
1:iscsi-initiator-utils ########################################### [100%]
[root@node1 opt]# service iscsi start
iscsid is stopped
Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: iscsiadm: No records found!
[ OK ]
[root@node1 opt]# chkconfig --list |grep iscsi
iscsi 0:off 1:off 2:off 3:on 4:on 5:on 6:off
iscsid 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@node1 opt]# iscsiadm -m discovery -t sendtargets -p 192.168.62.238:3260
192.168.62.238:3260,1 iqn.2006-01.com.openfiler:tsn.045e630ffbf1
[root@node1 opt]# iscsiadm -m node -p 192.168.62.238 -l login
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.045e630ffbf1, portal: 192.168.62.238,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.045e630ffbf1, portal: 192.168.62.238,3260]: successfulnode
節點2服務器安裝iscsi客戶端包,並掛載磁盤:
[root@node2 opt]# rpm -qa |grep iscsi
[root@node2 opt]# rpm -ivh iscsi-initiator-utils-6.2.0.871-0.20.el5_5.i386.rpm
warning: iscsi-initiator-utils-6.2.0.871-0.20.el5_5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 192a7d7d
Preparing... ########################################### [100%]
1:iscsi-initiator-utils ########################################### [100%]服務器
[root@node2 opt]# service iscsi start
iscsid is stopped
Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: iscsiadm: No records found!
[ OK ]
[root@node2 opt]# iscsiadm -m discovery -t sendtargets -p 192.168.62.238:3260
192.168.62.238:3260,1 iqn.2006-01.com.openfiler:tsn.045e630ffbf1
[root@node2 opt]# iscsiadm -m node -p 192.168.62.238 -l login
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.045e630ffbf1, portal: 192.168.62.238,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.045e630ffbf1, portal: 192.168.62.238,3260]: successfulide
將掛載好的磁盤進行磁盤劃分(此操做只須要在1個節點操做便可):
[root@node2 /]# fdisk -lui
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesthis
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 216 1534207+ 82 Linux swap / Solaris
/dev/sda3 217 1566 10843875 83 Linuxci
Disk /dev/sdb: 21.4 GB, 21441282048 bytes //掛載上的存儲磁盤
64 heads, 32 sectors/track, 20448 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytesrem
Disk /dev/sdb doesn't contain a valid partition table
[root@node2 /]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.get
The number of cylinders for this disk is set to 20448.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)it
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-20448, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-20448, default 20448): +120Mio
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (116-20448, default 116):
Using default value 116
Last cylinder or +size or +sizeM or +sizeK (116-20448, default 20448): +120M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (231-20448, default 231):
Using default value 231
Last cylinder or +size or +sizeM or +sizeK (231-20448, default 20448): +120M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Selected partition 4
First cylinder (346-20448, default 346):
Using default value 346
Last cylinder or +size or +sizeM or +sizeK (346-20448, default 20448):
Using default value 20448
Command (m for help): n
First cylinder (346-20448, default 346):
Using default value 346
Last cylinder or +size or +sizeM or +sizeK (346-20448, default 20448): +200M
Command (m for help): n
First cylinder (538-20448, default 538):
Using default value 538
Last cylinder or +size or +sizeM or +sizeK (538-20448, default 20448): +200M
Command (m for help): n
First cylinder (730-20448, default 730):
Using default value 730
Last cylinder or +size or +sizeM or +sizeK (730-20448, default 20448): +4500M
Command (m for help): n
First cylinder (5023-20448, default 5023):
Using default value 5023
Last cylinder or +size or +sizeM or +sizeK (5023-20448, default 20448): +4500M
Command (m for help): n
First cylinder (9316-20448, default 9316):
Using default value 9316
Last cylinder or +size or +sizeM or +sizeK (9316-20448, default 20448): +4500M
Command (m for help): n
First cylinder (13609-20448, default 13609):
Using default value 13609
Last cylinder or +size or +sizeM or +sizeK (13609-20448, default 20448): +4500M
Command (m for help): n
First cylinder (17902-20448, default 17902):
Using default value 17902
Last cylinder or +size or +sizeM or +sizeK (17902-20448, default 20448):
Using default value 20448
Command (m for help): p
Disk /dev/sdb: 21.4 GB, 21441282048 bytes
64 heads, 32 sectors/track, 20448 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 115 117744 83 Linux
/dev/sdb2 116 230 117760 83 Linux
/dev/sdb3 231 345 117760 83 Linux
/dev/sdb4 346 20448 20585472 5 Extended
/dev/sdb5 346 537 196592 83 Linux
/dev/sdb6 538 729 196592 83 Linux
/dev/sdb7 730 5022 4396016 83 Linux
/dev/sdb8 5023 9315 4396016 83 Linux
/dev/sdb9 9316 13608 4396016 83 Linux
/dev/sdb10 13609 17901 4396016 83 Linux
/dev/sdb11 17902 20448 2608112 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.Syncing disks.