Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ESX not able to connect ISCSI target openfiler

Posted on 2009-12-17
54
Medium Priority
?
4,306 Views
Last Modified: 2012-05-08
Hoping someone can help me test OF 2.3 and vsphere iscsi connection. Steps are below:

1. Installed Vmware Workstation 7 and in that created 3 VM
     
     a) Vmware Sphere
     b) Win Xp SP2 and installed VC
     c) Openfiler 2.3

1. Installed OF 2.3 as a vm on VM WK7.
2. configured iScsi on OF and was able to map the lun.
3. On a Vsphere, using VI client Im trying to connect to the iScsi target.
a. On Vsphere host I created a iscsi connection using vmkernel on a same port of vsphere host management network(as I am using for test)
b. My ip address for the iscsi connection is in the same subnet as my OF vm.
c. On the iSCSI Software Adapter (vmhba33) of vsphere host, Ive enabled and configured the iScsi initiator
d. On OF, the IP of the step(a) is allowed access to the target.

Network Configuration:

Vsphere Host:

Ip AdD(Service Console): 192.168.143.2
Netmask: 255.255.255.0
Gateway: 192.168.143.1
VMKernel: 192.168.143.6

Win XP(VC):

Ip Add: 192.168.143.3
Netmask: 255.255.255.0
Gateway: 192.168.143.1

Openfiler:

Ip Add: 192.168.143.5
Netmask: 255.255.255.0
Gateway: 192.168.143.1

questions:

1. No luns appear after scan job. What happen? what have I missed?

Note: I have made some changes as per some of the recomendations

1) Enabled Promiscous Mode for both Vmkernel and Vswith as I installed Vsphere & OF in VM.

2) made sure to provide Network 192.168.143.0 & 255.255.255.255.

3) Able to vmkping from Vsphere host to vmkernel Ip & OF IP

4) Edited the /etc/initiators.deny with the below entry

iqn.---- 192.168.143.0 ALL

0
Comment
Question by:shant102
  • 33
  • 20
54 Comments
 
LVL 3

Expert Comment

by:ringw
ID: 26078248
To what LUN ID did you map the LUN on OF? Once I had the problem that OF worked only if you had one ISCSI LUN mapped to LUN 0. As soon as you added another LUN you could not discover those from ESX. Try to delete all LUNs and map only one LUN with ID 0.
0
 

Author Comment

by:shant102
ID: 26078257
I have checked in /etc/ietd.conf and I am able to see only Lun 0 is visible in that but still I will recheck once again and will update.

Thanks for the update.
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26078459
I've been using OF for quite some time now, you dont have to edit anything manually, everything can be done via gui, its not recommended to change anything manually as openfiler may overwrite what you've changed
The common problem you cant see LUN in openfiler due to permission issue, you need to define which host/subnet can access the targets you created
If you can sceenshot system, volumes(target confi, lun mapping, network acl) and shares tab, perhaps i can try to assist you
Btw, ensure the iscsi target service is started(perhaps you already checked this)
Plus you can have multiple LUN id ofcoz, its funny if OF can only present one single LUN :)
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:shant102
ID: 26078485
Sure mate,

I will definitely send screenshot of system, volumes(target confi, lun mapping, network acl) and shares tab ASAP and thanks for ur updates.
0
 

Author Comment

by:shant102
ID: 26086486
Hi All,

Today I made some changes and below are some details:

1) Changed the NAC in OF

Network/Host: 192.168.143.0
Netmask: 255.255.255.0

2) Installed Starwind in WIn XP VM and configured iscsi target

But when I added both the iscsi targets in Storage Adapter, I am able to see the both the STARWIND & OF "Target Names" in static discovery and I have attached the image.

Please let me know why I am able to see the targets in Static Discovery but I am not able to see the LUN's while adding in Add Storage.


Static-Discovery.jpg
0
 

Author Comment

by:shant102
ID: 26086628
Below are the details in STATIC DISCOVERY:

iSCSI Server Address            Target Name
192.168.143.3:3260            esxstorage
192.168.143.5:3260            iqn.2006-01.com.openfiler:tsn.d211d2172902

STARWIND: 192.168.143.3:3260            esxstorage
OPENFILER: 192.168.143.5:3260            iqn.2006-01.com.openfiler:tsn.d211d2172902

