解决esxi主机vmware 没法清除磁盘的报错

概述

今天新安装了esxi主机,这台服务器中有四块硬盘,固然我是把系统安装在u盘上的,在此以前这台服务器安装的是zstack,zstack是安装在四块硬盘中的其中一块硬盘上的,因此很显然,由于zstack是创建在centos上的,因此这块硬盘确定被分了不止一个分区,因此致使最后我安装完vmware格式化这块硬盘就报没法清除磁盘的错误了,解决方式很简单,以下centos

操做

首先把esxi主机的ssh打开,而后登陆主机,找到不能格式化的那块硬盘设备名,好比个人是 Local ATA Disk (t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L) 接着进入下面这个目录 cd /dev/disks 看下拥有的设备bash

[root@MiWiFi-R1CM-srv:/dev/disks] ls
naa.2000acde48234567                                                         vml.010000000020202020202020202020202039535a3443593445535433333230
naa.2000acde48234567:1                                                       vml.010000000020202020202020202020202039535a3443593445535433333230:1
naa.2000acde48234567:5                                                       vml.01000000002020202020202020202020205a3459354232374c535431303030
naa.2000acde48234567:6                                                       vml.01000000002020202020202020202020205a3459354232374c535431303030:1
naa.2000acde48234567:7                                                       vml.01000000002020202020202020202020205a3459354232374c535431303030:2
naa.2000acde48234567:8                                                       vml.01000000002020202020202020202020205a3459354232374c535431303030:3
naa.2000acde48234567:9                                                       vml.01000000002020202020202020202020205a34593552324d31535431303030
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L    vml.01000000002020202020202020202020205a34593552324d31535431303030:1
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L:1  vml.01000000002020202020202020202020205a34593553465243535431303030
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L:2  vml.01000000002020202020202020202020205a34593553465243535431303030:1
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L:3  vml.02000000002000acde4823456753616e446973
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5R2M1    vml.02000000002000acde4823456753616e446973:1
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5R2M1:1  vml.02000000002000acde4823456753616e446973:5
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5SFRC    vml.02000000002000acde4823456753616e446973:6
t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5SFRC:1  vml.02000000002000acde4823456753616e446973:7
t10.ATA_____ST3320613AS_________________________________________9SZ4CY4E     vml.02000000002000acde4823456753616e446973:8
t10.ATA_____ST3320613AS_________________________________________9SZ4CY4E:1   vml.02000000002000acde4823456753616e446973:9

没错 Local ATA Disk (t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L)这块硬盘有三个分区,因此如今咱们只要从新用fdisk创建分区表就能够,步骤以下服务器

[root@MiWiFi-R1CM-srv:/dev/disks] fdisk ./t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y5B27L

***
*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil
***

Found valid GPT with protective MBR; using GPT


Command (m for help): m
Command Action
o	create a new empty DOS partition table
p	print the partition table
q	quit without saving changes
s	create a new empty Sun disklabel

Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.


The number of cylinders for this disk is set to 121601.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table

以后你再登陆esxi主机去从新格式化硬盘就行了ssh

欢迎关注Bboysoul的博客www.bboysoul.com Have Funide

相关文章
相关标签/搜索