BOSH fails to change the persistent disk size
search cancel

BOSH fails to change the persistent disk size

book

Article ID: 293718

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

BOSH fails to increase the size of the persistent disk associated with a number of different tiles, including RabbitMQ, Redis, and MySQL. You will see the following error message from the OpsManager changelog.
 

Task 2214 | 14:55:26 | Updating instance rabbitmq-server: rabbitmq-server/34dab352-####-####-####-e5a42399ccd6 (0) (canary) (00:03:34)
                    L Error: Action Failed get_task: Task be2e5ad2-####-####-####-6e531ba3de6d result: Mounting persistent disk: Partitioning disk: Partitioning disk `/dev/sdc': Creating partition using parted: Running command: 'parted -s /dev/sdc unit B mkpart bosh-partition-0 1048576 214747316223', stdout: '', stderr: 'Warning: Not all of the space available to /dev/sdc appears to be used, you can fix the GPT to use all of the space (an extra 209715200 blocks) or continue with the current setting? 
Error: You requested a partition from 1048576B to 214747315712B (sectors 2048..419428351).
The closest location we can manage is 1048576B to 107374164992B (sectors 2048..209715166).
': exit status 1
Task 2214 | 14:59:00 | Error: Action Failed get_task: Task be2e5ad2-####-####-####-6e531ba3de6d result: Mounting persistent disk: Partitioning disk: Partitioning disk `/dev/sdc': Creating partition using parted: Running command: 'parted -s /dev/sdc unit B mkpart bosh-partition-0 1048576 214747316223', stdout: '', stderr: 'Warning: Not all of the space available to /dev/sdc appears to be used, you can fix the GPT to use all of the space (an extra 209715200 blocks) or continue with the current setting? 
Error: You requested a partition from 1048576B to 214747315712B (sectors 2048..419428351).
The closest location we can manage is 1048576B to 107374164992B (sectors 2048..209715166).



Environment

Product Version: 2.9

Resolution

The issue is caused when the persistent disk is increased multiple times without the VM being recreated. 

If you run lsblk command from inside the VM, you can see that the persistent disk name is sdd1 and the mountpoint is /var/vcap/store. When BOSH recreates a VM, the persistent disk name is sdc1 and the mountpoint is /var/vcap/store

rabbitmq-server/34dab352-####-####-####-e5a42399ccd6:~# lsblk --all
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop1    7:1    0        0 loop
sdd      8:48   0  150G  0 disk
└─sdd1   8:49   0  150G  0 part /var/vcap/store
sdb      8:16   0   16G  0 disk
├─sdb2   8:18   0  8.2G  0 part /var/vcap/data
└─sdb1   8:17   0  7.8G  0 part [SWAP]
loop6    7:6    0        0 loop
loop4    7:4    0        0 loop
sr0     11:0    1   50K  0 rom
loop2    7:2    0        0 loop
loop0    7:0    0        0 loop
sdc      8:32   0  200G  0 disk
loop7    7:7    0        0 loop
sda      8:0    0    3G  0 disk
└─sda1   8:1    0    3G  0 part /
loop5    7:5    0        0 loop
loop3    7:3    0        0 loop


This means that the VM persistent disk configuration has been changed at some point and the VM was never recreated. In order to get the correct disk configuration, you can recreate the VM with BOSH command, which is the recommended method, or you can reboot the VM from the IaaS or Linux command.