If I remove the above entries after rescan I am getting agin these details.
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26086663
You setup 2 iscsi servers? 192.168.143.3 & 192.168.143.5?
DId you configure authentication at the server?
0
 

Author Comment

by:shant102
ID: 26086683
Can you please let me know what exactly u meant by "configure authentication at the server" where do I need to check for this.
0
 

Author Comment

by:shant102
ID: 26086789
iSCSI host access configuration for target "iqn.2006-01.com.openfiler:tsn.d211d2172902"

Name Network/Host Netmask Access
esx1 192.168.143.0 255.255.255.0 Allow

in Network ACL OF
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26086887
i meant the chap authentication next to Network ACL
how many LUNs did you map?
0
 

Author Comment

by:shant102
ID: 26086922
CHAP Authentication Settings for target "iqn.2006-01.com.openfiler:tsn.d211d2172902"

No users assigned to this target.

I have not added any CHAP auth

and attached is my Vsphere details
CHAP.jpg
OF-CHAP.jpg
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26086966
How bout the screenshots for other settings?
0
 

Author Comment

by:shant102
ID: 26087169
Hi Mate,

Does it matter with the name as "esx1" in NAC differ from "esx" in volume group.Attached are all screen shots.plz let me know for any further info.

Thanks a lot for your help in resolving this mate.
LUn-MAP.jpg
Net-ACL.jpg
Network.jpg
OF-SYSTEM.jpg
services.jpg
shares.jpg
Static-Discovery.jpg
storage-adapter.jpg
TargetConf.jpg
volume-group.jpg
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26087353
All seems fine but i noticed that LUN path(LUn-MAP.jpg) is /dev/esx/vmotion but at the shares(shares.jpg) is showing /mnt/esx
this is strange, i have several LUNs, all paths are same
Try deleting the LUN and recreate
0
 

Author Comment

by:shant102
ID: 26087730
Hi Mate,

Re installed and tried to re create evrything but still no luck as I am not understanding why Static Discovery is getting updated with iscsi targets but still I am not able to see the LUN
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26087753
OK try this, remove both dynamic & static discovery entries if any
Disable soft iscsi initiator in esx and reboot esx
Enable and add the iscsi server at dynamic & rescan adapter
Dont touch the static

If stil cant see the LUN, ok we skip that for now, try adding NFS datastore and see if that works
Let me know if you need detail steps in OF for creating NFS
0
 

Author Comment

by:shant102
ID: 26087850


I am able to get the remove both dynamic & static discovery entries if any
Disable soft iscsi initiator in esx and reboot esx.

But can u plz elaborate the step Enable and add the iscsi server at dynamic & rescan adapter.
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26087881
At the Configuration tab, go to Storage Adapters, select iSCSI Sofware Adapter then click Properties
Click Configure, tick Enabled and click OK
Click the Dynamic Discovery tab, click Add to add your iscsi server IP address and click OK, it will prompt you to rescan just click OK
0
 

Author Comment

by:shant102
ID: 26087970
Sorry Mate,

I did exactly the same way u informed me to do but still I am not able to see the LUN and again I am able to see the Static Discovery is getting updated with iscsi targets but still I am not able to see the LUN.

Here I didn't clicked any Static Discovery at all only later I checked it. can u plz share the NFS conf steps.
0
 

Author Comment

by:shant102
ID: 26087995
Below are some of my STARWIND log details:

