vSphere Replication - Cannot resize partition using /opt/vmware/bin/extend_system_partition.sh command
search cancel

vSphere Replication - Cannot resize partition using /opt/vmware/bin/extend_system_partition.sh command

book

Article ID: 394763

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

You are unable to expand a partition in the vSphere replication appliance 

1. This issue arises after VRMS is upgraded from 9.0.0 to 9.0.1

2. You cannot resize partition using /opt/vmware/bin/extend_system_partition.sh command

3. /dev/sda3 or /dev/mapper/support_vg-support could be full 

root@VRMS [ ~ ]# df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                        4.0M     0  4.0M   0% /dev
tmpfs                           5.9G   44K  5.9G   1% /dev/shm
tmpfs                           2.4G  732K  2.4G   1% /run
tmpfs                           4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/sda3                        14G  4.3G  8.7G  33% /
tmpfs                           5.9G  480K  5.9G   1% /tmp
/dev/sda2                       238M   36M  190M  16% /boot
/dev/mapper/support_vg-vrmsdb   9.8G  101M  9.2G   2% /var/lib/vrmsdb
/dev/mapper/support_vg-logs     975M  442M  483M  48% /opt/vmware/logs
/dev/mapper/support_vg-support  2.0G  1.9G     0 100% /opt/vmware/support
tmpfs                           1.2G     0  1.2G   0% /run/user/666

 

Environment

VMware vSphere Replication 9.x

Cause

You cannot extend the partition in the appliance because the parted command has changed. 

root@VRMS [ /home/admin ]# /opt/vmware/bin/extend_system_partition.sh
Check /dev/sda3
Current size for partition /dev/sda3 is 6.7G
Resize partition /dev/sda3
Error: Partition doesn't exist.
Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?
Yes/No? Yes
Yes
Error: Invalid number.
Could not resize partition /dev/sda3
Resize filesystem on partition /dev/sda3
resize2fs 1.46.5 (30-Dec-2021)
The filesystem is already 1768699 (4k) blocks long.  Nothing to do!

New size for partition /dev/sda3 is 6.7G
Partition /dev/sda3 is not resized.

Resolution

 

 

Additional Information

Workaround


1. Stop the vSphere Replication Management Server virtual machine.
2. Increase the virtual disk size of Hard Disk 1 to 16 GB or higher as needed 
3. Power ON the vSphere Replication Management Server virtual machine.
4. Edit /opt/vmware/bin/extend_system_partition.sh file and make changes as shown below before running the command:

echo Resize partition $PARTITION
#parted ---pretend-input-tty $DEVICE unit % resizepart Fix $PARTITION_NUMBER Yes 100% || parted ---pretend-input-tty $DEVICE unit % resizepart $PARTITION_NUMBER Yes 100% ||
parted $DEVICE resizepart $PARTITION_NUMBER 100% ||
(echo "Could not resize partition $PARTITION" && exit 2)

5. Run the command - /opt/vmware/bin/extend_system_partition.sh

root@VRMS [ ~ ]# /opt/vmware/bin/extend_system_partition.sh
Check /dev/sda3
Current size for partition /dev/sda4 is 13.7G
Resize partition /dev/sda3
Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?
Yes/No? Yes
Yes
Information: You may need to update /etc/fstab.

Resize filesystem on partition /dev/sda3
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/sda3 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/sda4 is now 5963003 (4k) blocks long.

New size for partition /dev/sda3 is 22.7G
Partition /dev/sda4 is resized successfully.