ISCSI target configuration

Issues related to configuring your network
cvisual
Posts: 13
Joined: 2011/08/02 15:01:47

ISCSI target configuration

Post by cvisual » 2011/08/02 15:28:05

Hi all

Im newbie in Linux, beside using Centos 5 for a while in a basic setup for share some storage on my network over IP/Samba.
Now I upgrade my HDs and Im installing Centos 6.
Im using a Proliant DL380G4 with 6x146Gb SCSI disks. Now I will try to setup ISCSI SAN setup. I already saw some how-tos on net, but my first issue is about basic configuration, I mean, whats the best solution/config...

As ISCSI is a protocol, I need on Centos initial Install/Setup to make 2 partitions - one for OS and other for ISCSI storage, or make only one initial partition and make volumes, volume groups, logical volume, etc later?
About this initial partitions, I need to separate a complete disk or can I split part of one disk to OS and the rest to join with other remain disks to Storage?
On SmartArray setup I make only one partition with all disks. Its fine? Or is better to split in 2 partitions on these step...
And about the rest of setup of ISCSI i think in use this howto: http://www.server-world.info/en/note?os=CentOS_6&p=iscsi
(I will need to setup other values for storage space, I think)

Weel, my goal is share a storage/folder over my LAN to use in a 3D render environment.


Kind regards

AT

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

ISCSI target configuration

Post by pschaff » 2011/08/02 19:30:48

Disclaimer: I have not used iSCSI; however, I'd go about it this way:

1. Install CentOS to the first SCSI disk using the standard partitioning and LVM setup.
2. Create a software RAID5 with the remaining disks. This can be configured at install time, or later. Doing it at install time may be easier as you can use the GUI tools. To do that use the Custom option, or review and modify option.
3. Create LVM using the RAID device and set up iSCSI following the link you provided. The LVM setup part and selection of scsi-target-utils can also be done during the install.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ISCSI target configuration

Post by TrevorH » 2011/08/03 17:54:03

[quote]
Create a software RAID5 with the remaining disks
[/quote]

By the sounds of it, on a DL360 G4 with mention of a 'SmartArray' in the original post, I suspect the OP has a hardware RAID controller installed on that machine, probably using the cciss kernel driver. Software RAID is probably not necessary.

cvisual
Posts: 13
Joined: 2011/08/02 15:01:47

Re: ISCSI target configuration

Post by cvisual » 2011/08/03 20:01:18

Hi Phill and Trevor
Thanks for your help.

My problem now reside on ISCSI itself... Maybe I do some wrong step; I dont know.

Well, as Trevor said, Im using SmartArray/hardware.
I install on first disk all OS (Centos6) and the remaining I make an raid0 (I will do backups to a USB storage 24/24h).
To do that, after setup the raid on HPs SmartArray setup, all OS setup was done in text mode
(I have a problem when I try to do everithing on initial install - after all setup the system dont boot...)
So after install Centos, I do the following steps: (using google for help...)

fdisk /dev/cciss/c0d1
pvcreate /dev/cciss/c0d1p1
vgcreate vg_data /dev/cciss/c0d1p1
lvcreate --name lv_data --size 683.63G vg_data
mkfs.ext4 /dev/vg_data/lv_data

after that I edit the targets.conf to add a following lines at end:


backing-store /dev/vg_data/lv_data



note: I dont understand if the target name has any influence on my setup beside the name itself...
anyway, I using static IPs, with no domains, so the target name for server (DL380G4) has no sense for me...

After that I start the tgtd daemon, and I have the following output by tgtadm --mode target --op show :


Target 1: iqn.2012-08.DL380G4:target0
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB
Online: Yes
Removable media: No
Backing store type: rdwr
Backing store path: None
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 734045 MB
Online: Yes
Removable media: No
Backing store type: rdwr
Backing store path: /dev/vg_data/lv_data
Account information:
ACL information:
ALL


Beside this looks fine, I cant logon on a windows machine with a strange error:

The target name is not found or is marked as hidden from login

Any Idea whats happening?

kind regards

Antonio

cvisual
Posts: 13
Joined: 2011/08/02 15:01:47

Re: ISCSI target configuration

Post by cvisual » 2011/08/11 15:21:26

Almost Solved...

