<p dir="ltr">Hi <br>
I resolved the problem. The symbolic links needed to a level deeper. E.g. <br>
 ln -s /mnt/389ds/data/dirsrv dirsrv, instead of  ln -s /mnt/389ds/data/ dirsrv.</p>
<div class="gmail_quote">On Nov 15, 2015 15:14, &quot;Andy Spooner&quot; &lt;<a href="mailto:racingyacht1@gmail.com">racingyacht1@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I am running 389-ds on CentOs 6.7. I am trying to move 389-ds off the disk that contains my root to a second disk that has space for the directory to grow. Can someone please advise on the correct way to move files and maintain selinux contexts. I moved the files using the method below, but logs cannot be written to - please see error message at the bottom of this email.</div><div><br></div><div>Setup </div><div>CentOs 6.7</div><div>selinux= enforcing</div><div>Second disk /mnt/ds389/data/</div><div>                     /mnt/389ds/log/</div><div><br></div><div>i used cp -rcp to copy and preserve SELINUX contexts and user rights </div><div><br></div><div>1. Stop dirsrv</div><div>2. cp -rcp /var/lib/dirsrv/  /mnt/ds389/data/</div><div>3. Checked selinux context using ls -Z dirsrv</div><div>  output: <span style="font-size:13px;color:rgb(255,255,255);font-family:&#39;courier new&#39;,monospace;white-space:pre-wrap;background-color:rgb(34,34,34)">drwxrwx---. nobody nobody unconfined_u:object_r:dirsrv_var_lib_t:s0 </span><span style="font-size:13px;font-family:&#39;courier new&#39;,monospace;white-space:pre-wrap;color:rgb(0,95,255);background-color:rgb(34,34,34)">slapd-eu-vc-pmldap01</span></div><div>4. renamed /var/lib/dirsrv (keep original files under a different name)</div><div>5.  Create symbolic link # ln -s /mnt/389ds/data/ dirsrv</div><div> </div><div>Logs</div><div>6. cp -rcp /var/log/dirsrv /mnt/389ds/log/</div><div>7.  Checked selinux context for /mnt/389ds/log</div><div>        <span style="color:rgb(255,255,255);font-family:&#39;courier new&#39;,monospace;font-size:13px;white-space:pre-wrap;background-color:rgb(34,34,34)">drwx------. nobody nobody unconfined_u:object_r:dirsrv_var_log_t:s0 </span><span style="font-family:&#39;courier new&#39;,monospace;font-size:13px;white-space:pre-wrap;color:rgb(0,95,255)">admin-serv</span></div>drwxr-xr-x. nobody nobody unconfined_u:object_r:dirsrv_var_log_t:s0 <span style="color:rgb(0,95,255)">slapd-eu-vc-pmldap01</span><br><br><br><div>8. Renamed /var/log/dirsrv t</div><div>9. Create symbolic link in /var/log   ln -s /mtn/389ds/log/ dirsrv</div><div><br></div><div>10. Reboot server</div><div>11 $ sudo service dirsrv start</div><div><br></div><div>Error:</div><div>etc/dirsrv/slapd-xxxxxxxxx/dse.ldif: nsslapd-errorlog: Cannot open errorlog file &quot;/var/log/dirsrv/slapd-xxxxxxxxxx/errors&quot;, errors cannot be logged.  Exiting.... [15/Nov/2015:15:00:12 +0000] - WARNING: can&#39;t open file /var/log/dirsrv/slapd-xxxxxxxx/access. errno 13 (Permission denied)[15/Nov/2015:15:00:12 +0000] dse_read_one_file - The entry cn=config in file /etc/dirsrv/slapd-xxxxx/dse.ldif (lineno: 10) is invalid, error code 53 (Server is unwilling to perform) - Cannot open accesslog directory &quot;/var<span style="background-color:rgb(34,34,34)">/</span><span style="background-color:rgb(0,0,0)">log/dirsrv/slapd-xxxxxxx/access&quot;, client accesses will not be logged.</span><span style="background-color:rgb(0,0,0)">[15/Nov/2015:15:00:12 +0000] dse - Could not load config file [dse.ldif]</span><span style="background-color:rgb(0,0,0)">[15/Nov/2015:15:00:12 +0000] dse - Please edit the file to correct the reported problems and then restart the serve</span><span style="background-color:rgb(0,0,0)">r.</span><br><br><br><br><br><br><br><br><div><br></div><div><br></div>Kind regards</div></div>
</blockquote></div>