Chinaunix首页 | 论坛 | 博客
  • 博客访问: 312997
  • 博文数量: 25
  • 博客积分: 4901
  • 博客等级: 上校
  • 技术积分: 1235
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-27 11:02
文章分类

全部博文(25)

文章存档

2009年(18)

2008年(7)

我的朋友

分类:

2008-03-19 18:52:12

It's a good practice as we don't need purchase the physical storage device but have the most the functions storage have.
 
Refer to:
 
I din't simulate the shared disk feature, as I only have two PCs.
 
Prepare:
I have two PCs, one is physical x86 PC, powered by CentOS 4.3 Final, another is VMware hosted, CentOS4.3 too.
 

[root@dec fat]# uname -a
Linux dec 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686 i686 i386 GNU/Linux

 
1> iSCSI target
I installed iSCSI target in my physical x86 PC:
# tar -xzf intel-iscsi-2.0.16.tar.gz
# cd intel-iscsi-2.0.16
# ./configure --prefix=/opt/iscsi
# make
# make install
 
run it:
[root@dec disk]# pwd
/opt/iscsi/disk
[root@dec disk]# udisk -b 512 -n 409600 -d ./iscsidisk
 
2>iSCSI initiator
I spent 3 days to complete the initiator and most of the times I was compiling kernel...
 
As CentOS 4.3 Fianl is using kernel of 2.6.9-34.EL,I think it's not suitable for intel-iscsi-2.0.16, I was always getting the error when I compiling .ko module of intel_scsi.
 
I have no src code for 2.6.9-34.EL, so I downloaded one versioned 2.6.12 and compiled it. But the compiled kernel didn't work, kernel panic. :(
 
Troubleshooting....
 
I didn't apply a initrd for the new kernel, and the VMware hosted linux's filesystem is ext3 and therefore root filesystem can be recgnized.
I fired the initrd (to add ext3.ko in)and added it to the /boot/grub/menu.lst, got kernel works finnally.
 
But intel-scsi still failed to compile. I have known that better to patch the kernel scr by intel-scsi's patch, but I didn't take care it.
 
The only clue is: patch it and recompile my kernel, and take another retry.
 
Compiling......
 
>>>That's it, I got the fresh new intel_scsi.ko :)
# ./configure --enable-2_4=/usr/src/linux
# make
# make install
 
 
Followed the steps below to know the iSCSI target:
 
Modify /etc/ips.conf
[root@db1ora10 /]# tail -1 /etc/ips.conf
ip=192.168.1.49
 
Run the script to start iSCSI initiator:
[root@db1ora10 /]# /etc/init.d/ips start
 
Then the /dev/sda is there... babala...
 
add a slice, create a filesystem, mount it:

[root@db1ora10 /]# fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 209 MB, 209715200 bytes
32 heads, 63 sectors/track, 203 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 98 98752+ 83 Linux


[root@db1ora10 /]# df -k /mnt
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 95619 5664 85018 7% /mnt

 
 
3> post testing:
see the performance testing
 

[root@db1ora10 /]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 6048320 4176900 1564180 73% /
/dev/hdb1 6192648 3190180 2687900 55% /opt/oracle
none 127716 0 127716 0% /dev/shm
/dev/sda1 95619 5664 85018 7% /mnt
[root@db1ora10 /]# uname -a
Linux db1ora10 2.6.12osd #2 Tue Mar 18 19:00:14 CST 2008 i686 i686 i386 GNU/Linux
[root@db1ora10 /]# time dd if=/dev/zero of=/test bs=4096 count=20480
20480+0 records in
20480+0 records out

real 0m13.454s
user 0m6.588s
sys 0m5.716s
[root@db1ora10 /]# time dd if=/dev/zero of=/mnt/test bs=4096 count=20480
20480+0 records in
20480+0 records out

real 0m23.985s
user 0m6.634s
sys 0m7.035s

 
See What?
To write 80M bytes to local disk spend 13 seconds, and 23 seconds for the simulated iSCSI disk.
The performance is very slow... :(
 
Think about there is an overhead of network...
 
阅读(570) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~