Is it possible to create a device mapper over another device mapper?
I need to apply some checks in addition to encrypting the data on disk. So, I thought of creating a mapper (for additional checks) over the mapper created by dm-crypt and use new mapper's ioctl for applying those checks.
The dm-crypt created a mapper (say crypt_mapper) with starting sector and length as, say, 0 and 20000.
When I created a new mapper over this, the system crashes. There are no logs in dmesg.
echo 0 20000 access_target /dev/mapper/crypt_mapper 0 | dmsetup create access_mapper.