dm-verity with UBIFS : mount fails
we are using dm-verity for a root file system which is UBIFS.
the verify and create command gives success but the mounting the device mapper fails
the mount command is "mount -t ubifs -o ro /dev/mapper/vroot /newroot/"
the logs message is below. What might be the reason for mount failure?
ubiattach: UBI_IOCATT: File exists
VERIFYING dm-verity block device
# cryptsetup 1.6.7 processing "veritysetup verify /dev/ubiblock0_11 /dev/ubiblock0_65 7e169e62a0d1f3d6411c222e6da29c59be187cc41f891c081a5285c8ed29d187 --debug --data-block-size=2048"
# Running command verify.
# Allocating crypt device /dev/ubiblock0_65 context.
# Trying to open and read device /dev/ubiblock0_65 with direct-io.
# Initialising device-mapper backend library.
# Trying to load VERITY crypt type from device /dev/ubiblock0_65.
# Crypto backend (OpenSSL 1.0.2j 26 Sep 2016) initialized.
# Detected kernel Linux 4.4.14 armv7l.
# Reading VERITY header of size 512 on device /dev/ubiblock0_65, offset 0.
# Setting ciphertext data device to /dev/ubiblock0_11.
# Trying to open and read device /dev/ubiblock0_11 with direct-io.
# Activating volume [none] by volume key.
# Trying to activate VERITY device [none] using hash sha256.
# Verification of data in userspace required.
# Hash verification sha256, data device /dev/ubiblock0_11, data blocks 39501, hash_device /dev/ubiblock0_65, offset 1.
# Using 3 hash levels.
# Data device size required: 80898048 bytes.
# Hash device size required: 1286144 bytes.
# Verification of data area succeeded.
# Verification of root hash succeeded.
# Releasing crypt device /dev/ubiblock0_65 context.
# Releasing device-mapper backend.
Command successful.
veritysetup create vroot /dev/ubiblock0_11 /dev/ubiblock0_65 7e169e62a0d1f3d6411c222e6da29c59be187cc41f891c081a5285c8ed29d187 --debug --data-block-size=129024
# cryptsetup 1.6.7 processing "veritysetup create vroot /dev/ubiblock0_11 /dev/ubiblock0_65 7e169e62a0d1f3d6411c222e6da29c59be187cc41f891c081a5285c8ed29d187 --debug --debug --data-block-size=2048"
# Running command create.
# Allocating crypt device /dev/ubiblock0_65 context.
# Trying to open and read device /dev/ubiblock0_65 with direct-io.
# Initialising device-mapper backend library.
# Trying to load VERITY crypt type from device /dev/ubiblock0_65.
# Crypto backend (OpenSSL 1.0.2j 26 Sep 2016) initialized.
# Detected kernel Linux 4.4.14 armv7l.
# Reading VERITY header of size 512 on device /dev/ubiblock0_65, offset 0.
# Setting ciphertext data device to /dev/ubiblock0_11.
# Trying to open and read device /dev/ubiblock0_11 with direct-io.
# Activating volume vroot by volume key.
# dm version OF [16384] (*1)
# dm versions OF [16384] (*1)
# Detected dm-verity version 1.2.0.
# Udev is not running. Not using udev synchronisation code.
# Device-mapper backend running with UDEV support disabled.
# dm status vroot OF [16384] (*1)
# Trying to activate VERITY device vroot using hash sha256.
387: open(O_RDWR) failed, retry O_RDONLY.
387: open(O_RDWR) failed, retry O_RDONLY.
# Calculated device size is 158004 sectors (RO), offset 0.
# dm versions OF [16384] (*1)
# Detected dm-verity version 1.2.0.
# Device-mapper backend running with UDEV support disabled.
# DM-UUID is CRYPT-VERITY-2630643be3b84f24ba3af59edee1b3cc-vroot
# dm versions OF [16384] (*1)
# Detected dm-verity version 1.2.0.
# Device-mapper backend running with UDEV support disabled.
# dm create vroot CRYPT-VERITY-2630643be3b84f24ba3af59edee1b3cc-vroot OF [16384] (*1)
# dm reload vroot OFR [16384] (*1)
# dm resume vroot OFR [16384] (*1)
# vroot: Stacking NODE_ADD (254,0) 0:0 0600
# vroot: Stacking NODE_READ_AHEAD 256 (flags=1)
# vroot: Processing NODE_ADD (254,0) 0:0 0600
# Created /dev/mapper/vroot
# vroot: Processing NODE_READ_AHEAD 256 (flags=1)
# vroot (254:0): read ahead is 256
# vroot: retaining kernel read ahead of 256 (requested 256)
# dm versions OF [16384] (*1)
# Detected dm-verity version 1.2.0.
# Device-mapper backend running with UDEV support disabled.
# dm versions OF [16384] (*1)
# Detected dm-verity version 1.2.0.
# Device-mapper backend running with UDEV support disabled.
# dm status vroot OF [16384] (*1)
# Verity volume vroot status is V.
# Releasing crypt device /dev/ubiblock0_65 context.
# Releasing device-mapper backend.
Command successful.
veritysetup create vroot is SUCCESS with return value 0
Mounting dm-verity block device in newroot
mount: mounting /dev/mapper/vroot on /newroot/ failed: Invalid argument