VMware Cloud Community
pernika
Contributor
Contributor

Extend the partition failed (read only)

Hello everyone,

I'm trying to extend a partition but it failed with "read-only file system during write....) 

I use the information from here:

https://kb.vmware.com/s/article/2002461 and https://www.ubackup.com/enterprise-backup/failed-to-expand-vmfs-datastore.html#:~:text=Failed%20to%2...

because over browser didn't worked. It is ESXi version: 6.5.0 ESXi build number: 7967591

So, my commands:

partedUtil getptbl "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0" - article 

naa.6d0946600af2c3002129befe0bb1de7d, partition 4 - VMFS datastore by me

partedUtil getptbl "/vmfs/devices/disks/naa.6d0946600af2c3002129befe0bb1de7d"

gpt
243133 255 63 3905945600
1 2048 1026047 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
2 1026048 1230847 796BADD36BBF4D9FB631466EB71A4965 unknown 0
3 1230848 5425151 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
4 5425152 2204448408 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

partedUtil getUsableSectors "/vmfs/devices/disks/DeviceName" - article

partedUtil getUsableSectors "/vmfs/devices/disks/naa.6d0946600af2c3002129befe0bb1de7d"

34 3905945566

2204448408 - what shows getptbl
2200008408 - what I want to use


partedUtil resize "/vmfs/devices/disks/DeviceName" PartitionNumber NewStartSector NewEndSector - article

partedUtil resize "/vmfs/devices/disks/naa.6d0946600af2c3002129befe0bb1de7d" 4 5425152 2200008408 - what I execute and got the error

Does someone has an idea how to proceed further?

Thanks

0 Kudos
11 Replies
pernika
Contributor
Contributor

error_esx.jpg

storage.jpg

 Some screenshots from the ESX.

0 Kudos
a_p_
Leadership
Leadership

You're saying that you want to extend the partition, but the end sector in the command is less than the current one!?

Aside from that the existing partitions look unusual to me. Have they been created (or expanded) manually?

André

0 Kudos
VM_Yamato
Hot Shot
Hot Shot

Could you try VMFS expansion from GUI?

Increase VMFS Datastore Capacity - VMware Docs

Yamato Sakai
Technical Training Instructor | Dell Technologies Education
VCP-DCV 5,6.x, 2020, 2021
VCIX-DCV
VCIX-NV
vSAN HCI Master Specialist
0 Kudos
pernika
Contributor
Contributor

Hi Andre,

I can't remember much about creating the existing one, cause it happened like 3-4 years ago. 

"end sector in the command is less than the current one" - yes, because I've wanted to extend the vmfs where the VMs are with a couple of GB and not occupy the entire space. Just to have some free GBs just in case.

I think that it doesn't matter what use as new end sector in the command as long as it is with 1 sector less than the current end sector, at least this is what I understand from the VMware article:

"Note: The New Ending Sector here would be 1 sector less than output of the total usable sector obtained in the previous step 7.  New Ending sector > 16879000 - 1 = 16878999."

Thanks

0 Kudos
pernika
Contributor
Contributor

Hi @VM_Yamato 

I've tried this as well. With Firefox, with Chrome, even with Internet Explorer. Every try failed, no matter if I select the entire free available space or just part of it. 

Maybe I should turn off the running VMs, before I can do it again, or even set a Maintenance mode?

Thanks

0 Kudos
VM_Yamato
Hot Shot
Hot Shot

Could you share the error message when you try expand the VMFS from browser?

VMFS supports online expansion. (No need VM shutdown.)

Yamato Sakai
Technical Training Instructor | Dell Technologies Education
VCP-DCV 5,6.x, 2020, 2021
VCIX-DCV
VCIX-NV
vSAN HCI Master Specialist
0 Kudos
a_p_
Leadership
Leadership

>>> because I've wanted to extend the vmfs
What you are trying to do is to decrease the VMFS datstore (partition), which could cause data loss!

André

0 Kudos
pernika
Contributor
Contributor

Hi Andre,

I see what you mean, but what should be the command in this case?

Thanks 

0 Kudos
pernika
Contributor
Contributor

Hi @VM_Yamato 

Failed to expand VMFS datastore R1-data - Cannot change the host configuration. 

This is what I got in Google Chrome

Thanks

0 Kudos
a_p_
Leadership
Leadership

Unless you have a good reason to hide the free disk space from the vSphere admins, I'd expand the VMFS partition to the available size, i.e. use the last usable sector from the partedUtil getUsableSectors command as the end sector in the resize command. VMware support a single VMFS volume per disk/LUN, so IMO there's at least no technical reason to reserve disk space.

Please note that you also need to increase the file system after resizing the partition. In your case the commands would be:

partedUtil resize "/vmfs/devices/disks/naa.6d0946600af2c3002129befe0bb1de7d" 4 5425152 3905945566
vmkfstools --growfs "/vmfs/devices/disks/naa.6d0946600af2c3002129befe0bb1de7d:4" "/vmfs/devices/disks/naa.6d0946600af2c3002129befe0bb1de7d:4"
vmkfstools -V

see e.g. https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.storage.doc/GUID-0E294FB8-FE79-4977...

As mentioned earlier, I wonder what these other 3 partitions are. Maybe some utility partition that the vendor (I've seen this in Dell systems) preinstalled!? If this was my system, I'd try to find out what these partitions are, and - in case they are not needed - backup all the VMs on the datastore, delete the datastore and wipe the disk's partition table, then finally create a new datastore on the disk, and restore the VMs

André

0 Kudos
pernika
Contributor
Contributor

Hi Andre,

thanks, now I realized what I made wrong. Thanks. Have a nice day.

 

0 Kudos