天天看點

ESXI5.5添加本地磁盤出錯的解決

在esxi5.5的虛拟化伺服器上添加一塊900G的硬碟時,報如下錯誤。

<a href="http://s3.51cto.com/wyfs02/M00/70/F2/wKioL1XB0QWT86meAADRvjplowE079.jpg" target="_blank"></a>

這個錯誤的出現主要是因為這塊盤被使用過,還帶有原分區資訊。

解決辦法:

首先到 配置-&gt;安全配置檔案裡啟用ssh服務。然後使用SecureCRT或PUTTY遠端登陸EXSI主機。

<a href="http://s3.51cto.com/wyfs02/M02/70/FA/wKioL1XC1ZaCzqW0AAIHcnxRaP8872.jpg" target="_blank"></a>

1、檢視分區資訊 

ls /vmfs/devices/disks

<a href="http://s3.51cto.com/wyfs02/M01/70/F3/wKioL1XB1CSiSpGjAAFa9MmqOeU605.jpg" target="_blank"></a>

2、與exsi上的辨別符對應

<a href="http://s3.51cto.com/wyfs02/M02/70/F3/wKioL1XB1FWQtD2yAAOBmWs8Ms8160.jpg" target="_blank"></a>

3、使用partedutil工具看到有1個分區,然後删除分區。(注:LINUX裡建立和調整分區一般用FDISK和PARTED。 fdisk可劃分單個分區不超過2T的分區,parted指令可以劃分單個分區大于2T的GPT格式的分區,在EXSI裡使用partedUtil指令來設定和調整分區。)

#partedUtil delete vmfs/devices/disks/naa.600605b0051527001970471b0e906a8b 1

4、重新添加磁盤

<a href="http://s3.51cto.com/wyfs02/M01/70/F9/wKiom1XCIFLip5owAAFFrsn3ucQ656.jpg" target="_blank"></a>

5、選擇磁盤

<a href="http://s3.51cto.com/wyfs02/M02/70/F9/wKiom1XCIQ6jbU_MAAE_zyqs4TM704.jpg" target="_blank"></a>

6、選擇檔案系統

<a href="http://s3.51cto.com/wyfs02/M02/70/F9/wKiom1XCIXGRassjAAEKAJS0JVQ567.jpg" target="_blank"></a>

7、檢查磁盤布局并完成

<a href="http://s3.51cto.com/wyfs02/M02/70/F9/wKiom1XCIa3zVAciAAFohwehofU417.jpg" target="_blank"></a>

8、添加成功。

附:重置分區大小

The <code>partedUtil</code> command can be used to resize an existing partition on ESXi/ESX 4.0 and higher. This does not resize the file system within the partition, and is no different from deleting and recreating the partition with a new starting or ending sector.

To resize a partition, run this command:

<code>partedUtil resize "/vmfs/devices/disks/DeviceName" PartitionNumber NewStartSector NewEndSector</code>

Example: To move partition 4 such that it starts in the same location (for example, <code>2474073</code>) and ends at the new ending sector (<code>1234567890</code>), run this command:

<code>partedUtil resize "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0" 4 2474073 1234567890</code>

Caution: There is no facility to undo a partition table change other than creating a new partition table. Ensure that you have a backup before making any change. Ensure that there is no active I/O to a partition before modifying it.

本文轉自學海無涯部落格51CTO部落格,原文連結http://blog.51cto.com/549687/1736672如需轉載請自行聯系原作者

520feng2007

繼續閱讀