12/19 23:09:37.566 af8 T[34,1]: session 0x34, connection 0x34 : end of stage 1, next stage 3.
12/19 23:09:37.566 af8 C[34], IN_LOGIN: Event - LOGIN_ACCEPT.
12/19 23:09:37.566 af8 C[34], LIN: T5.
12/19 23:09:37.566 ea0 Srv: TargetName=esxstorage
12/19 23:09:37.973 af8 C[34], LIN: Event - LOGOUT.
12/19 23:09:37.973 af8 C[34], IN_LOGOUT: T9/10.
12/19 23:09:37.973 904 C[34], IN_LOGOUT: Event - LOGOUT_ACCEPT.
12/19 23:09:37.973 904 C[34], FREE: T13.
12/19 23:09:37.973 ea0 C[34], FREE: recvData returned 10054
12/19 23:09:39.254 33c Srv: Accepted iSCSI connection from 192.168.143.10:51244. (Id = 0x35)
12/19 23:09:39.254 33c C[35], FREE: Event - CONNECTED.
12/19 23:09:39.254 33c C[35], XPT_UP: T3.
12/19 23:09:39.410 bf0 C[35], XPT_UP: Login request: ISID 0x00023d000001, TSIH 0x0000.
12/19 23:09:39.410 bf0 C[35], XPT_UP: Event - LOGIN.
12/19 23:09:39.410 bf0 C[35], IN_LOGIN: T4.
12/19 23:09:39.410 bf0 Params: <<< String param 'InitiatorName': received 'iqn.1998-01.com.vmware:esxlab1-74e57c0d', accepted 'iqn.1998-01.com.vmware:esxlab1-74e57c0d'
12/19 23:09:39.410 bf0 Params: <<< String param 'TargetName': received 'esxstorage', accepted 'esxstorage'
12/19 23:09:39.410 bf0 Params: <<< Enum param 'SessionType': received 'Normal', accepted 'Normal'
12/19 23:09:39.410 bf0 Params: <<< Enum param HeaderDigest='CRC32C' is invalid!
12/19 23:09:39.410 bf0 T[35,1]: Updating of parameters failed.
12/19 23:09:39.410 afc C[35], IN_LOGIN: Event - LOGIN_REJECT.
12/19 23:09:39.410 afc C[35], FREE: T7.
12/19 23:09:39.723 bf0 C[35], FREE: recvData returned 10058

Are u able to make out something from this.
0
 
LVL 24

Accepted Solution

by:
ryder0707 earned 2000 total points
ID: 26088071
Below are the steps to create NFS share in OF for esx

Start NFS service in OF
Assuming you have extra disk(or delete any unused), click Block Devices
You will see "Block Device Management"
Click the disk /dev/sdX you want to create partition
Scroll down and click Create to accept default
Click Volume Groups to Create a new volume group
Give a name NFSdisk and tick the disk you just partitioned and click  Add volume group
Click Add Volume, select volume group NFSdisk and click Change
Give volume name, NFSvol, drag space to max and XFS as the FS, click Create
Click Shares
Noticed the NFSvol link under nfsdisk, click that
Give a folder name NFSdstore and click Create Sub-folder
Click the NFSdstore link under NFSvol and click Make Share
Scroll down, tick Public guest access and click Update
Scroll down again, under NFS column, tick RW for your esx and click update(assuming you already define the host/subnet under in System > Network Access Configuration)
Click Shares and take note of the path for NFSdstore should be something like mnt/nfsdisk/nfsvol/NFSdstore/
In vSphere click, click Configuration tab > click Storage > click Add Storage > select NFS > click Next
Key in your esx host IP address/name
Specify the path to your NFS share as mnt/nfsdisk/nfsvol/NFSdstore/ and give a name for your datastore then click Next
Click Finish
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26088092
I cant actually tell what is the problem, but at the last part seems clear something is not right
Have you tried to add the iscsi LUN to your desktop using Microsoft iSCSI Software Initiator?
Get it from http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en

If you cant add the LUN as well, then you know its really a problem with OF not esx/starwind
0
 

Author Comment

by:shant102
ID: 26089438
Hi Mate,

As per ur updates I followed the link:

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1008083&sliceId=2&docTypeID=DT_KB_1_1&dialogID=54682501&stateId=0%200%2055404225


Troubleshooting

To troubleshoot your setup or re-number your targets:

   1.
      Ensure that the array, and possibly each Service Processor, has an entry in each of the following files:

          *
            /etc/vmkiscsi.conf

            Syntax: DiscoveryAddress=<Array_IP>:<iSCSI Port On Array>

            For example, DiscoveryAddress=10.200.107.10:3260

          *
            /var/lib/iscsi/vmkbindings

            Syntax: 0 0 <Array_IQN>

            For example, 0 0 iqn.1992-08.com.company:sn.84259608

            Note: This file is rebuilt on rescan and should be recreated if iSCSI target numbers are out sequence.
          *
            /var/lib/iscsi/vmkdiscovery

            Syntax: 0 0 <Array_IQN>

            For example, 0 0 iqn.1992-08.com.company:sn.84259608

            Note: This should be recreated if iSCSI target numbers are out sequence.

And I am not able to see any files  "/etc/vmkiscsi.conf" and " /var/lib/iscsi/vmkdiscovery" in my Vsphere host

