title: bringing back a TDE database in AlwaysOn gives an error
body: <p>We recently added a new disk to our SQL Server 2016 AlwaysOn environment, configuration is equal on both nodes. I wanted to move some databases to this new disk. (all databases have TDE enabled, AlwaysOn is working fine). This is what I did:</p>
  <ol>
  <li>removed database from AO group</li>
  <li>took database offline</li>
  <li>copied datafiles to new location, updated metadata</li>
  <li>bring database back online</li>
  </ol>
  <p>So far so good. However, adding the database back to AlwaysOn, I get an error</p>
  <blockquote>
  <p>secondary database is not joined</p>
  </blockquote>
  <p>But automatic seeding is enabled (verified). Is automatic seeding not working with TDE?</p>
  <p><strong>Update</strong>: column <code>[failure_state_desc]</code> in <code>dmv sys.dm_hadr_automatic_seeding</code> shows &quot;Seeding Check Message Timeout&quot;</p>
  <p><strong>Update</strong>: see this error in errorlog &quot;</p>
  <blockquote>
  <p>The mirror database, &quot;XXXX&quot;, has insufficient transaction log data to
  preserve the log backup chain of the principal database.  This may
  happen if a log backup from the principal database has not been taken
  or has not been restored on the mirror database.</p>
  </blockquote>
  <p>&quot;  but logbackups have been taken after bringing database back online</p>