From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tansi.org (ns.km10532-04.keymachine.de [87.118.102.195]) by mail.saout.de (Postfix) with ESMTP for ; Sat, 16 Jan 2010 03:46:16 +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 D8B954250002 for ; Sat, 16 Jan 2010 03:46:15 +0100 (CET) Date: Sat, 16 Jan 2010 03:46:45 +0100 From: Arno Wagner Message-ID: <20100116024645.GA11543@tansi.org> References: <20100113131320.GA3993@tansi.org> <4B4DF253.5040201@whgl.uni-frankfurt.de> <20100113172946.GA6329@tansi.org> <4B4F600A.7090107@whgl.uni-frankfurt.de> <20100114214257.GB23608@tansi.org> <4B4F97BD.3020909@whgl.uni-frankfurt.de> <20100114224627.GA24444@tansi.org> <4B4FD035.2030705@whgl.uni-frankfurt.de> <20100115035805.GA31381@tansi.org> <1263601811.26202.72.camel@corn.betterworld.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1263601811.26202.72.camel@corn.betterworld.us> 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 Fri, Jan 15, 2010 at 04:30:11PM -0800, Ross Boylan wrote: > On Fri, 2010-01-15 at 04:58 +0100, Arno Wagner wrote: > > > > Good idea, but no. Must be something in the udev configuration > > after all. Not that I found anything. Or anything in the logs. > > Hmm. Oh, well. It is not that important. But I really hate this > > badly documented obscure "automagical" stuff. As soon as anything > > breaks, it really sucks. > > > > On the side of where cryptsetup finds the device for a specific > > major and minor number, it is indeed a simple recursive directory > > traversal. Unfortunately it is in libdevmapper.c, i.e. in the > > system lib of that name. That means it cannot easily be changed. > I have a comment and a question. > > The comment is that I think udev on Debian has some private place that > it stashes away mappings so that network cards (for sure) and disks (I > think) have stable names. I think it's a Debian-specific feature, > though other distros may do something similar. May well be that way. However I am pretty sure I do not have stable disk names. I did have stable network card names, but disabled that feature, since I swap network cards from time to time and need to manually adjust anyways. > The question concerns the use of major:minor to identify devices. I > thought the same physical device can have different major:minor on > different boots.* Is that so, and if so, can it cause problems for > dm-crypt, such as causing it to pick the wrong underlying volume? dm-crypt does not do any aoutomation, but if a boot script were to give the same device to dm-crypt when the mapping has changed, that will cause problems. However the mapping can also change when changing the partitioning, with much the same effects. > I'm pretty ignorant in this area so a) take what I say with a grain of > salt and b) I'd appreciate any wisdom. > > Thanks. > > Ross Boylan > > *I think the Debian stuff stabilizes the relation between physical > devices and names like /dev/sdd, but not necessarily physical devices > and major:minor. It does. Each possible /dev/sd has a defined, fixed major/minor, see Documentation/devices.txt in a Linux kernel source tree. 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