我想使用GPT在磁盘上创建一个VMFS分区。我知道使用esxi cli,我们可以使用partedUtil命令轻松地创建它
partedUtil setptbl /dev/disks/t10.ATA_____SAMSUNG_MZ7LM480HMHQ2D00005 gpt "3 1547328 937703040 AA31E02A400F11DB9590000C2911D1B8 0"但是我需要用一个救援磁盘来创建它。我试过fdisk,但是VMFS分区类型(AA31E02A400F11DB9590000C2911D1B8)不可用。我可以在标准linux发行版中使用哪个工具来创建VMFS分区?
谢谢
发布于 2020-04-08 00:39:18
它作为一个VMFS分区没有什么特别之处:您将与任何其他分区一样创建它,但使用VMFS。请注意,必须在ESXi (或使用VMWare工具)中格式化VMFS卷。如果您不知道自己在做什么,This可能是破坏性的:您应该先阅读手册。<#>Make确保在操作或格式化分区之前备份数据。
例如,使用gdisk:
squircle@weber:~$ sudo gdisk /dev/loop0 [5/191]
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-2097118, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-2097118, default = 2097118) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): fb00
Changed type of partition to 'VMWare VMFS'
Command (? for help): p
Disk /dev/loop0: 2097152 sectors, 1024.0 MiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 427EF575-E04D-4C65-8AF6-66CB127F0AE0
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2097118
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2097118 1023.0 MiB FB00 VMWare VMFS
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/loop0.注意,gdisk使用文件系统代码fb00来引用VMWare VMFS,但如果愿意,也可以键入完整的GUID。如果磁盘上已经有数据,请确保更改分区位置。
可以使用相同的实用程序系列验证分区是否具有正确的GUID:
squircle@weber:~$ sudo sgdisk -i 1 /dev/loop0 | head -n 1
Partition GUID code: AA31E02A-400F-11DB-9590-000C2911D1B8 (VMWare VMFS)https://serverfault.com/questions/1012656
复制相似问题