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 ; Sun, 10 Jan 2010 21:33:17 +0100 (CET) Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0AKXFoX032710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 10 Jan 2010 15:33:15 -0500 Received: from [10.36.11.76] (vpn2-11-76.ams2.redhat.com [10.36.11.76]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0AKXEMr001546 for ; Sun, 10 Jan 2010 15:33:15 -0500 Message-ID: <4B4A3989.7050004@redhat.com> Date: Sun, 10 Jan 2010 21:33:13 +0100 From: Milan Broz MIME-Version: 1.0 References: <20100110151659.GA2635@tansi.org> <20100110194904.GA5194@tansi.org> In-Reply-To: <20100110194904.GA5194@tansi.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] renaming of device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 01/10/2010 08:49 PM, Arno Wagner wrote: > Just found out why I did not notice this before: > When the disk is not present at mount time, the > respective entry is not created in /dev/scsi/ > and you get the traditional output. I think > "status" should always give the traditional one > as it has a fixed mapping between major/minor and > device (see Documentation/devices.txt in the > Linux sources), while the /dev/scsi/ entry has not. Cryptsetup simple tries to map major:minor number back to device name in /dev. (device-mapper know only major:minor pair - see dmsetup table) The algorithm is very simple (and was probably written before udev was used so these special links in /dev did not exist). So it need to add some preferred names and not print the first entry. Please can you add an issue to project pages to not forget about this? Probably good idea to fix it in next minor release. p.s. while the major:minor pair is fixed to device name, device name is not fixed to real disk drive. You can add some hw, or initialise modules in different order and disk name changes e.g. from /dev/sdb to /dev/sdd. Usually it is better use UUID instead of device name and use blkid to search for device (blkid supports LUKS header). Milan