I'm attempting to setup a mapper device prior to boot as it requires use of my /var partition which is relied heavily upon startup.
My issue is it's seemingly failing and not providing any output - I'm unsure if this is something I'm doing terribly wrong or a limitation I'm simply not aware of.
I'm using flashcache and have it loading with my initrd. I also have the binaries for flashcache working fine it however just fails.
I've merely added the following to the initrd init script:
<snip>
setuproot
echo Creating flashcache volumes for var
flashcache_create -p around sdcachehome /dev/sdb1 /dev/sda7
echo Switching to new root and running init.
switchroot
</snip>
Unfortunately it's spitting out a unhelpful "failed" and then continues on with the boot process.
Creating flashcache volumes for var
cachedev sdcachehome, ssd_devname /dev/sdb1, disk_devname /dev/sda7 cache mode WRITE_AROUND
block_size 8, cache_size 0
Flashcache metadata will use 38MB of your 15995MB main memory
echo 0 756613242 flashcache /dev/sda7 /dev/sdb1 sdcachehome 3 2 8 0 473949641118 72 8 | dmsetup create sdcachehome failed
Switching to new root and running init.
Is this a viable way to be doing this? Can I setup a mapper device in this way?
Thanks!
The answer is yes - dmsetup is in most new initrd's by defalt.