I am new to dm-verity and I am finding it hard to use it.
This is my setup.On one VM running Ubuntu-12.04,I have a nfs-share partition
on which I have virtual disk image files of other vm's.I want to perform the integrity
check on these files/nfs-share.
My nfs-share partition (/dev/sdb1 mounted at /nfs-share) size is 10GB.From the
documentation,I see the numbers 4096,4096,52224,1,root_hash and salt.
I know the doc says
4096 = datablock
4096 = hashblock
52224 = number of blocks
1 = hash offset
SIZE=$(blockdev --getsz /dev/sdb)
dmsetup create name -r --table "0 $SIZE verity 1 /dev/sdb /dev/sdc 4096
But my question how do I get these values for my setup? How do I know the size
of data block /hashblock in my case?How I calculate the number of blocks and
root hash and salt to feed into the command.Can you please let me know the
process to get these values?
Also it mentions to use verity setup command for this purpose.Can you let me know
the arguments or an example here?
Looking forward to your reply and help.