cookbook: Linux + SDS + iSCSI
Posted in 2008
Cool Stuffs: Linux/Desktop + SDS/MACH11 + iSCSI This is a little cookbook/step-by-step what I was tested successfully here and want to share with everybody. Is more focused how configure the linux ... the IDS part is to easy to do a cookbook :) but! if you need information how configure informix SDS, look for the Redbook "Informix Dynamic Server 11:Extending Availability and Replication" on IBM support site. Why this?: I don't like to execute and study Informix over limited vmwares machines where take a lot disk, memory space and processor, I prefer real machines...how actually I already use Linux on my work desktop and my notebook... make all this more easy. Objective: Configure SDS on IDS 11.50 UC3DE to work with Linux/Desktop at differ machines over Ethernet using iSCSI Software . About iSCSI : http://en.wikipedia.org/wiki/Iscsi Environment: - IDS 11.50 UC3 Developer - 3 Desktops machines - OpenSUSE 11 x86 32bits on server (disk storage) and node machines (IDS Primary/Secondary) - Server OpenSuse + Target iSCSI 0.4.16 ( http://iscsitarget.sourceforge.net ) - Node OpenSuse + Open-iSCSI 2.0.869 (initiator only) ( http://www.open-iscsi.org ) - linux_Sun : The Server machine where the disks are shared - lnxEarth : The client/node machine where run the SDS Primary - lnx_Moon : The client/node machine where run the SDS Secondary Considerations and limitations: - This example is just a development enviroment, NOT PRODUCTION. - I don't know if this environment are supported by IBM to a production, and I not recommend this to a production environment - Do not use the Target iSCSI version 0.4.15, have lot bugs. - At Server machine, the Target iSCSI (version 0.4.16) do not support access the physical disks with RAW, the access are made via block device ( /dev/sda ) - To node machines, the I/O throughput on disk access are limited by Ethernet speed eg.: over 100 Mbits Ethernet you will have the I/O transfer at 10 MBytes/Sec. - In this example , no tunning and no security configuration at iSCSI are made . I use the default configuration. - At node machines the IDS can access the remote disks with RAW (Open-iSCSI + RAW). but, remember, this RAW access is local to iSCSI initiator, still exists the gap over ethernet. - I'm not executed any performance tests yet to discover what is better, KAIO or AIO vp ============================================== Configuring Server Disk Machine: - My server machine information: | linux_Sun:~ # hostname | linux_Sun | | linux_Sun:~ # ifconfig eth1 | egrep "eth1|inet addr" | eth1 Link encap:Ethernet HWaddr 00:02:B3:xx:xx:xx | inet addr:172.30.252.222 Bcast:172.30.255.255 Mask:255.255.0.0 | | linux_Sun:~ # lsb_release -dr | Description: openSUSE 11.0 (i586) | Release: 11.0 | | linux_Sun:~ # ietd --version | iscsid version 0.4.16 - Here, all steps must be executed with root. - Create the partitions or cooked file to work like storage area. Here I will use the disk partition sda10 (1GB), sda11 (1GB), sda12 (3GB), sda13 (3GB) | linux_Sun:~ # fdisk -l /dev/sda | | Disk /dev/sda: 80.0 GB, 80026361856 bytes | 255 heads, 63 sectors/track, 9729 cylinders | Units = cylinders of 16065 * 512 = 8225280 bytes | Disk identifier: 0x0000fb3f | | Device Boot Start End Blocks Id System | /dev/sda1 1 262 2104483+ 82 Linux swap / Solaris | /dev/sda2 * 263 288 208845 83 Linux | /dev/sda3 289 8265 64075252+ f W95 Ext'd (LBA) | /dev/sda5 289 941 5245191 83 Linux | /dev/sda6 942 1594 5245191 83 Linux | /dev/sda7 1595 2247 5245191 83 Linux | /dev/sda8 2248 4859 20980858+ 83 Linux | /dev/sda9 4860 7291 19535008+ 83 Linux | /dev/sda10 7292 7413 979933+ da Non-FS data | /dev/sda11 7414 7535 979933+ da Non-FS data | /dev/sda12 7536 7900 2931831 da Non-FS data | /dev/sda13 7901 8265 2931831 da Non-FS data - Configure the Target iSCSI daemon on file /etc/ietd.conf. To more information about the syntax on ietd.conf, see the "man ietd.conf" This is look like my ietd.conf: | Target iqn.2008-10.galaxy.solar_system:informix.disks | Lun 0 Sectors=1000000,Type=nullio | Lun 1 Path=/dev/sda10,Type=blockio,ScsiId=0 | Lun 2 Path=/dev/sda11,Type=blockio,ScsiId=1 | Lun 3 Path=/dev/sda12,Type=blockio,ScsiId=2 | Lun 4 Path=/dev/sda13,Type=blockio,ScsiId=3 | Alias Disks_Informix The "Lun 0" are used only for test and tunning propose. - Start the Target iSCSI Daemon, and check if they are running : | linux_Sun:/etc # /etc/init.d/iscsi-target start | | linux_Sun:/etc # netstat -nltp | grep iet | tcp 0 0 0.0.0.0:3260 0.0.0.0:* LISTEN 12586/ietd | tcp 0 0 :::3260 :::* LISTEN 12586/ietd | | linux_Sun:/etc # tail /var/log/messages | . | . | Nov 7 13:56:15 linux_Sun kernel: iSCSI Enterprise Target Software - version 0.4.16 | Nov 7 13:56:15 linux_Sun kernel: iscsi_trgt: Registered io type fileio | Nov 7 13:56:15 linux_Sun kernel: iscsi_trgt: Registered io type blockio | Nov 7 13:56:15 linux_Sun kernel: iscsi_trgt: Registered io type nullio - Finish: At this point, the disks are shared over Ethernet ============================================== Configuring Node Machine (primary/secondary): - My node machine information: | lnxEarth:/etc/iscsi # hostname | lnxEarth | | lnxEarth:/etc/iscsi # ifconfig eth0 | egrep "eth0|inet addr" | eth0 Link encap:Ethernet HWaddr 00:11:D8:xx:xx:xx | inet addr:172.30.252.224 Bcast:172.30.255.255 Mask:255.255.0 | | lnxEarth:/etc/iscsi # iscsid --version | iscsid version 2.0-869 - Do you will need change a litle the config on /etc/iscsi/iscsi.conf : ATTENTION: this configuration are important to do before discovery the disks. Comment this line: | node.startup = manual and active this : | node.startup = automatic - Start the Open-iSCSI Daemon: | lnxEarth:/etc/iscsi # /etc/init.d/open-iscsi start | Starting iSCSI initiator service: done | iscsiadm: no records found! | Setting up iSCSI targets: unused - Detect remote disks : Don't worry with theses logins erros | lnxEarth:/etc/init.d # iscsi_discovery 172.30.252.222 | iscsiadm: No active sessions. | iscsiadm: Cannot modify iface.transport_name. Use iface mode to update this value. | Cannot login over tcp to portal