{"id":854,"date":"2012-10-25T11:39:16","date_gmt":"2012-10-25T18:39:16","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=854"},"modified":"2012-11-09T16:20:43","modified_gmt":"2012-11-09T23:20:43","slug":"solution-to-being-unable-to-add-a-new-datastore-disk-in-vmware-esxi","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=854","title":{"rendered":"Solution to being unable to add a new datastore (disk) in VMware ESXi."},"content":{"rendered":"<p>I attempted to add a disk to a VMware ESXi 5.0.  The system recognized the drive, but would not allow me to add it as a datastore.  The disk had data on it, but I did not care and just wanted to format it to add it my datastores.  Conveniently, I actually was able to use fdisk much that same way I would in linux to delete all the partitions.  I found this much easier than some of the other solutions I found. <\/p>\n<p>Note: I removed some of the &#8220;_&#8221; in the disk names to preserve the format. <\/p>\n<p>To list the disks installed:<\/p>\n<blockquote><p>~ # fdisk -l<\/p>\n<p>Disk \/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389: 160.0 GB, 160041885696 bytes<br \/>\n255 heads, 63 sectors\/track, 19457 cylinders<br \/>\nUnits = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p>                                                                                 Device Boot      Start         End      Blocks  Id System<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p1   *         1     16072 129090560    7  HPFS\/NTFS<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p2         19072     19456   3087360    7  HPFS\/NTFS<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p3         16072     19072  24100864+   f  Win95 Ext&#8217;d (LBA)<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p5         16072     17325  10066944    b  Win95 FAT32<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p6         17325     18616  10371072    b  Win95 FAT32<\/p>\n<p>Partition table entries are not in disk order<\/p>\n<p>Disk \/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_&#8230;_WD2DWMAT16698967: 250.0 GB, 250000000000 bytes<br \/>\n64 heads, 32 sectors\/track, 238418 cylinders<br \/>\nUnits = cylinders of 2048 * 512 = 1048576 bytes<\/p>\n<p>                                                                                 Device Boot      Start         End      Blocks  Id System<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_&#8230;_WD2DWMAT16698967p1             5       900    917504    5  Extended<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_&#8230;_WD2DWMAT16698967p2           901      4995   4193280    6  FAT16<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_&#8230;_WD2DWMAT16698967p3          4996    238419 239025745   fb  VMFS<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_&#8230;_WD2DWMAT16698967p4   *         1         4      4080    4  FAT16 <32M\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_..._WD2DWMAT16698967p5             5       254    255984    6  FAT16\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_..._WD2DWMAT16698967p6           255       504    255984    6  FAT16\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_..._WD2DWMAT16698967p7           505       614    112624   fc  VMKcore\n\/dev\/disks\/t10.ATA_____WDC_WD2502ABYS2D18B7A0_..._WD2DWMAT16698967p8           615       900    292848    6  FAT16\n\nPartition table entries are not in disk order\n<\/p><\/blockquote>\n<p>To make changes to a disk select the correct that you previously listed.  I put quotes around the name.  I do not know if you need to do that.:<\/p>\n<blockquote><p>~ # fdisk \/dev\/disks\/&#8221;t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389&#8243;<\/p>\n<\/blockquote>\n<p>To display the current disk partitions I am trying to add:<\/p>\n<blockquote><p>The number of cylinders for this disk is set to 19457.<br \/>\nThere is nothing wrong with that, but this is larger than 1024,<br \/>\nand could in certain setups cause problems with:<br \/>\n1) software that runs at boot time (e.g., old versions of LILO)<br \/>\n2) booting and partitioning software from other OSs<br \/>\n   (e.g., DOS FDISK, OS\/2 FDISK)<\/p>\n<p>Command (m for help): p<\/p>\n<p>Disk \/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389: 160.0 GB, 160041885696 bytes<br \/>\n255 heads, 63 sectors\/track, 19457 cylinders<br \/>\nUnits = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p>                                                                                 Device Boot      Start         End      Blocks  Id System<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p1   *         1     16072 129090560    7  HPFS\/NTFS<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p2         19072     19456   3087360    7  HPFS\/NTFS<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p3         16072     19072  24100864+   f  Win95 Ext&#8217;d (LBA)<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p5         16072     17325  10066944    b  Win95 FAT32<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p6         17325     18616  10371072    b  Win95 FAT32<\/p>\n<p>Partition table entries are not in disk order\n<\/p><\/blockquote>\n<p>Delete the primary partitions:<\/p>\n<blockquote><p>Command (m for help): d<br \/>\nPartition number (1-6): 1<\/p>\n<p>Command (m for help): d<br \/>\nPartition number (1-6): 2<\/p>\n<p>Command (m for help): d<br \/>\nPartition number (1-6): 3\n<\/p><\/blockquote>\n<p>List to verify the partitions are deleted:<\/p>\n<blockquote><p>Command (m for help): p<\/p>\n<p>Disk \/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389: 160.0 GB, 160041885696 bytes<br \/>\n255 heads, 63 sectors\/track, 19457 cylinders<br \/>\nUnits = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p>                                                                                 Device Boot      Start         End      Blocks  Id System\n<\/p><\/blockquote>\n<p>Create one large partition on the drive.  This probably did not need to be done.:<\/p>\n<blockquote><p>Command (m for help): n<br \/>\nCommand action<br \/>\n   e   extended<br \/>\n   p   primary partition (1-4)<br \/>\np<br \/>\nPartition number (1-4): 1<br \/>\nFirst cylinder (1-19457, default 1): Using default value 1<br \/>\nLast cylinder or +size or +sizeM or +sizeK (1-19457, default 19457): Using default value 19457\n<\/p><\/blockquote>\n<p>Write or save the new configuration.  This is the point of no return.:<\/p>\n<blockquote><p>Command (m for help): w<br \/>\nThe partition table has been altered!<\/p>\n<p>Calling ioctl() to re-read partition table\n<\/p><\/blockquote>\n<p>List the saved partition scheme.:<\/p>\n<blockquote><p>~ # fdisk -l \/dev\/disks\/&#8221;t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389&#8243;<\/p>\n<p>Disk \/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389: 160.0 GB, 160041885696 bytes<br \/>\n255 heads, 63 sectors\/track, 19457 cylinders<br \/>\nUnits = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p>                                                                                 Device Boot      Start         End      Blocks  Id System<br \/>\n\/dev\/disks\/t10.ATA_____WDC_WD1600AAJS2D60Z0A0_&#8230;_WD2DWCAV3C053389p1             1     19457 156288321   83  Linux<\/p>\n<p>~ #<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I attempted to add a disk to a VMware ESXi 5.0. The system recognized the drive, but would not allow me to add it as a datastore. The disk had data on it, but I did not care and just wanted to format it to add it my datastores. Conveniently, I actually was able to [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-854","post","type-post","status-publish","format-standard","hentry","category-documentation"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=854"}],"version-history":[{"count":7,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/854\/revisions"}],"predecessor-version":[{"id":862,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/854\/revisions\/862"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}