VMKISCSI-TOOL.jpg
0
 

Author Comment

by:shant102
ID: 26089451
And there is no file in my vsphere by name /var/lib/iscsi
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26089506
Hi mate, yeah that article is not helping at all, personally i don't actually go that detail, its really straight forward
Btw how's your NFS datastore?
0
 

Author Comment

by:shant102
ID: 26089543
Hi Mate,

I configured the NFS server but I am not able to get the options below:

Scroll down, tick Public guest access and click Update
Scroll down again, under NFS column, tick RW for your esx and click update(assuming you already define the host/subnet under in System > Network Access Configuration)
Click Shares and take note of the path for NFSdstore should be something like mnt/nfsdisk/nfsvol/NFSdstore/


NFS-SHARES.jpg
NFS-ERROR.jpg
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26089565
Click the BLUE FOLDER and click Make Share

NFS.jpg
0
 

Author Comment

by:shant102
ID: 26089727
Thanks Mate.

Attached are my new updates as I followed exactly the same way u mentioned.

After that I rebooted the OF 1st and then later ESX VM but still the same result and I am really not getting what I am doing wrong.
nfs1.jpg
nfs2.jpg
nfs3.jpg
nfs4.jpg
NFS-ERROR.jpg
0
 

Author Comment

by:shant102
ID: 26089744
trying NFS mount using CL
nfs5.jpg
0
 

Author Comment

by:shant102
ID: 26089754
NFS Mount
nfs6.jpg
0
 

Author Comment

by:shant102
ID: 26089770
Log Files:

Dec 20 12:00:01 openfiler crond(pam_unix)[5404]: session opened for user openfiler by (uid=0)
Dec 20 12:00:01 openfiler crond(pam_unix)[5406]: session opened for user root by (uid=0)
Dec 20 12:00:01 openfiler crond(pam_unix)[5406]: session closed for user root
Dec 20 12:00:02 openfiler crond(pam_unix)[5404]: session closed for user openfiler
Dec 20 12:01:01 openfiler crond(pam_unix)[5420]: session opened for user root by (uid=0)
Dec 20 12:01:01 openfiler crond(pam_unix)[5420]: session closed for user root
Dec 20 12:10:01 openfiler crond(pam_unix)[5530]: session opened for user root by (uid=0)
Dec 20 12:10:01 openfiler crond(pam_unix)[5530]: session closed for user root
Dec 20 12:12:15 openfiler mountd[4122]: refused mount request from esxlab1 for /mnt/esxnfs/nfs_storage/vsphereNFS (/): not exported
Dec 20 12:17:53 openfiler mountd[4122]: refused mount request from esxlab1 for /mnt/esxnfs (/): not exported
Dec 20 12:20:01 openfiler crond(pam_unix)[5661]: session opened for user root by (uid=0)
Dec 20 12:20:01 openfiler crond(pam_unix)[5661]: session closed for user root
Dec 20 12:20:05 openfiler sshd(pam_unix)[5664]: session opened for user shant by (uid=0)
0
 

Author Comment

by:shant102
ID: 26089776
NFS mount
nfs7.jpg
0
 

Author Comment

by:shant102
ID: 26089797
I think I am doing something wrong with sharing the folder
0
 
LVL 24

Assisted Solution

by:ryder0707
ryder0707 earned 2000 total points
ID: 26089799
mate, need to check the spelling, its not vsphereNFS but vspherNFS(from your screenshot)
and take note all command line is case sensitive, to check list of firewall services
esxcfg-firewall -s
and try
esxcfg-firewall -q nfsClient
0
 

Author Comment

by:shant102
ID: 26089892
Mate,

Now u made my day and believe me u r a genius dude and today I learned a lot from u and also like one character also sometimes create such a huge mistake.

Now I am able to mount both using command interface and using GUI mode.

Thanks a lot mate......:)))

but still it will be great if I will be able to manage the iSCSI targets also.
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26089914
NP mate glad to help, at least something is working for you really have no clue why iscsi didnt work for you
Btw, NFS is not bad, you may want to read this http://storagefoo.blogspot.com/2007/09/vmware-over-nfs.html
I'll think what else can be done to fix your iscsi problem :)
0
 

Author Comment

by:shant102
ID: 26089928
Hey Buddy,

