Return-Path: Received: from shark1.inbox.lv (shark1.inbox.lv [194.152.32.81]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 15 Jan 2018 09:29:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by shark1-in.inbox.lv (Postfix) with ESMTP id 240DE1118129 for ; Mon, 15 Jan 2018 10:22:23 +0200 (EET) Received: from shark1.inbox.lv ([127.0.0.1]) by localhost (shark1.inbox.lv [127.0.0.1]) (spamfilter, port 35) with ESMTP id doaZLhsyGqBw for ; Mon, 15 Jan 2018 10:22:22 +0200 (EET) Received: from localhost (w3 [10.0.1.13]) by shark1-in.inbox.lv (Postfix) with ESMTP id D4D92111811C for ; Mon, 15 Jan 2018 10:22:22 +0200 (EET) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID: <1516004542.5a5c64becf99f@mail.inbox.lv> Date: Mon, 15 Jan 2018 10:22:22 +0200 From: nouser Subject: [dm-crypt] Correct rebuild process for hardware RAID 6 array with LUKS data ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de
I haven't seen this question= answered before and it's not easy to search the list archives.
I'm not aware of an IRC channel to ask such a simple question.

What is the correct process to initiate a hardware RAID rebuild to ensure t= he reconstructed disk writes encrypted data?

Steps performed: may be incorrect

1. activate degraded array (vendor tool)
2. cryptsetup luksOpen /dev/sdX sdX
3. mount /dev/mapper/sdX /mnt/tmp
4. insert new hard drive
5. rebuild begins


My confusion is as follows. 
LUKS data is encrypted at rest.

Once a LUKS container is unlocked and mounted that data is clear and visibl= e to the operating system and RAID controller. A hardware RAID controller s= hould not be aware of LUKS or encrypted data.

During the RAID rebuild I was monitoring CPU usage.
There were no CPU spikes typical with writing encrypted data.
I'm wondering if the RAID controller is writing unencrypted data from t= he unlocked LUKS container.

Which leads to my original question.

1. What is the correct process to rebuild a hardware RAID array with encryp= ted LUKS data?

2. Should the LUKS container be unlocked and filesystem mounted before inse= rting a new hard drive to initiate a rebuild?  Does it make a differen= ce either way?  Will a bad method destroy or corrupt data?

3. What is the best method to verify the rebuilt disk was written with encr= ypted data?


Thank you for your time and I apologize.
I couldn't find a clear answer.


Thank you,

Wrangl3r