What is the partedUtil Utility?
You can use the partedUtil command line utility to directly manipulate partition tables for local and remote SAN disks on ESX and ESXi. The partedUtil command line only is supported for disk partitioning from ESXi 5.0. The command line utility fdisk does not work with ESXi 5.0.
Note: VMFS Datastores can be created and deleted using the vSphere Client connected to ESX/ESXi or to vCenter Server. It is not necessary to manually create partitions using the command line utility
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 marking any change. Ensure that there is no active I/O to a partition prior to modifying it.
We came across this tool when we had issues deleting a datastore. It was recommended we try deleting the partition on the datastore which allowed us to completely remove it from vCenter in the end.
What actions can partedUtil do?
- Retrieve a list of Disk devices
- ls /vmfs/devices/disks/
- Printing an existing partition table
- partedUtil getptbl “/vmfs/devices/disks/DeviceName”
- Delete a partition table
- partedUtil delete “/vmfs/devices/disks/DeviceName” PartitionNumber
- Resize a partition
- partedUtil resize “/vmfs/devices/disks/DeviceName” PartitionNumber NewStartSector NewEndSector
- Create a new partition table
- partedUtil setptbl “/vmfs/devices/disks/DeviceName” DiskLabel [“partNum startSector endSector type/guid attribute”]*
Links