All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] renaming of device
Date: Sun, 10 Jan 2010 21:33:13 +0100	[thread overview]
Message-ID: <4B4A3989.7050004@redhat.com> (raw)
In-Reply-To: <20100110194904.GA5194@tansi.org>

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

  reply	other threads:[~2010-01-10 20:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-10 15:16 [dm-crypt] renaming of device Arno Wagner
2010-01-10 19:49 ` Arno Wagner
2010-01-10 20:33   ` Milan Broz [this message]
2010-01-11 16:17     ` Arno Wagner
2010-01-13  7:01     ` Luca Berra
2010-01-13 10:20       ` Sven Eschenberg
2010-01-13 13:13         ` Arno Wagner
2010-01-13 16:18           ` Sven Eschenberg
2010-01-13 17:29             ` Arno Wagner
2010-01-14 18:18               ` Sven Eschenberg
2010-01-14 21:42                 ` Arno Wagner
2010-01-14 22:16                   ` Sven Eschenberg
2010-01-14 22:46                     ` Arno Wagner
2010-01-15  2:17                       ` Sven Eschenberg
2010-01-15  3:58                         ` Arno Wagner
2010-01-15 11:28                           ` Sven Eschenberg
2010-01-16  0:30                           ` Ross Boylan
2010-01-16  2:46                             ` Arno Wagner
2010-01-16  8:39                               ` Milan Broz
2010-01-16 16:22                                 ` Arno Wagner
2010-01-16 18:52                                 ` Sven Eschenberg
2010-01-18 14:06                                   ` Milan Broz
2010-01-18 14:58                                     ` Sven Eschenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4A3989.7050004@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.