Warning: The available space to /dev/disks/naa. appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (x blocks).

I had to hold a training and decided to recycle some (relatively) old hosts and have them installed with vSphere 6.5.0d and most important vSAN 6.6 as I had 4 hosts, each with 5 SSDs

I thought I was lucky because I found vSphere 6.0 installed on them and thought that if I’m just upgrading all components, will be faster than a clean reinstall.

I was wrong!

The old cluster I destroyed, had vSAN installed (some colleague played with it last year) and when I created the new vSAN cluster, some of the disks could not be claimed as the partitions (or GPT Table) were corrupted.

It didn’t took me a long time to investigate which disks were not claimed of my new vSAN cluster but it took me a lot to actually clear the partition and fix the GPT table on each “broken” disk

I tried to delete them from vCenter via HTML5 and Flash clients, from ESXi via the HTML and C# client, but wasn’t successful so I tried also with partedUtil via SSH but still no success as I was getting the following error:

[root@vSAN-HOST666:~] partedUtil delete "/vmfs/devices/disks/naa.5002538250021a97" 1
Error: Input/output error during read on /dev/disks/naa.5002538250021a97
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/naa.5002538250021a97) diskSize (390721968) AlternateLBA (1948057599) LastUsableLBA (1948057566)
Warning: The available space to /dev/disks/naa.5002538250021a97 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (1557335632 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (390721968) AlternateLBA (1948057599) LastUsableLBA (1948057566) NewLastUsableLBA (390721934)
Error: Can't have a partition outside the disk!
Unable to construct disk from device /vmfs/devices/disks/naa.5002538250021a97

I got really pissed off that I couldn’t delete those partitions and was close to admit defeat but I got lucky and found this VMware KB.

So… it seems that creating an MS-DOS partition on the respective “broken” disk you fix the issue

Here’s the command if you’re lazy enough not to click the above link:

 partedUtil setptbl /vmfs/devices/disks/naa.5002538250021a97 msdos

 

After this step is completed, you just need to Erase partitions (vCenter or ESXi) and claim the disks in vSAN

Thanks VMware!

Uhhh…

This is why I love Mondays…

Victor

 

 

 

Advertisements
About

Victor an End User Computing Architect and Consultant. You find him most of the time on Twitter (@01004753) but also on LinkedIn evangelizing new technologies and processes that can change in good, the world we live in. Victor has expertise in Server & Client Virtualization, Client Management, GPU Virtualization, HyperConvergence and Enterprise Security

Tagged with: , , , , ,
Posted in error, fixes, HowTo, vCenter, VMware, vSAN

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow Victor Homocea on WordPress.com
My Gravatar

Marius Sandbu

Software-defined datacenter, End user computing & cloud Architect (Microsoft MVP Azure, vExpert, Veeam Vanguard, Citrix CTA)

Trafictube.ro

cu camera pe bord

Thincomputing.net

by Michel Roth on the VDI, Desktop Virtualizaion, Application Virtualization, UEM aspects of End User Computing and Product Management

Ingmar Verheij

About Citrix, Remote Desktop, Performance, Workspace, Monitoring and more...

Carl Stalhood

Filling gaps in EUC vendor documentation

Archy.net

Don't Follow the Trend

Victor Homocea

blog.ogs.ro

Ray Heffer

Double VCDX #122 | Cloud Architect

Elvis Apostol

Calatorind prin lumi indepartate, pictez in cuvinte, lacrimi de culori.

%d bloggers like this: