Hi,
I've set up an iSCSI target on Linux debian using iscsitarget. I can see the LUN in the VI Cient, but when I'm trying to add new datastore I'm getting "unable to read partition information from this disk" error. I've followed instructions found via google to erase the LUN with dd if=/dev/zero of=/dev/sda (on the target), then I've used fdisk's o command and created a partition of type fb and used b command to move the begginning of it to 128 blocks to align to 64kB (as I've read somewhere it might help). It didn't I'm still getting the same error.
#vmkfstools -C vmfs3 -S local /vmfs/devices/disks/vmhba32\:0\:0\:5
Creating vmfs3 file system on "vmhba32:0:0:5" with blockSize 1048576 and volume label "local".
Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vmhbaW:X:Y:Z
Error: Invalid handle
#esxcfg-vmhbadevs -q
vmhba32:0:5 /dev/sda
#vmkfstools -P /vmfs/devices/disks/vmhba32\:0\:5\:0
devfs-1.00 file system spanning 0 partitions.
File system label (if any):
Mode: private
Capacity 55050244096 (107520008 file blocks * 512), 55050244096 (107520008 blocks) avail
UUID: 00000000-00000000-0000-000000000000
Partitions spanned (on "notDCS"):
#fdisk -l /dev/sda
Disk /dev/sda: 55.0 GB, 55050240000 bytes
255 heads, 63 sectors/track, 6692 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 6693 53759999+ ee EFI GPT
I've tried chaning LUN numbers, restarting both the iSCSI server and the ESX host, deleting the partition and recreating it. I've also tried using Microsoft iSCSI initiator in Vista to connect to the target. I've tried initializing the disk and I could create partitions and write to them, but this didn't make a defference to ESX. I've also tried changing fileio to blockio iSCSI access mode on the Linux server.
I would appreciate any help given.
Kind Regards,
Lucas Olszewski
I've made a typo in one command in the previous post:
#vmkfstools -C vmfs3 -S local /vmfs/devices/disks/vmhba32\:0\:0\:5
should be:
#vmkfstools -C vmfs3 -S datastore1 /vmfs/devices/disks/vmhba32\:0\:5\:0
The output of the command stays the same:
#vmkfstools -C vmfs3 -S datastore1 /vmfs/devices/disks/vmhba32\:0\:5\:0
Creating vmfs3 file system on "vmhba32:0:5:0" with blockSize 1048576 and volume label "datastore1".
Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vmhbaW:X:Y:Z
Error: Invalid handle
Hello,
Why not clear the LUN on the ISCSI Server, present it to ESX then use the VIC to create the VMFS. That has always worked for me from a Linux host. I tend to avoid the CLI whenever possible for Disk related issues. The problem could very well be that you defined the partition to be type 'fb' prematurely.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs: http://www.astroarch.com/wiki/index.php/Blog_Roll
Top Virtualization Security Links: http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links
I've tried to use the VIC, but no matter what I do I'm always getting the "unable to read partition information from this disk" error on the next step after selecting the LUN. I've tried erasing the disk, and using the VIC on every step of the process of:
1. creating a DOS partition table
2. creating the partition
3. setting it to fb
4. moving the start to align to 64kB.
I've also tried restarting and rescanning after every step, but still it is not working.
I've also tried using VIC after the disk was initialized by Windows.
Hello,
If you are using an ISCSI Enterprise Target solution on the server you do not want to present to ESX an initialized LUN through iSCSI, but an Uninitialized Disk.
I.e. say you have /dev/sda and /dev/sdb, The OS and IET is installed on /dev/sda, you then present using IET /dev/sdb (uninitialized) through iSCSI to your ESX host. Then using the VIC let it initialize /dev/sdb. 1 LUN, 1 VMFS is the rule.
You may want to consider using something like OpenFiler as well. That works quite well.
Is the iSCSI Server Windows or Linux?
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs: http://www.astroarch.com/wiki/index.php/Blog_Roll
Top Virtualization Security Links: http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links
Yes I'm using the ISCSI Enterprise Target on a Debian Linux server and
I've tried presenting it the uninitialized as well as initialized disks.
On my Linux server I have the OS installed on /dev/hda1, the disk I'm
presenting via iSCSI is /dev/sda. It was uninitialized initially. As
described before trying to add storage via VIC I was getting "unable to
read partition information from this disk" so I've tried initializing
the disk(creating a DOS partition table), creating the partition etc.
Also, the LUN is working fine when accessed from Windows and Linux
initiators(they can create and read the partition table OK).
Hello,
I have a similar setup using IET on Fedora 9. I have yet to experience this problem. I have presented uninitialized and initialized volumes. You may not want to start with a DOS partition but use the advanced options of fdisk to just create a BSD/SUN disklabel. Then write the disk. Initialization does not require partitions just a disklabel.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs: http://www.astroarch.com/wiki/index.php/Blog_Roll
Top Virtualization Security Links: http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links
OK it is resolved now. Both fdisks that comes with debian and ESX 3.5 can't create a proper BSD disklabel. Just to reiterate the whole process to help anyone with the same problem.
I've erased the partition table with "dd if=/dev/zero of=/dev/sda bs=1M count=1 "
Used gparted to set a bsd type disklabel on the disk
(At this stage VIC was no longer showing the dreaded "unable to read partition information from this disk" error, but the datastore creation would fail with a failed to create the filesystem error)
I've created a new primary partition with fdisk /dev/sda and changed its type to fb and used the x mode b command to align to the sector boundary.
I haven't tried VIC after that, it could work, but I used "/usr/sbin/vmkfstools -C vmfs3 -S datastore1 vmhba32:0:5:1" command to create the datastore.
The datastore is showing OK in VIC now. I've yet to test it with some VMs located on it.
Texiwill, thanks for your help. You mentioning the BSD disklabel helped me to resolve it.