Hoy me encontré con el siguiente problema en un entorno VSphere 4.1: tenía una LUN iSCSI mapeada directamente a un huésped en una NAS OpenFiler en modo "RAW Device Mapping" ( RDM ) . Después de eliminar este servidor con la intención de convertir esta lun en un datastore VMFS para los hosts ESX, cuando intento mapearla a otro host virtual desde el wizard del cliente informa que es imposible añadirlo como DataStore con el siguiente error:
Error: Call "HostDatastoreSystem.CreateVmfsDatastore" for object; "datastoreSystem-143" on vCenter Server …… failed.
Haciendo googling encuentro la solución en el siguiente blog:
http://vcpgeeks.blogspot.com/2010/03/while-adding-lun-to-esx-error-unable.html
Siendo el causante el mapeo anterior como lun RDM que lo había creado una con tabla de particiones gpt y no como msdos. Lo muestro en las salidas por consola siguientes:
[root@AGSS03 ~]# fdisk -l
Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sdb1 * 1 140 1124518+ 83 Linux
/dev/sdb2 141 154 112455 fc VMware VMKCORE
/dev/sdb3 155 8924 70445025 5 Extended
/dev/sdb5 155 8924 70444993+ fb VMware VMFSDisk /dev/sdc: 8392 MB, 8392802304 bytes
255 heads, 63 sectors/track, 1020 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sdc1 1 127 1020096 82 Linux swap / Solaris
/dev/sdc2 128 382 2048287+ 83 Linux
/dev/sdc3 383 1020 5124735 5 Extended
/dev/sdc5 383 1020 5124703+ 83 LinuxWARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdd: 1800.3 GB, 1800324251648 bytes
255 heads, 63 sectors/track, 218876 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sdd1 1 218877 1758129151+ ee EFI GPT[root@AGSS03 ~]# parted /dev/sdd
GNU Parted 1.8.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) printModel: FSC FibreCAT_SX1 (scsi)
Disk /dev/sdd: 1800GB
Sector size (logical/physical): 512B/512B
Partition Table: gptNumber Start End Size File system Name Flags
1 17.4kB 1800GB 1800GB lvm(parted)
Identificado el problema, la solución es cambiar la tabla de partición de gpt a msdos. En ESX se puede realizar desde la utilidad parted con el comando mklabel msdos:
[root@AGSS03 ~]# parted /dev/sdd
GNU Parted 1.8.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel msdosWarning: The existing disk label on /dev/sdd will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
New disk label type? [gpt]? msdos
(parted)Model: FSC FibreCAT_SX1 (scsi)
Disk /dev/sdd: 1800GB
Sector size (logical/physical): 512B/512B
Partition Table: msdosNumber Start End Size Type File system Flags
De esta forma ya es posible añadirlo como DataStore desde el wizard.
Éste procedimiento no servirá para ESXi ya que no dispone de la utilidad parted. Hay un procedimiento descrito por VMware usando la utilidad dd al final del siguiente artículo:
временная прописка для граждан снг в Дзержинске Регистрация ребенка в Кукморе