Sometimes, it may be required for you to increase datastore capacity by adding an extent via CLI when the host UI is not reachable.
Current usage on the datastores[root@localhost:~] df -hFilesystem Size Used Available Use% Mounted onVMFS-6 319.0G 1.4G 317.6G 0% /vmfs/volumes/Datastore-Name1VMFS-6 14.0T 14.0T 1.6G 100% /vmfs/volumes/Datastore-Name2VMFS-L 119.8G 10.5G 109.3G 9% /vmfs/volumes/OSDATA-########-########-####-############vfat 4.0G 211.2M 3.8G 5% /vmfs/volumes/BOOTBANK1vfat 4.0G 219.7M 3.8G 5% /vmfs/volumes/BOOTBANK2
ESXi
VMFS
Take the following steps to increase the capacity of the datastore by adding an extent via CLI
[root@localhost:~] localcli storage vmfs extent listVolume Name VMFS UUID Extent Number Device Name Partition------------------------------------------ ----------------------------------- ------------- ----------------------------- ---------datastore1 (3) 68######-########-####-##########fc 0 naa.##################### 8Datastore-01 68######-########-####-##########fc 0 naa.####################1 1OSDATA-########-########-####-############ 68######-########-####-##########fc 0 naa.##################### 7[root@localhost:~] esxcfg-scsidevs -cDevice UID Device Type Console Device Size Multipath Plugin Display Namenaa.##################### Direct-Access /vmfs/devices/disks/naa.##################### 14651290MB NMP PURE Fibre Channel Disk (naa.#####################)naa.####################1 Direct-Access /vmfs/devices/disks/naa.####################1 14651290MB NMP PURE Fibre Channel Disk (naa.####################1)naa.####################2 Direct-Access /vmfs/devices/disks/naa.####################2 14651290MB NMP PURE Fibre Channel Disk (naa.####################2)[root@localhost:/var/log] partedUtil getptbl /vmfs/devices/disks//vmfs/devices/disks/naa.####################2unknown1867777 255 63 30005842608partedUtil delete "/vmfs/devices/disks/naa.####################2" 1[root@localhost:~] partedUtil getptbl /vmfs/devices/disks/naa.####################1gpt1867777 255 63 300058426081 2048 30005841919 AA31E02A400F11DB9590000C2911D1B8 vmfs 0[root@localhost:~] partedUtil getUsableSectors /vmfs/devices/disks/naa.####################234 30005842574[root@localhost:~] partedUtil setptbl /vmfs/devices/disks/naa.####################2 gpt "1 2048 30005842573 AA31E02A400F11DB9590000C2911D1B8 0"gpt0 0 0 01 2048 30005842574 AA31E02A400F11DB9590000C2911D1B8 0[root@localhost:~] vmkfstools -Z /vmfs/devices/disks/naa.####################2:1 /vmfs/devices/disks/naa.####################1:1VMware ESXi Question:All data on /vmfs/devices/disks/t10.########################:1 will be lost. Continue and format? 0) _Yes 1) _No Select a number from 0-1: 0 Successfully spanned volume[root@localhost:~] localcli storage core adapter rescan --all[root@localhost:~] vmkfstools -V[root@localhost:~] [root@localhost:~] df -h Filesystem Size Used Available Use% Mounted on VMFS-6 319.0G 1.4G 317.6G 0% /vmfs/volumes/Datastore-Name1 VMFS-6 27.9T 14.0T 14.0T 50% /vmfs/volumes/Datastore-Name2 VMFS-L 119.8G 10.5G 109.3G 9% /vmfs/volumes/OSDATA-########-########-####-############ vfat 4.0G 211.2M 3.8G 5% /vmfs/volumes/BOOTBANK1 vfat 4.0G 219.7M 3.8G 5% /vmfs/volumes/BOOTBANK2An attempt to add the LUN as extent without creating the partition table and the VMFS partition, will fail with the following message:[root@localhost:~] vmkfstools -Z /vmfs/devices/disks/naa.####################2:1 /vmfs/devices/disks/naa.####################1:1Device path name "/vmfs/devices/disks/naa.####################2:1" is not a valid absolute or relative pathFailed to resolve volume device path naa.####################2:1.Usage: vmkfstools -Z span-partitionError: No such file or directory