The problem was in iqn name...
The name on 2 machines need be the same, lower case only (mixed doesn't works).

open firewall to port 3260 on both machines (Win on firewall settings) and on Centos I used:

iptables -I INPUT -p tcp –dport 3260 -j ACCEPT
iptables -I INPUT -p udp –dport 3260 -j ACCEPT
iptables -I INPUT -p tcp –dport 3260 -j ACCEPT

Now the Windows boxes can Read and Write the disk.
The new issue is about mount this disk on Centos...

For enable this disk on Win, I need to use NTFS.

on fdisk I create a partition with NTFS (fdisk partition ID 7)


I get this info with fdisk /dev/cciss/c0d1 :

Disk /dev/cciss/c0d1: 734.1 GB, 734054440960 bytes
255 heads, 63 sectors/track, 89243 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf80f0dee

Device Boot Start End Blocks Id System
/dev/cciss/c0d1p1 1 89243 716844366 7 HPFS/NTFS

On Windows machine I can format and mount this disk (NTFS)
In fact I can read and write files from different windows boxes...

The problem is I cant mount this partition on Centos.
I follow this tutorial :
http://wiki.centos.org/TipsAndTricks/NTFS (beside some others...)


when I try:
ntfs-3g /dev/cciss/c0d1p1 /mnt/PROJECTS

I got this error:

NTFS signature is missing.
Failed to mount '/dev/cciss/c0d1p1': Invalid argument
The device '/dev/cciss/c0d1p1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?


even change to c0d1 is the same...

How can I work around?
I need this Disk (hardware Raid0 on a smartArray) avaiable on Centos and Windows boxes...


Thanks in advance and kind regards

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: ISCSI target configuration

Post by pschaff » 2011/08/11 17:21:03

Creating a partition of type NTFS is insufficient. It needs to be formatted as NTFS as well.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ISCSI target configuration

Post by TrevorH » 2011/08/11 19:01:58

[quote]
I need this Disk (hardware Raid0 on a smartArray) avaiable on Centos and Windows boxes...
[/quote]

You're still using iSCSI? Don't you need to refer to the same volume from both operating systems? I've never used iSCSI so would be guessing but I'd think that you need to use the device via iSCSI in both places but all your CentOS work in the last post seems to be using the volume that the iSCSI drive resides on?

cvisual
Posts: 13
Joined: 2011/08/02 15:01:47

Re: ISCSI target configuration

Post by cvisual » 2011/08/16 09:51:47

Hi Phil

I mount this disk on Windows using Microsoft iSCSI Initiator and format it with NTFS on WinXP. I can read and write from Win PCs (tested in 3 computers with Win Xp 32 and 64). In fact I already put some files on it to test from some Kbs to 1 Gb...

The error only reside on Centos, because I cant mout it in Centos6.


Hi Trevor

yep - I still trying iSCSI (I'm stubborn ;p )
Well, before I'm using samba, but I have some perfonrmance leaks on my render system, sometimes even crashs on renders with multiple machines - not a system crash, but render abort by network delays...

So, some guys sugest me that iSCSI is a better network protocol for Storage in a render environment with LAN/TCPIP network.

In fact, its look faster, and the PC mount side is faster and easy.

In this setup I need the storage mount as P: on all windows boxes, and on Centos, just mount on a folder like /mnt/PROJECTS.
In fact I only need a mount point on Centos when my render manager software is working (next step after configure iSCSI and NICs bonding on Centos)

Oh - from my 2nd to 3rd post, I completely did a new install of Centos. So the way I config the Storage was a little bit diferent from first time/post. I do not make volume groups and etc. If its happens was by the Windows side...
On Centos, I only use fdisk, config iSCSI target and mount and format it on a Windows PC.

I think now its only a lack of a subtle step to mount this storage on Centos side.
But I can't figure how...

Kind regards

AT

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: ISCSI target configuration

Post by pschaff » 2011/08/16 15:16:28

I am completely confused about the actual hardware we are dealing with and where it resides. Please [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28723&forum=54]provide more information about your system[/url] by running "./getinfo.sh" as root and showing us the output file. Please identify which hardware devices in the output file we are concerned with and how they are physically connected to the CentOS machine.

cvisual
Posts: 13
Joined: 2011/08/02 15:01:47

Re: ISCSI target configuration

Post by cvisual » 2011/08/17 12:18:15

Hi Phil
Maybe my poor english is the main problem... Sorry...

Anyway, how can I send to you the info - the complete output file have 355 lines, maybe too long to copy/paste here.

Trying to short it a little, it's something like this - (using getinfo.sh driver):

Information for driver problems.
[code]
== BEGIN uname -rmi ==
2.6.32-71.29.1.el6.x86_64 x86_64 x86_64
== END uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
centos-release-6-0.el6.centos.5.x86_64
epel-release-6-5.noarch
rpmforge-release-0.5.2-2.el6.rf.x86_64
== END rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS Linux release 6.0 (Final)
== END cat /etc/redhat-release ==

== BEGIN getenforce ==
Enforcing
== END getenforce ==

== BEGIN free -m ==
total used free shared buffers cached
Mem: 3767 441 3325 0 37 191
-/+ buffers/cache: 213 3553
Swap: 15951 0 15951
== END free -m ==

== BEGIN rpm -qa kernel\* | sort ==
kernel-2.6.32-71.29.1.el6.x86_64
kernel-2.6.32-71.el6.x86_64
kernel-devel-2.6.32-71.29.1.el6.x86_64
kernel-firmware-2.6.32-71.29.1.el6.noarch
kernel-headers-2.6.32-71.29.1.el6.x86_64
== END rpm -qa kernel\* | sort ==

kerne== BEGIN lspci ==
00:00.0 Host bridge: Intel Corporation E7520 Memory Controller Hub (rev 0c)
00:02.0 PCI bridge: Intel Corporation E7525/E7520/E7320 PCI Express Port A (rev$
00:06.0 PCI bridge: Intel Corporation E7520 PCI Express Port C (rev 0c)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Cont$
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Cont$
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Cont$
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Cont$
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Con$
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bri$
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller$
01:03.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
01:04.0 System peripheral: Compaq Computer Corporation Integrated Lights Out Co$
01:04.2 System peripheral: Compaq Computer Corporation Integrated Lights Out P$
02:00.0 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge A (rev $
02:00.2 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge B (rev $
03:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Eth$
03:01.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Eth$
04:03.0 RAID bus controller: Compaq Computer Corporation Smart Array 64xx (rev $
05:00.0 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge A (rev $
05:00.2 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge B (rev $
06:01.0 PCI bridge: IBM PCI-X to PCI-X Bridge (rev 03)
06:02.0 PCI bridge: IBM PCI-X to PCI-X Bridge (rev 03)
07:04.0 RAID bus controller: Compaq Computer Corporation Smart Array 64xx (rev $
08:04.0 RAID bus controller: Compaq Computer Corporation Smart Array 64xx (rev $
== END lspci ==


== BEGIN lspci -n ==
00:00.0 0600: 8086:3590 (rev 0c)
00:02.0 0604: 8086:3595 (rev 0c)
00:06.0 0604: 8086:3599 (rev 0c)
00:1d.0 0c03: 8086:24d2 (rev 02)
00:1d.1 0c03: 8086:24d4 (rev 02)
00:1d.2 0c03: 8086:24d7 (rev 02)
00:1d.3 0c03: 8086:24de (rev 02)
00:1d.7 0c03: 8086:24dd (rev 02)
00:1e.0 0604: 8086:244e (rev c2)
00:1f.0 0601: 8086:24d0 (rev 02)
00:1f.1 0101: 8086:24db (rev 02)
01:03.0 0300: 1002:4752 (rev 27)
01:04.0 0880: 0e11:b203 (rev 01)
01:04.2 0880: 0e11:b204 (rev 01)
02:00.0 0604: 8086:0329 (rev 09)
02:00.2 0604: 8086:032a (rev 09)
03:01.0 0200: 14e4:1648 (rev 10)
03:01.1 0200: 14e4:1648 (rev 10)
04:03.0 0104: 0e11:0046 (rev 01)
05:00.0 0604: 8086:0329 (rev 09)
05:00.2 0604: 8086:032a (rev 09)
06:01.0 0604: 1014:01a7 (rev 03)
06:02.0 0604: 1014:01a7 (rev 03)
07:04.0 0104: 0e11:0046 (rev 01)
08:04.0 0104: 0e11:0046 (rev 01)
== END lspci -n ==

== BEGIN lsusb ==
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
== END lsusb ==

[/code]



For short, its a DL380G4 with a SmartArray controller where reside my Storage disks to use as ISCSI, and an 72Gb disk as System Disk.

bellow is a fdisk -l output:

[code]
Disk /dev/cciss/c0d0: 72.8 GB, 72833679360 bytes
255 heads, 32 sectors/track, 17433 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d1eac

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 126 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/cciss/c0d0p2 126 17433 70612992 8e Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/cciss/c0d1: 734.1 GB, 734054440960 bytes
255 heads, 63 sectors/track, 89243 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf80f0dee

Device Boot Start End Blocks Id System
/dev/cciss/c0d1p1 1 89243 716844366 7 HPFS/NTFS

Disk /dev/dm-0: 34.5 GB, 34472984576 bytes
255 heads, 63 sectors/track, 4191 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 16.7 GB, 16726884352 bytes
255 heads, 63 sectors/track, 2033 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 21.1 GB, 21105737728 bytes
255 heads, 63 sectors/track, 2565 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table
[/code]

My goal is mount this Storage: /dev/cciss/c0d1p1 or /dev/cciss/c0d1 (734Gb) on Centos.
They are five 146Gb U320 10k disks fitted on DL380 G4 with SmartArray controller.


Thank you very much for your support Phil

Kind regards

Antonio

Post Reply