VMware VMFS分区及格式化

我在CentOS 7电脑上安装了VMware Workstation 15 Pro,再里面安装了VMware ESXi主机。今天,我在VMware Workstation里为这台主机添加了一块NVMe的硬盘,大小只有5G。从SSH登陆进去运行命令行,看看这个ESXi主机里的操做系统上如何对磁盘进行分区和格式化。bash

# df -h
//看到了以下的结果:
Filesystem   Size   Used Available Use% Mounted on
VMFS-6     142.5G  84.8G     57.7G  60% /vmfs/volumes/datastore1
vfat       249.7M 155.2M     94.6M  62% /vmfs/volumes/0ef1c67e-54175993-9656-932280ba9446
vfat       285.8M 172.9M    112.9M  60% /vmfs/volumes/5d653d0f-64439c8c-7b4c-000c298b51e3
vfat       249.7M 146.5M    103.2M  59% /vmfs/volumes/3e062d7e-1ad90a51-07ec-d5b812fdb036
vfat         4.0G  33.2M      4.0G   1% /vmfs/volumes/5d653d15-461dfccc-77a2-000c298b51e3


[root@172:~] fdisk -l

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

Found valid GPT with protective MBR; using GPT

Disk /dev/disks/mpx.vmhba0:C0:T0:L0: 629145600 sectors,     0
Logical sector size: 512
Disk identifier (GUID): 5e307c8f-fd9c-488d-b3bc-d83d6fbd4321
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 629145566

Number  Start (sector)    End (sector)  Size Name
     1              64            8191 4064K 
     2         7086080        15472639 4095M 
     3        15472640       314572766  142G 
     5            8224          520191  249M 
     6          520224         1032191  249M 
     7         1032224         1257471  109M 
     8         1257504         1843199  285M 
     9         1843200         7086079 2560M 
Disk /dev/disks/t10.NVMe____VMware_Virtual_NVMe_Disk________________VMWare_NVME2D0000____00000001: 5120 MB, 5368709120 bytes, 10485760 sectors
652 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/disks/t10.NVMe____VMware_Virtual_NVMe_Disk________________VMWare_NVME2D0000____00000001 doesn't contain a valid partition table

上面使用fdisk -l查看硬盘分区信息,提示说这个命令已通过时了,要使用partedUtil对磁盘进行格式化。ide

另外,还看到了那块空白的磁盘,盘符看起来怪怪的。ui

# partedUtil
Not enough arguments操作系统

Usage:
 Get Partitions : get <diskName>命令行

//获取磁盘的信息3d


 Set Partitions : set <diskName> ["partNum startSector endSector type attr"]*code

//设置磁盘信息
 Delete Partition : delete <diskName> <partNum>
 Resize Partition : resize <diskName> <partNum> <start> <end>
 Get Partitions : getptbl <diskName>
 Set Partitions : setptbl <diskName> <label> ["partNum startSector endSector type/guid attr"]*
 Fix Partition Table : fix <diskName>
 Create New Label (all existing data will be lost): mklabel <diskName> <label>
 Show commonly used partition type guids : showGuids
 Get usable first and last sectors : getUsableSectors <diskName>
 Fix GPT Table interactively : fixGpt <diskName>
 Show Partition Information : partinfo <diskName> <partNum>
 Add Partition Information : add <diskName> <label> ["partNum startSector endSector type/guid attr"]orm

相关文章
相关标签/搜索