Details
-
Bug
-
Resolution: Fixed
-
Low
-
None
-
HCS 2.2.0, HCS 2.2.1, HCS 2.2.4
-
None
-
Severity 2 - Major
Description
Summary
On boot of HipChat Server, the /file_store and /chat_history disks are not resized accordingly when free space is allotted in the VM preferences
Environment
HipChat Server v2.2.0, v2.2.1
Steps to Reproduce
- Shut down HipChat Server VM
- In your VM preferences, increase <vm-name>-disk-2.vdmk or <vm-name>-disk-3.vdmk according to the VM software guidelines.
- Boot up Hipchat Server
- Run df -h in the command line and notice that the new space has not been allocated
Expected Results
The appropriate disks will show the increased space.
Actual Results
The disks are not scaled and show the old disk alottment.
Notes
You can run lsblk in the HipChat Server console to show if the disk has been expanded but the partition hasn't. This will show you if you are affected by the bug if the disk output shows the new volume size, but the partition does not.
The issue appears to lie with /opt/atlassian/hipchat/sbin/_scale_disks.sh (which is referenced in the workaround).
Workaround
- Log into the HipChat Server command line.
- Gain root:
sudo dont-blame-hipchat
- Next, we're going to edit the _scale_disks.sh script
nano /opt/atlassian/hipchat/sbin/_scale_disks.sh
- Line 56 and 57 of this script (use CTRL+C to read the line) we will need to add a 1 at the end of each of the disk path. For instance, before the change, the original lines look like:
df | grep -q mapper/chat && lvm_grow /dev/mapper/chat_history_vg-chat_history /dev/sdb df | grep -q mapper/file && lvm_grow /dev/mapper/file_store_vg-file_store /dev/sdc
And after the script is edited, it will look like this:
df | grep -q mapper/chat && lvm_grow /dev/mapper/chat_history_vg-chat_history /dev/sdb1 df | grep -q mapper/file && lvm_grow /dev/mapper/file_store_vg-file_store /dev/sdc1
- Use CTRL+X to exit and Y to save changes.
- Now execute the script:
/opt/atlassian/hipchat/sbin/_scale_disks.sh
- Next, copy and run this command exactly into the HipChat Server command line:
NEWSIZE=$(parted /dev/sdc print | grep Disk | awk '{ print $3 }') && parted /dev/sdc resizepart 1 $NEWSIZE
This step is geared towards increasing the /file_store partition. If you need to increase /chat_storage, replace /dev/sdc with /dev/sdb in both places it's referenced above before running.
- And finally, rerun step 6:
/opt/atlassian/hipchat/sbin/_scale_disks.sh
- Then check to see if the disk has scaled:
df -h
Attachments
Issue Links
- mentioned in
-
Page Loading...