Return-Path: Received: from tansi.org (ns.km10532-04.keymachine.de [87.118.102.195]) by mail.saout.de (Postfix) with ESMTP for ; Mon, 11 Jan 2010 17:17:11 +0100 (CET) Received: from gatewagner.dyndns.org (84-74-164-239.dclient.hispeed.ch [84.74.164.239]) by tansi.org (Postfix) with ESMTP id B746B243069C for ; Mon, 11 Jan 2010 17:17:10 +0100 (CET) Date: Mon, 11 Jan 2010 17:17:28 +0100 From: Arno Wagner Message-ID: <20100111161728.GA16553@tansi.org> References: <20100110151659.GA2635@tansi.org> <20100110194904.GA5194@tansi.org> <4B4A3989.7050004@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4A3989.7050004@redhat.com> 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 Sun, Jan 10, 2010 at 09:33:13PM +0100, Milan Broz wrote: > 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). Ah, so it probably goes recursively and finds the entries in /dev/scsi before /dev/sd, because c comes before d in lexicographic order. > So it need to add some preferred names and not print the first entry. Indeed. The mapping to the traditional names is static. I can write a bit of code for it and contribute that. > Please can you add an issue to project pages to not forget about this? > Probably good idea to fix it in next minor release. Done. > 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. I know. > Usually it is better use UUID instead of device name and use blkid > to search for device (blkid supports LUKS header). Agreed. The issue I have is when I do manual mappings and then want to check what I did. The problem is the the traditional names are not directly clear from the udev scsi names. Arno -- Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F ---- Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier