二. 存储端(target)配置
Openfiler 的配置,可以参考Oracle 的这遍文档:
2.1 启动iscsi target 服务
在Service 里面启动iscsi target。 启动之后,下次重启会自动启该服务。
2.2配置iscsi initiator访问IP
只有配置了IP才有权限访问openfiler存储。在system选项的最下面有配置选项,把IP写上即可。 注意这里的子网掩码,写的是255.255.255.255
2.3创建卷设备
现在我们来配置共享设备。 先对我们没有格式的分区格式化成扩展分区,一定要扩展分区:
[root@san ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 5221.
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)
Command (m for help): n
Command action
eextended
pprimary partition (1-4)
e
Partition number (1-4): 3
First cylinder (383-5221, default 383):
Using default value 383
Last cylinder or +size or +sizeM or +sizeK (383-5221, default 5221):
Using default value 5221
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@san ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device BootStartEndBlocksIdSystem
/dev/sda1*1255204825683Linux
/dev/sda22563821020127+82Linux swap / Solaris
/dev/sda3383522138869267+5Extended
格式化之后,我们在openfiler的网页中就能看到这个磁盘信息,如果不格式化,或者格式化错误,是无法编辑的。
页面网下拉,我们能看到创建分区:
把所有空间全部创建成一个分区,这个就是一个卷。 之后窗口会显示:
创建完成后, 选择volume Groups。
然后输入vg名称和对应的设备,确定即可。