Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

LUKS / dmcrypt / Instalation Issue

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
benji
Posts: 1
Joined: 2017-03-07 13:28

LUKS / dmcrypt / Instalation Issue

#1 Post by benji »

Hi,
Hoping someone can help out what I think should be straightforward (for someone more familiar with the subject than me).

I installed jessie and opted for an encrypted / partition (/dev/sda2), encrypted swap partition (/dev/sda3) and unencrypted /boot partition (/dev/sda1)
Single disk /dev/sda1
All fine so far and the system works fine

Then I installed 4 data disks (when powered down) and the origonal sda is now sde.
Upon boot up the new sda unfortunately has 3 partitions and 1.7TB of data disapeared as it now becomes an encrypted swap partition. However, the system still boots up using sde1 as /boot and sde2 as /

Looking at fstab it looks like / is referenced by UUID (so explains how the system still booted) but swap was referenced by /dev/sda3 (so explains how all the data got wiped from the "wrong" place).

Lesson learned but why is the swap not referenced by a permanent ID which would have prevented this. Why is it done differently to the / partition.

More significantly now my encrypted drive (/) (/dev/sde2) is referred to by device mapper as /dev/mapper/sda2_crypt which is really confusing.
How can I change this?
I updated fstab, crypttab removed the entry in the dmsetup --table and replaced with a renamed equivalent.
Now the system still boots but asks for the encryption key twice and the device names have not changed at all.
I spent hours online but cant see what I need to change, the best page I found was https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt

Ben

Post Reply