Re: [dm-devel] Help request: setting up /dev/zero using dm-crypt ...

2018-02-07 Thread Heinz Mauelshagen

On 02/07/2018 09:50 AM, Ravi Prakash Putchala wrote:

Thank you, Milan. Will try these.

If you need experiment over a memory device, use either ramdisk,
scsi_debug module to it.
Another alternative is to create dm-zero device and use plain
dm-crypt (not LUKS).


create dm-zero device:  How do I do this? Sorry, I do not have much 
expertise in Linux.



E.g. 10TiB "zero" mapped device (pick your name instead of 'z'):

dmsetup create z --table "0 $((10*1024*1024*1024*2)) zero"

Block device node for this is:

 /dev/mapper/z


See dmsetup(8) and device-mapper target documentation in kernel source,
for instance Documentaion/device-mapper/zero.txt.

Heinz



Ravi


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] Help request: setting up /dev/zero using dm-crypt ...

2018-02-07 Thread Ravi Prakash Putchala
Thank you, Milan. Will try these.

If you need experiment over a memory device, use either ramdisk, scsi_debug
> module to it.
> Another alternative is to create dm-zero device and use plain dm-crypt
> (not LUKS).
>

create dm-zero device:  How do I do this? Sorry, I do not have much
expertise in Linux.

Ravi
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] Help request: setting up /dev/zero using dm-crypt ...

2018-02-07 Thread Milan Broz
On 02/07/2018 09:15 AM, Ravi Prakash Putchala wrote:
> We would like to experiment and see the performance results with different 
> options of dm-crypt. To do this we would like to setup /dev/zero with 
> dm-crypt as mentioned in 
> https://www.redhat.com/archives/dm-devel/2015-February/msg00106.html
> However, when I did the following no new mapping gets created in /dev/mapper:
> 
> # cryptsetup -y luksFormat /dev/zero

This command cannot work, /dev/zero is a character device, moreover all writes 
there are discarded.

Seems cryptsetup does not print error message here (that is a bug) but return 
value of this command
indicates the problem: 4 - that means "wrong device specified" (see man page).

If you need experiment over a memory device, use either ramdisk, scsi_debug 
module to it.
Another alternative is to create dm-zero device and use plain dm-crypt (not 
LUKS).

Milan

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] Help request: setting up /dev/zero using dm-crypt ...

2018-02-07 Thread Ravi Prakash Putchala
Hi,

We would like to experiment and see the performance results with different
options of dm-crypt. To do this we would like to setup /dev/zero with
dm-crypt as mentioned in
https://www.redhat.com/archives/dm-devel/2015-February/msg00106.html
However, when I did the following no new mapping gets created in
/dev/mapper:

# cryptsetup -y luksFormat /dev/zero
# cryptsetup luksOpen /dev/zero dm-zero
# cryptsetup status /dev/mapper/dm-zero
/dev/mapper/dm-zero is inactive.

Could you please help by giving instructions on how to do this right?

Thank you.

Ravi
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel