Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Fix vrmsdb out of space issue (due to no auto-vacuum) without partition resize (66817)

Last Updated: 1/23/2019Categories: TroubleshootingTotal Views: 5787Language:
English

2 like this article

Subscribe to get an email
newsletter with new updates

2 people found this helpful Please provide article feedback:

Symptoms

Replicated VM's getting alerts : Invalid: Virtual machine <name> is no longer protected. Database temporarily unavailable or has network problems.

Cause

When a vPostgres database is manipulated, the records that are affected are changed, but the old copy is retained for reference. Especially, during a delete operation, the records are only marked as deleted. The databases in HMS virtual machines run a maintenance job automatically to reclaim the space and remove these unused inaccessible records, but sometimes due to a bug of a race condition at boot, it is necessary to run the maintenance manually.

Resolution

Per-requisites:

To check the database storage space, run this command:

du -h /var/lib/vrmsdb --max--depth=0

To check the storage usage, run this command

df /var/lib/vrmsdb

To check the failure of autovacuum, run the command

/usr/bin/pgrep -f autovacuum
If the autovacuum command returns PID, then further investigation is required. However, if no PID is returned follow the resolution steps given below.

To resolve the issue, run the following steps;

Add a new hard disk to the VR appliance with the vCenter.

Log in to the VR appliance as the root user.

Find the newly added disk and format it and mount it.

List all the disks

fdisk -l|grep '^Disk'

Format the disk, let's assume the disk is /dev/sdc.

mkfs.ext3 /dev/sdc

Mount the disk, let's mount it to the /transition directory.

mkdir /transition
mount /dev/sdc /transition

Change the owner of the directory to vrmsdb.

chown vrmsdb:vrmsdb /transition

Log in to the psql cli and alter the tablespace for database vrmsdb.

/opt/vmware/vpostgres/current/bin/psql postgres -U vrmsdb

Execute below commands in the cli

Create a new table space on the new disk(named with transition)

CREATE TABLESPACE transition LOCATION '/transition';

Disable the connection to the database

UPDATE pg_database SET datallowconn = false WHERE datname = 'vrmsdb';

Terminate all the connections to the database.

SELECT pg_terminate_backend(pid) FROM pg_stat_activity

WHERE datname = 'vrmsdb' AND pid <> pg_backend_pid();

Change the database tablespace.

ALTER DATABASE vrmsdb SET TABLESPACE transition;

Enable the connection to the database

UPDATE pg_database SET datallowconn = true WHERE datname = 'vrmsdb';

Exit the cli

\q

Manually execute the vacuumdb.

/opt/vmware/vpostgres/current/bin/vacuumdb -a -e -v -f -U vrmsdb > /tmp/vacuumdb.log

Reindex the db.

/opt/vmware/vpostgres/current/bin/reindexdb -a -U vrmsdb > /tmp/reindexdb.log"

Log in to the psql cli and restore the tablespace for database vrmsdb.

/opt/vmware/vpostgres/current/bin/psql postgres -U vrmsdb

Execute below commands in the cli

Disable the connection to the database.

UPDATE pg_database SET datallowconn = false WHERE datname = 'vrmsdb';

Terminate all the connections to the database.

SELECT pg_terminate_backend(pid) FROM pg_stat_activity
WHERE datname = 'vrmsdb' AND pid <> pg_backend_pid();

Change the table space of vrmsdb back to the default  ALTER DATABASE vrmsdb SET TABLESPACE pg_default;

Enable the connection to the database

UPDATE pg_database SET datallowconn = true WHERE datname = 'vrmsdb';

Drop the transition table space.

DROP TABLESPACE transition;

Exit the cli.

Check the database storage space and verify space usage decrease, run this command,

du -h /var/lib/vrmsdb --max--depth=0

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
ローリング メンテナンス タスクが静止状態で停止している (66843)

KB
•
无法使用 Horizon Client 启动应用程序或无法启动 AppBlast 门户，用户会收到以下错误：“此桌面的显示协议当前不可用。 错误: AGENT_ERR_PROTOCOL_FAILURE” (66784)

KB
•
客户无法在 Horizon Cloud 托管环境中更新域绑定帐户详细信息 (66888)

Results 1-3 of 3

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere Replication

VMware vSphere

Related Versions:

VMware vSphere Replication 8.x

Take Our Survey

Support Assistant