, ,

Recuperar Datastore

Si se pierde el acceso a un datastore y sólo nos da la opción de agregarlo como nuevo y formatearlo, para recuperarlo con todos los datos hay que seguir el siguiente tutorial:

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

Para recrear la tabla de particiones:

  1. Log in to the ESX host service console. For ESXi see Tech Support Mode for Emergency Support.
  2. Run the command
    esxcfg-scsidevs -c
  3. Identify the disk in question, and note the value under the Console Device column.
  4. Run the command:
    fdisk -l <dev> 
    donde dev será la unidad que intentamos recuperar por ejemplo /dev/sdd

La salida será algo así

      Disk /dev/sde: 268.4 GB, 268440698880 bytes
      255 heads, 63 sectors/track, 32636 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes

      Device Boot Start End Blocks Id System
      /dev/sdd 1 32636 262148606 fb VMware VMFS
  1. Ejecutar
    fdisk <dev>
  2. Crear la partición
 
         1. Press n and press Enter to create a new partition.
         2. Press p and press Enter to select that this is a primary partition.
         3. Press 1 and press Enter to make the first partition.
         4. Press Enter to retain the default value.
         5. Press Enter again to retain the default value.
         6. Change the partition to type fb (VMFS):
               1. Press t and press Enter.
               2. Press 1 and press Enter.
               3. Enter fb and press Enter
  1. Align the partition to sector 128.
Caution: Do not execute the realign procedure if the volume was originally created from the ESX command line or if the volume was upgraded from ESX 2.x as the starting sector is 63, which is the default when using fdisk. If the VMFS volume was originally created using VMware Infrastructure Client, the beginning of the partition was set to sector 128 and the alignment is required to match the beginning of the partition to where the volume used to be.
Looking at other VMFS partitions with fdisk -lu in the same environment reveals if the current practice is to align the partition start to block 128.
         1. Type x and press Enter to move to expert mode.
         2. Type b and press Enter to change the beginning of the partition.
         3. Type 1 and press Enter to select the first partition.
         4. Type 128 and press Enter to move to the block 128 the beginning of the partition.
         5. Type w and press Enter to save.
This exits fdisk and returns you to the command prompt.
  1. Run vmkfstools -V and press Enter to discover the VMFS.