From: "Javier Juan Martínez Cabezón" <tazok.id0@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] inconsistency in opening multiple mappers on the same device
Date: Fri, 01 Jun 2012 12:52:36 +0200 [thread overview]
Message-ID: <4FC89EF4.8080408@gmail.com> (raw)
In-Reply-To: <CAFnMBaTKyAy3=O5LBwFWr-chY_+Zu-tVUX7+vDAWnDah=kuc5g@mail.gmail.com>
On 01/06/12 00:12, .. ink .. wrote:
> I read the announcement of 1.4.3 and decided to do a simple test on
> opening multiple mappers on the same device and this is what i found
> out:
>
> test using cryptsetup 1.4.3
>
> [root@mtz ink]# echo -n xxx | cryptsetup create zzz xxx
> [root@mtz ink]# echo -n xxx | cryptsetup create zzz xxx
> Device zzz already exists.
> [root@mtz ink]# echo -n xxx | cryptsetup create yyy xxx
>
> [root@mtz ink]# ls -l /dev/mapper/
> total 0
> crw------- 1 root root 10, 236 May 29 14:46 control
> lrwxrwxrwx 1 root root 7 May 31 18:01 yyy -> ../dm-1
> lrwxrwxrwx 1 root root 7 May 31 18:01 zzz -> ../dm-0
>
> [root@mtz ink]# zuluCrypt-cli -P -d /dev/mapper/zzz
> /home/ink/xxx
> [root@mtz ink]# zuluCrypt-cli -P -d /dev/mapper/yyy
> /home/ink/xxx
> [root@mtz ink]#
>
> It looks like by default, cryptsetup does not allow opening more than
> one mapper on the same device bu it only checks the mapper name, not
> the device behind the mapper and hence it allows opening of multiple
> mappers on the same device as long as they use a different mapper
> name.
>
> The same behavior is there in luks based volume
>
> Also,shouldnt the error say mapper name since the check is on the
> mapper,not the device behind the mapper.
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
The default behaviour is to forbid it. As Milan said you need --shared
flag to "avoid" it.
Please check note issue 123 and Milan answer about the "safety" of
--shared use.
You shall create linear mappings under raw cryptsetup created devices
and work under this linear mappings and not with the cryptsetup raw
created one when using --shared flag.
prev parent reply other threads:[~2012-06-01 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 22:12 [dm-crypt] inconsistency in opening multiple mappers on the same device .. ink ..
2012-06-01 5:55 ` Arno Wagner
2012-06-01 12:47 ` .. ink ..
2012-06-01 13:00 ` Milan Broz
2012-06-01 6:31 ` Milan Broz
2012-06-01 10:52 ` Javier Juan Martínez Cabezón [this message]
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=4FC89EF4.8080408@gmail.com \
--to=tazok.id0@gmail.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.