VMware Cloud Community
tjolo
Contributor
Contributor
Jump to solution

Cant extend my Datastore

Hello,

First of all i will share some system information, so its easy to understand the issue Smiley Happy

We have 1 V-Center server, controlling 1 ESXi 6 U2 server, with 2 local datastores and 1 iSCSI based datastore. (More ESXi servers will be applied later).

We want to expand the iSCSI based datastore on the ESXi host, and have extended it on the Synology server.

When looking at the the datastore in the vSphere client, we can see that the VMFS filesystem have been extended correctly - but the volume hasnt been:

Issue01.png

Im fairly new to VMware, and have normally been working in Hyper-V clusters - where expanding af cluster disk was like 3 clicks...

I would really appreciate if someone, would take the time, to help us through this Smiley Happy

Thanks in advance!

1 Solution

Accepted Solutions
flovv
Contributor
Contributor
Jump to solution

I hade exactly the same issue, Total Capacity showing less than Primary Partition and after that I couldn't do anything to get it to work in the web client nor in the old client.

I solved it by using these commands in a ssh to the ESXi

To get datastore name:

ls -l /vmfs/volumes/

To get device identifier (Partitions spanned (on "lvm")):

vmkfstools -P /vmfs/volumes/<Datastore_name>

NOTE: I'm not sure that the identifier always start with "naa.", but all mine iscsi were. Also note the ":1" later, it should be the partition and as far as I know, there should only be one.

Verify that there only is one partition on the VMFS volume:

partedUtil get "/vmfs/devices/disks/naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

To grow the vmfs datastore

vmkfstools --growfs "/vmfs/devices/disks/naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:1" "/vmfs/devices/disks/naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:1"

Hope it works Smiley Wink

View solution in original post

16 Replies
Mattallford
Hot Shot
Hot Shot
Jump to solution

If you log into the vSphere Web Client > Datastores > Right click on the datastore > Increase datastore capacity, can you let us know what you see?

Hopefully you see the datastore here with the 'expandable' property set to 'Yes'. If so, select that and click next, and then change the drop down to use the remaining space to expand the datastore.

Cheers, Matt.

VCP6-DCV | VCAP6-DCV Deploy @mattallford If you found my answers useful, please help me by marking them as Helpful or Correct!
Reply
0 Kudos
tjolo
Contributor
Contributor
Jump to solution

Hello,

Thank you for taking the time, to trying to resolve the problem Smiley Happy

Unfortunately i cant see the "free" space, so im not able to increase the datastore.

Issue02.png

Any other thoughts? Smiley Happy

Reply
0 Kudos
flovv
Contributor
Contributor
Jump to solution

I hade exactly the same issue, Total Capacity showing less than Primary Partition and after that I couldn't do anything to get it to work in the web client nor in the old client.

I solved it by using these commands in a ssh to the ESXi

To get datastore name:

ls -l /vmfs/volumes/

To get device identifier (Partitions spanned (on "lvm")):

vmkfstools -P /vmfs/volumes/<Datastore_name>

NOTE: I'm not sure that the identifier always start with "naa.", but all mine iscsi were. Also note the ":1" later, it should be the partition and as far as I know, there should only be one.

Verify that there only is one partition on the VMFS volume:

partedUtil get "/vmfs/devices/disks/naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

To grow the vmfs datastore

vmkfstools --growfs "/vmfs/devices/disks/naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:1" "/vmfs/devices/disks/naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:1"

Hope it works Smiley Wink

MBrownWFP
Enthusiast
Enthusiast
Jump to solution

Have you gone to [host] > Manage > Storage and run a rescan of the storage adapters?


You may need to do this manually before the additional space you allocated on the NAS/SAN becomes visible and available for extension.

Reply
0 Kudos
AdilArif
Enthusiast
Enthusiast
Jump to solution

Was the datastore force mounted?

Cheers, Adil Arif https://in.linkedin.com/pub/adil-arif/5b/a22/30 Blog: http://enterprisedaddy.com
Reply
0 Kudos
ThompsG
Virtuoso
Virtuoso
Jump to solution

Sorry if this sound's obvious but have you tried via the vSphere client pointed directly at the ESXi host, i.e. not through vCenter. Do this if you haven't already tried and see if the VMFS volume shows and can be extended when directly connected to the host.

Kind regards.

Reply
0 Kudos
tjolo
Contributor
Contributor
Jump to solution

Hello,

Thank you for your comment, and sorry for the response delay Smiley Happy

the commands provided didnt work, but im pretty sure its my fault - pretty new to VMware...

Issue03.png

Reply
0 Kudos
flovv
Contributor
Contributor
Jump to solution

