Categorized | iSCSI, VMWARE

Error al añadir discos iSCSI con tabla de partición GPT a un clúster VSPhere 4.1

Escrito el 04 enero 2011 por Angel Ferrás Rodríguez

Hoy me encontré con el siguiente problema en un entorno VSphere 4.1:

Tenía una LUN iSCSI mapeada directamente a un huésped con sistema Operativo Centos que hace las funciones de NAS, se trata de una forma de añadir un disco denominada "RAW Device Mapping" o RDM. Me dispongo a eliminar este servidor con la intención de convertir esta lun en un datastore VMFS para los hosts ESX de un clúster VSPHERE. Después de eliminar el disco RDM y la máquina virtual enganchada a éste, desde el wizard del cliente VSphere es imposible añadirlo como DataStore (Add Storage),  con el siguiente error:

Error: Call "HostDatastoreSystem.CreateVmfsDatastore"  for object; "datastoreSystem-143" on vCenter Server …… failed.

Después de googlear un poco encuentro con la solución en el siguiente blog:

http://vcpgeeks.blogspot.com/2010/03/while-adding-lun-to-esx-error-unable.html

Por lo que se ve, al añadir el disco previamente como RDM lo considera de tipo gpt y no como msdos. Lo muestro en las salidas por consola (ssh) 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 bytes

Device 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 VMFS

Disk /dev/sdc: 8392 MB, 8392802304 bytes
255 heads, 63 sectors/track, 1020 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device 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  Linux

WARNING: 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 bytes

Device 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) print

Model: FSC FibreCAT_SX1 (scsi)
Disk /dev/sdd: 1800GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
1      17.4kB  1800GB  1800GB                     lvm

(parted)

 

 

 

Este problema se soluciona cambiando la tabla de partición de gpt a msdos, 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 msdos

Warning: 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) print

 

 

 

 

Model: FSC FibreCAT_SX1 (scsi)
Disk /dev/sdd: 1800GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

 

 

 

De esta forma ya es posible añadirlo como DataStore desde el wizard … bendito Google!

É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:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008886

0 Comments For This Post

1 Trackbacks For This Post

  1. Tweets that mention Error al añadir discos iSCSI con tabla de partición GPT a un clúster VSPhere 4.1 | Almacenamiento Abierto -- Topsy.com Says:

    [...] This post was mentioned on Twitter by Angel Ferras . Angel Ferras said: Error al añadir discos iSCSI con tabla de partición GPT a un clúster VSPhere 4.1 http://is.gd/k64ZU [...]