U don't know how much I have struggled to get this and literally I haven't slept for 3 days back-to-back, hats off 2 u mate and I have to learn so much from u. Please share ur details @ halkai@rediffmail.com if u want to as I don't want to force u but I will be privileged to keep in touch with u and learn a lot from you.

Thanks a lot once again and thx for the link mate.
0
 

Author Closing Comment

by:shant102
ID: 31667666
The solution was right on target and I really easily configured the other solution i.e. NFS on VSphere and we are still working on iSCSI one.
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26090226
I just installed a new OF, create a 50GB iscsi LUN, tested it with my esx 100% working, and backup the OF config
I've attached the backup file, you can restore it in a fresh OF and see if iscsi works for you
You might want to change the OF ip address after you restore the backup file
To restore go to System, look for backup/restore on the left and upload the file
If you dont want to isntall a fresh OF, snapshot the OF VM before you upload/restore the file, that way you can always revert back

Due to EE rule, I can't upload .tgz file, so extract OFbackup.zip, you will get "backup-openfiler_openfiler_vr1584-3-1_12-20-2009-10-56"
rename that to backup-openfiler_openfiler_vr1584-3-1_12-20-2009-10-56.tgz and upload to restore

Good luck!
OFbackup.zip
0
 

Author Comment

by:shant102
ID: 26090730
Hi mate,

Followed ur steps and attached is the some updates as I am getting some missing files while extracting but I am not sure.
OFnew.jpg
OFnew1.jpg
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26090764
Dont extract it, just upload the tgz file using OF
Ensure that your VM has 2 virtual disks, 1st for the OF and 2nd is 50GB
0
 

Author Comment

by:shant102
ID: 26090781
Sorry Mate,

After renaming that to backup-openfiler_openfiler_vr1584-3-1_12-20-2009-10-56.tgz I am not able to get "just upload the tgz file using OF" and whether it matters that I don't have 50GB space currently in my HD.
0
 

Author Comment

by:shant102
ID: 26091625
Hi Mate,

I am not able to see any file named /etc/vmkiscsi.conf and I think which is the main file for iSCSI targets, can u plz check whether u have got the file listing in ur etc directory.
0
 

Author Comment

by:shant102
ID: 26091635
And there is /var/lib/iscsi/ directory in my vsphere host
0
 

Author Comment

by:shant102
ID: 26091704
I didn't configured any DNS in my ESX hosts and I don't have any entries in

/etc/resolv.conf

will it matter
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26092579
After renaming that to backup-openfiler_openfiler_vr1584-3-1_12-20-2009-10-56.tgz I am not able to get "just upload the tgz file using OF" and whether it matters that I don't have 50GB space currently in my HD.

There is an option in OF to upload backup file, and yes 50GB is needed for it to work properly, but you dont really need physical disk space, just virtual disk

I didn't configured any DNS in my ESX hosts and I don't have any entries in
For testing you can just use ip, but ofcoz setting up dns is always a good idea
0
 

Author Comment

by:shant102
ID: 26093416
Hi Mate,

Can u see the below files in ur config:

/etc/vmkiscsi.conf
/var/lib/iscsi/  
/etc/resolv.conf
0
 

Author Comment

by:shant102
ID: 26093457
Hi Mate,

I have successfully uploaded the backup-openfiler_openfiler_vr1584-3-1_12-20-2009-10-56.tgz file and below are the updates, can u please let me know now what I need to do next.
OF1.jpg
OF2.jpg
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26093458
Do you see any LUN mapped for iscsi?
0
 

Author Comment

by:shant102
ID: 26093542
attached are the updates after reboot OF.Currently I have added 50 GB VD and my ip address of OF is 192.168.143.13 255.255.255.0. Plz let me know what to do next.
OF3.jpg
OF4.jpg
OF5.jpg
OF6.jpg
OF7.jpg
OF8.jpg
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26093693
Looks good, now change the NAC to match your network 192.168.143.0
and rescan iscsi adapter in your esi and try to add the LUN
0
 

Author Comment

by:shant102
ID: 26111029
Hey Buddy,

Finally I managed to configure iSCSI target in esx host but not with OF but with FreeNAS setup and it worked like wonders in a quick setup.

0
 
LVL 24

Expert Comment

by:ryder0707
ID: 26111213
Good for you mate :)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question