From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Thu, 10 Dec 2009 08:35:37 +0100 (CET) Message-ID: <4B20A4C6.1010207@redhat.com> Date: Thu, 10 Dec 2009 08:35:34 +0100 From: Milan Broz MIME-Version: 1.0 References: <6F8A7585-60EB-4844-90B9-06EE3BB2A76E@thompsonlogic.com> In-Reply-To: <6F8A7585-60EB-4844-90B9-06EE3BB2A76E@thompsonlogic.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] how to determine the mapped device from the original device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alvin Thompson Cc: dm-crypt On 12/10/2009 01:37 AM, Alvin Thompson wrote: > I was wondering if it is possible to determine the mapped device from the original device. For example, if you used the command: > > cryptsetup luksOpen /dev/sdd1 backup > > Can you later determine the mapped device name ('backup' in this case) if all you know is the device (/dev/sdd1)? For really low-level, you can try dmsetup. If you know the major:minor of that device (ls -l /dev/sdd1) check "dmsetup ls --tree" or similar. The reverse is "cryptsetup status backup" and see device there. All active encrypted devices you can see with "dmsetup status --target crypt" (or dmsetup table and check table directly). Anyway, this seems like good idea to add some new command to cryptsetup, like "cryptsetup deps " to display encrypted device mapped to underlying ... add new issue to project page if you want this please. Milan -- mbroz@redhat.ocm