we have the this issue during PS6 deployment , MAAS 3.2.6 list all multipath devices separately, so it is not possible to configure bcache using multipath directly in MAAS
The workaround (credit to Junien Fririck) is to do the bache config in post-deployment, as following:
1. make-bcache -C /dev/nvme6n1p1 -B /dev/mapper/mpatha --writeback
2. copy /lib/udev/rules.d/69-bcache.rules to /etc/udev/rules.d/ folder, modify the rules to not register backing device (eg sd*) , so those device can still be used by multipathd
cp /lib/udev/rules.d/69-bcache.rules /etc/udev/rules.d/.
sed -i 's/sr\*/sr\*|sd\*/' /etc/udev/rules.d/69-bcache.rules
# line 7 of modified rules look like this
KERNEL=="fd*|sr*|sd*", GOTO="bcache_end
3. normally if bache is configured in MAAS, curtin will create udev rules to link the bache to /dev/disk/by-dname , here we need to do it manually
we have the this issue during PS6 deployment , MAAS 3.2.6 list all multipath devices separately, so it is not possible to configure bcache using multipath directly in MAAS
The workaround (credit to Junien Fririck) is to do the bache config in post-deployment, as following:
1. make-bcache -C /dev/nvme6n1p1 -B /dev/mapper/mpatha --writeback rules.d/ 69-bcache. rules to /etc/udev/rules.d/ folder, modify the rules to not register backing device (eg sd*) , so those device can still be used by multipathd
2. copy /lib/udev/
cp /lib/udev/ rules.d/ 69-bcache. rules /etc/udev/rules.d/. rules.d/ 69-bcache. rules
sed -i 's/sr\*/sr\*|sd\*/' /etc/udev/
# line 7 of modified rules look like this ="fd*|sr* |sd*", GOTO="bcache_end
KERNEL=
3. normally if bache is configured in MAAS, curtin will create udev rules to link the bache to /dev/disk/by-dname , here we need to do it manually
uuid= $(bcache- super-show /dev/mapper/mpatha | grep dev.uuid | awk '{print $2}') =\"block\ ", ACTION= =\"add| change\ ", ENV{CACHED_ UUID}== \"$uuid\ ", SYMLINK+ =\"disk/ by-dname/ bcache- osd1\"" > /etc/udev/ rules.d/ bcache- osd1.rules
echo "SUBSYSTEM=
4. trigger udev rules
sudo udevadm trigger
5. update initramfs
update- initramfs -u -k all