From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 30 Mar 2015 18:42:12 +0200 (CEST) Received: by wibg7 with SMTP id g7so96226691wib.1 for ; Mon, 30 Mar 2015 09:42:11 -0700 (PDT) Message-ID: <55197CE1.1000303@gmail.com> Date: Mon, 30 Mar 2015 18:42:09 +0200 From: Milan Broz MIME-Version: 1.0 References: <5516A735.20705@belug.de> In-Reply-To: <5516A735.20705@belug.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Partitions on top of LUKS encrypted HD not recognized by kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "rainer.herrendoerfer" , dm-crypt@saout.de On 03/28/2015 02:05 PM, rainer.herrendoerfer wrote: > Hello list, > > I'm experimenting with LUKS on a Gentoo-Box. I luksFormat'ted the whole > harddisk /dev/sda and luksOpen'ed as gentoo, so it appeared as > /dev/mapper/gentoo. So far so good. When I use LVM and take it as a > physical volume and set up VGs and LVs they appear in /dev/mapper > automatically. > But when trying to use normal partitions instead of LVM, parted can > mklabel and mkpart but gets a warning that the new partitions are not > known by the kernel and indeed, they don't appear in /dev/mapper. > I need to run 'kpartx -av gentoo' that they appear in /dev/mapper and > then they are normally usable. When trying to luksClose them after > unmounting them they are 'still in use' until I make the kernel to > forget them by 'kpartx -d /dev/mapper/gentoo'. > So is using partitioning on fully encrypted harddisks not supported by > LUKS at all? Or just a bug in the current version used by Gentoo which > is 1.6.5? Partitions over device mapper are not recognized by the kernel, you have to use kpartx to make them mapped (kpartx does not use kernel partitioning but use device-mapper as well). LUKS has nothing to do with partitioning, usually the problem is solved by some other layer (udisks) that listens to udev messages and reacts to device removals. So no, it is not a bug, it is the same problem like you forgot to unmount filesystem over LUKS device - it cannot be removed without unmounting it first. It is just different layer here. Milan