I can't see whats wrong in the syntax.

When I try it with the wrong path I get a different error:

[root@esxi01:~] vmkfstools --growfs /vmfs/devices/disks1/naa.60003ff24d0844cbad0ce012442f053a:1 /vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f0531:1

Device path name "/vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f0531:1" is not a valid absolute or relative path

Failed to resolve volume device path /vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f0531:1.

Error: No such file or directory

When I write the correct, on a disk that can't grow, it looks like this:

[root@esxi01:~] vmkfstools --growfs "/vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f053a:1" "/vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f053a:1"

Underlying device has no free space

Error: No space left on device

Also working without the " " btw. Happened to me a while back when I copied from a blog that the "" was some other sort that the command didn't like.

[root@esxi01:~] vmkfstools --growfs /vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f053a:1 /vmfs/devices/disks/naa.60003ff24d0844cbad0ce012442f053a:1

Underlying device has no free space

Error: No space left on device

Try comparing my syntax with yours (not the first), and/or paste yours and I can see if there is any difference that I miss in the picture you attached.

Reply
0 Kudos
flovv
Contributor
Contributor
Jump to solution

Did you ever solve this?

Reply
0 Kudos
tjolo
Contributor
Contributor
Jump to solution

Hello,

No i wasnt able to succeed extending the datastore, so i decided just to create a new datastore insted.

Thanks for your time, and your guides on how you normally accomplish this Smiley Happy

Reply
0 Kudos
harrythew
Contributor
Contributor
Jump to solution

I had this same issue and I was able to fix it by repairing the GPT on the device. I first realized there was an issue when running the command 'partedUtil getptbl "/vmfs/devices/disks/<volume-in-question>"' ​returned an error. I then ran partedUtil fixGpt.

Reply
0 Kudos
Photubias
Enthusiast
Enthusiast
Jump to solution

Same issue here ...

Clearly there is free space, but neither the GUI nor CLI helps.

Maybe this has something to do with the fact that 14 hosts are using the datastore?

help.PNG

Thanks in advance

Reply
0 Kudos
Finikiez
Champion
Champion
Jump to solution

can you try execute the following commands

1. partedutil getUsableSectors /vmfs/devices/disks/naa.id

this will give your the number of usable sectors on disk. Compare this value with the value you get from command

partedutil get /vmfs/devices/disks/naa.id

2. If the value of usable sectors is higher than the value you get from 'get' command. Then run the command

partedutil resize /vmfs/devices/disks/naa.id 1 2048 <new value>

3. Then run vmkfstools --growfs command as you already tried.

Can you provide ESXi version and build number, please?

Reply
0 Kudos
Photubias
Enthusiast
Enthusiast
Jump to solution

Hi,

Thanks for getting back to me, this is the output from the commands. I think, somehow, the partition table is corrupted. However, the datastore is in use and is serving 100+ VM's. So it is accessible, although there does not seem to be a partition table ...

It also seems that fixing the Gpt table does not work.

[root@ti-bladeA001:~] partedUtil getUsableSectors /vmfs/devices/disks/naa.6001405feccd0dc91d34f1a906a4c4fc
Unknown partition table on disk /vmfs/devices/disks/naa.6001405feccd0dc91d34f1a906a4c4fc

[root@ti-bladeA001:~] partedUtil get /vmfs/devices/disks/naa.6001405feccd0dc91d34f1a906a4c4fc
150122 255 63 2411716608

[root@ti-bladeA001:~] partedUtil fixGpt /vmfs/devices/disks/naa.6001405feccd0dc91d34f1a906a4c4fc

FixGpt tries to fix any problems detected in GPT table.
Please ensure that you don't run this on any RDM (Raw Device Mapping) disk.
Are you sure you want to continue (Y/N): Y
GPT table not found on disk. Only disk with gpt table is fixed.


[root@ti-bladeA001:~] uname -a
VMkernel ti-bladeA001.howest.be 6.0.0 #1 SMP Release build-5572656 May 17 2017 16:56:29 x86_64 x86_64 x86_64 ESXi

Would there be a command to 'safely' (which is of course not 100%) recreate the Gpt table?

Regards and thanks

Reply
0 Kudos
Finikiez
Champion
Champion
Jump to solution

Sure, you can recreate partition table using instruction from KB VMware Knowledge Base

Photubias
Enthusiast
Enthusiast
Jump to solution

That solved it!

Had to "guess"/"calculate" the end sector number (roughly 1TB recalculated to xxx sectors), after which I had a rough and working partition table. After manually setting the partition table, I could grow the file system (vmkfstools --growfs <volume> <volume>) and done. All this with live VM's and without rebooting!

Thanks again Smiley Happy