Storage

 View Only
Expand all | Collapse all

Extend the partition failed (read only)

  • 1.  Extend the partition failed (read only)

    Posted Jul 21, 2022 01:00 PM

    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%20expand%20VMFS%20datastore%20in%20VMware%20ESXi,fill%20that%20available%20adjacent%20capacity

    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



  • 2.  RE: Extend the partition failed (read only)

    Posted Jul 21, 2022 01:02 PM

    error_esx.jpg

    storage.jpg

     Some screenshots from the ESX.



  • 3.  RE: Extend the partition failed (read only)

    Posted Jul 21, 2022 08:36 PM

    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é



  • 4.  RE: Extend the partition failed (read only)

    Posted Jul 25, 2022 01:38 PM

    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



  • 5.  RE: Extend the partition failed (read only)

    Posted Jul 25, 2022 05:20 PM

    >>> 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é



  • 6.  RE: Extend the partition failed (read only)

    Posted Jul 26, 2022 08:25 AM

    Hi Andre,

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

    Thanks 



  • 7.  RE: Extend the partition failed (read only)

    Posted Jul 26, 2022 03:41 PM

    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-BB72-6A3F123DD4A3.html

    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é



  • 8.  RE: Extend the partition failed (read only)

    Posted Jul 27, 2022 08:45 AM

    Hi Andre,

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

     



  • 9.  RE: Extend the partition failed (read only)

    Posted Jul 22, 2022 12:04 AM

    Could you try VMFS expansion from GUI?

    Increase VMFS Datastore Capacity - VMware Docs



  • 10.  RE: Extend the partition failed (read only)

    Posted Jul 25, 2022 01:40 PM

    Hi  

    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



  • 11.  RE: Extend the partition failed (read only)

    Posted Jul 25, 2022 01:55 PM

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

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



  • 12.  RE: Extend the partition failed (read only)

    Posted Jul 26, 2022 08:34 AM

    Hi  

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

    This is what I got in Google Chrome

    Thanks