You are not logged in.

#1 2011-08-30 14:47:27

venehan_snakes
Member
Registered: 2011-08-30
Posts: 16

Is it possible to "convert" an encrypted system to LVM

From what I understand after reading this article in the wiki LVM is an underlying layer below the partitions that you usually work with. Basically a structure on the HDD on top of which you have your partitions and file systems.
Now, before asking my – hopefully not embarrassingly stupid – question, I should probably describe my situation:

I have two HDDs here, one of which is currently in use. Both are the same model and could be used interchangeable, they contain different data though.
· The first one, currently in use, contains /boot and three encrypted (via dm_crypt) partitions which each contain one file system (2* ext4, 1* reiserfs)
· The second one, currently lying around and only being mounted occasionally, contains one big ntfs partition encrypted with TrueCrypt

I have never worked with LVM but I would like to at least broaden my knowledge with experience so I can – when I set up my next system some time – make better informed decisions. Ideally I would "convert" my current system into something that's better to use and needs less different solutions patched together than it does now.

What I would like to have is a system with both hard drives (probably more added later) to be ready after boot with my current partitions (/boot, /, /var and /home) mounted while the second, currently only sporadically used HDD, is "integrated" in /home. And all of that (except /boot of course) should remain encrypted.
I know that I have to format the NTFS drive and as it should be part of /home – which currently is an encrypted (via dm_crypt) ext4 partition – it probably needs to be ext4. I expect it to be problematic to have a Logical Volume spread across one dm_crypt-encrypted drive and one TrueCrypted though I am not entirely clear on whether the encryption would be on top of the LVM volumes or vice versa. Anyway I assume I have to decrypt the TrueCrypt drive and encrypt it again with dm_crypt. Unless that would be dumb and you suggest something different?
The second drive (NTFS wrapped in TrueCrypt) can be completely wiped if necessary (most probably the easiest approach).

Apart from "Is that possible and/or a good idea or would you suggest not to switch to LVM and do something different (integrate the second drive in my dm_crypted system maybe?)?" my question is: "How would I tackle this problem; what would be the starting point and how could I make sure I don't accidentally erase all the data on /boot, /, /var and /home as I would like to keep my current system?"

I hope it's somehow understandable what I'm trying to do, if not please do ask.

Last edited by venehan_snakes (2011-08-30 14:52:29)

Offline

#2 2011-08-30 15:27:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Is it possible to "convert" an encrypted system to LVM

I get the impression you want to do this without backing up your data - if that is the case, you are certifiably crazy and should seek help immediately. tongue

Bet let's assume you're not crazy, and have backed up everything. smile The next step is to go to the LVM section of the wiki's LUKS page, and implement one of the solutions there.

Offline

#3 2011-08-30 18:59:59

venehan_snakes
Member
Registered: 2011-08-30
Posts: 16

Re: Is it possible to "convert" an encrypted system to LVM

Thanks a lot, after following that link and a few hours of reading I now know what to do. At least I think so, we'll see when I'm there.
Regarding the backup I will just quote Melvilles Bartleby and say "I would prefer not to".
Yes, I hoped it would be possible to keep my system intact and somehow migrate to LVM without backing up and re-installing, but it seems that I have to find a way to squeeze three terabytes into two or buy a new hard drive.

At least I now know what to do, thanks again.

Offline

Board footer

Powered by FluxBB