Details
- Solution
The following sections guide you through recreating
the partition table of a LUN that has a VMFS datastore. Prior to implementing
these steps, become familiar with how VMware ESX identifies disks and LUNs. For
more information, see Identifying disks when working with VMware ESX
(1014953).
Warnings:
- The steps outlined here are potentially hazardous for your environment if they are not followed exactly. If you are not comfortable performing these steps, contact VMware Technical Support and work with them to resolve the issue. For more information, see How to Submit a Support Request.
- If a LUN does not have a valid partition table, it may not meet the criteria for VirtualCenter’s storage filtering safeguards. Refer to your storage configuration or SAN administrator before making any changes such as create a VMFS datastore or an RDM, add an extent, or increase a VMFS datastore.
ESX
2.x
To recreate
the partition table:
- Log in to the ESX host service console.
- Type vmkpcidivy -q vmhba_devs and press Enter to get list of Linux devices and their VMkernel name.
- Type fdisk -l /dev/sdX and press Enter to confirm that the partition is no longer here.
-
Recreate the partition
table:
- Start fdisk with the command fdisk /dev/sdX and press Enter.
-
Create the
partition:
- Type n and press Enter to create a new partition.
- Type p and press Enter to create a primary partition.
- Type 1 and press Enter to create the first partition.
- Press Enter to keep the default value.
- Press Enter to keep the default value.
-
Change the partition to type fb
(VMFS):
- Type t and press Enter to change the type of partition.
- Type fb and press Enter to set the partition as VMFS.
-
Type w and press
Enter to save.
Note: This command exits fdisk and returns you to the command prompt.
- Type vmkfstools -V and press Enter to discover the VMFS.
ESX 3.x
To recreate the partition
table:
- Log in to the ESX host service console.
- Type esxcfg-vmhbadevs -q and press Enter to get a list of Linux devices and their VMkernel name.
- Type fdisk -l /dev/sdX and press Enter to confirm that the partition is no longer here.
-
Recreate the partition table:
- Start fdisk with the command fdisk /dev/sdX and press Enter.
-
Create the partition:
- Press n and press Enter to create a new partition.
- Press p and press Enter to select that this is a primary partition.
- Press 1 and press Enter to make the first partition.
- Press Enter to keep the default value.
-
Press Enter again to keep the default
value.
-
Change the partition to type fb
(VMFS):
- Press t and press Enter.
- Press 1 and press Enter.
-
Enter fb and press
Enter.
-
Align the partition to sector 128. Do not execute
the realign procedure if the volume was originally created from the ESX command
line or if the volume was upgraded from an 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.
Note: 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 or not.
- Type x and press Enter to move to expert mode.
- Type b and press Enter to change the beginning of the partition.
- Type 1 and press Enter to select the first partition.
-
Type 128 and press Enter to move to the block 128 the
beginning of the partition.
-
Type w and press
Enter to save.
Note: This exits fdisk and returns you to the command prompt.
- Type vmkfstools -V and press Enter to discover the VMFS.
If the VMFS datastore is
still not showing up, see A VMFS volume is not available and vmkernel reports displays the
error: Device size mismatch (1003133).
Note:
This procedure may not work on VMFS volumes that are participating in a spanned
set (extents). Contact VMware Technical Support and work with them to resolve
the issue.
ESX 4.x
- Log in to the ESX host service console.
- Run the
command:
esxcfg-scsidevs -c
The output appears similar to:
Device UID Device Type Console Device Size Plugin Display Name
mpx.vmhba0:C0:T0:L0 Direct-Access /dev/sdb 139890MB NMP Local ServeRA Disk (mpx.vmhba0:C0:T0:L0)
mpx.vmhba3:C0:T0:L0 CD-ROM /dev/sr0 0MB NMP Local HL-DT-ST CD-ROM (mpx.vmhba3:C0:T0:L0)
naa.5005076c02045649 Enclosure Svc Dev/vmfs/devices/genscsi/naa.5005076c02045649 0MB NMP Local IBM Enclosure Svc Dev (naa.5005076c02045649)
naa.600601606a20160084afee93bce8de11 Direct-Access /dev/sdf 153600MB NMP DGC Fibre Channel Disk (naa.600601606a20160084afee93bce8de11)
naa.60060160b4111600624c5b749c7edd11 Direct-Access /dev/sda 153600MB NMP DGC Fibre Channel Disk
(naa.60060160b4111600624c5b749c7edd11)
naa.6090a038f0cd4e5bdaa8248e6856d4fe Direct-Access /dev/sde 256005MB NMP EQLOGIC iSCSI Disk
(naa.6090a038f0cd4e5bdaa8248e6856d4fe)
naa.6090a038f0cd6e5165a344460000909b Direct-Access /dev/sdd 153600MB NMP EQLOGIC iSCSI Disk
(naa.6090a038f0cd6e5165a344460000909b)
- Identify the disk in question, and make note of the value under the Console Device column.
- Run the
command:
fdisk -l <dev>
Where <dev> is the value recorded in step 2.
The output appears similar to: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/sde1 1 32636 262148606 fb VMware VMFS
- Start fdisk with the
command following command and press Enter.
fdisk /dev/sdX - Create the partition:
- Press n and press Enter to create a new partition.
- Press p and press Enter to select that this is a primary partition.
- Press 1 and press Enter to make the first partition.
- Press Enter to keep the default value.
- Press Enter again to keep the default value.
- Change the partition to
type fb (VMFS):
- Press t and press Enter.
- Press 1 and press Enter.
- Enter fb and press
Enter.
- 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.
Note: 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 or not.
- Type x and press Enter to move to expert mode.
- Type b and press Enter to change the beginning of the partition.
- Type 1 and press Enter to select the first partition.
- Type 128 and press Enter to move to the block 128 the beginning of the partition.
- Type w and press Enter to
save.
Note: This exits fdisk and returns you to the command prompt.
- Run vmkfstools -V and press Enter to discover the VMFS.
Note:
This procedure may not work on VMFS volumes that are participating in a spanned
set (extents). Contact VMware Technical Support and work with them to resolve
the issue.
Fuente: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002281
A.S.
Рeculіaг аrtiсlе, just whаt ӏ neeԁed.
ResponderEliminarHеre is my web ρage - Same Day Payday Loans