From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G8UunZEDvVcV for ; Fri, 1 Jun 2012 08:43:16 +0200 (CEST) Received: from smtp2.seznam.cz (smtp2.seznam.cz [77.75.76.43]) by mail.saout.de (Postfix) with ESMTP for ; Fri, 1 Jun 2012 08:43:16 +0200 (CEST) Message-ID: <4FC861C5.3010105@seznam.cz> Date: Fri, 01 Jun 2012 08:31:33 +0200 From: Milan Broz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] inconsistency in opening multiple mappers on the same device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ".. ink .." Cc: dm-crypt@saout.de On 06/01/2012 12:12 AM, .. ink .. wrote: > 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. No. Try it with real device. (Loop devices are strange, losetup allows you to map more loopback devices to one file. It was always the same here, try it with previous version...) It is basically about this: By default, cryptsetup require exclusive access to underlying device: # echo xxx | src/cryptsetup create x /dev/sdb x # echo xxx | src/cryptsetup create y /dev/sdb x Cannot use device /dev/sdb which is in use (already mapped or mounted). With --shared it allows to use the same (already used) underlying device # echo xxx | src/cryptsetup create y /dev/sdb x --shared Obviously you cannot have the same mapping name... Milan