{"id":135,"date":"2010-08-15T15:16:31","date_gmt":"2010-08-15T19:16:31","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=135"},"modified":"2010-08-15T15:52:07","modified_gmt":"2010-08-15T19:52:07","slug":"adam-instance-vmwarevcmsds-index-may-be-corrupt","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/virtualization\/adam-instance-vmwarevcmsds-index-may-be-corrupt\/","title":{"rendered":"ADAM Instance VMwareVCMSDS index may be corrupt"},"content":{"rendered":"<p>VMware vSphere vCenter Server installs an Active Directory Application Mode (ADAM) [aka Active Directory Lightweight Directory Service (ADLDS)] instance called VMwareVCMSDS.  I have had several problems with this service &#8212; one issue with the contents of the directory (see <a href=\"http:\/\/enterpriseadmins.org\/blog\/?p=46\">vCenter Migration<\/a>) and a couple with the actual ADAM\/ADLDS instance.  In a recent upgrade I moved a lab environment from vSphere 4.0 to 4.1 and started getting the following event log message: <\/p>\n<pre>VMwareVCMSDS (2428) ADAMDSA: Database 'D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\adamntds.dit': The secondary index 'INDEX_00000003' of table 'datatable' may be corrupt. If there is no later event showing the index being rebuilt, then please defragment the database to rebuild the index.<\/pre>\n<p>The solution to this problem was rather simple &#8212; but required working directly with the ADAM instance.  This took a little trial and error but here is a description of the solution in case you run into the same error:<\/p>\n<p>Stop the VMwareVCMSDS service:<\/p>\n<pre>net stop ADAM_VMwareVCMSDS<\/pre>\n<p>Enter the directory service database utility application:<\/p>\n<pre>dsdbutil<\/pre>\n<p>The following commands get you to the file configuration settings:<\/p>\n<pre>\r\nActivate Instance VMwareVCMSDS\r\nFiles\r\ninfo\r\n<\/pre>\n<p>Here is my test systems file configuration:<\/p>\n<pre>\r\nDrive Information:\r\n\r\nC:\\ NTFS (Fixed Drive  ) free(5.4 Gb) total(23.9 Gb)\r\nD:\\ NTFS (Fixed Drive  ) free(2.6 Gb) total(3.9 Gb)\r\n\r\nDS Path Information:\r\n\r\nDatabase   : D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\adamntds.dit - 4.1 Mb\r\nBackup dir : D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\dsadata.bak\r\nWorking dir: D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\r\nLog dir    : D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS - 30.0 Mb total\r\nedbres00002.jrs - 10.0 Mb\r\nedbres00001.jrs - 10.0 Mb\r\nedb.log - 10.0 Mb\r\n<\/pre>\n<p>To compact\/defrag the database type the following command in the dsdbutil screen:<\/p>\n<pre>compact to d:\\temp\\defragged<\/pre>\n<p>Here are the results of the compact operation:<\/p>\n<pre>\r\nInitiating DEFRAGMENTATION mode...\r\nSource Database: D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\adamntds.dit\r\nTarget Database: d:\\temp\\defragged\\adamntds.dit\r\n\r\nDefragmentation  Status (% complete)\r\n\r\n0    10   20   30   40   50   60   70   80   90  100\r\n|----|----|----|----|----|----|----|----|----|----|\r\n...................................................\r\n\r\nIt is recommended that you immediately perform a full backup\r\nof this database. If you restore a backup made before the\r\ndefragmentation, the database will be rolled back to the state\r\nit was in at the time of that backup.\r\n\r\nCompaction is successful. You need to:\r\ncopy \"d:\\temp\\defragged\\adamntds.dit\" \"D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\adamntds.dit\"\r\nand delete the old log files:\r\ndel D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\*.log\r\n<\/pre>\n<p>I created a zip file contianing all the files in: &#8220;D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS&#8221; before proceeding with the given instructions.<\/p>\n<pre>\r\ncopy \"d:\\temp\\defragged\\adamntds.dit\" \"D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\adamntds.dit\"\r\n<\/pre>\n<p>Answering yes to the overwrite files confirmation.<\/p>\n<pre>\r\ndel \"D:\\Program Files\\VMware\\Infrastructure\\VirtualCenter Server\\VMwareVCMSDS\\*.log\"\r\n<\/pre>\n<p>After completing the defragmentation I started the VMwareVCMSDS service again but had problems authenticating back to vCenter.  Instead of restarting the vCenter service I went ahead and rebooted the server &#8212; which seems to have cleared up all my errors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VMware vSphere vCenter Server installs an Active Directory Application Mode (ADAM) [aka Active Directory Lightweight Directory Service (ADLDS)] instance called VMwareVCMSDS. I have had several problems with this service &#8212; one issue with the contents of the directory (see vCenter &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/virtualization\/adam-instance-vmwarevcmsds-index-may-be-corrupt\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":6,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/135\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}