micro-patch for setup-storage

Thomas Neumann blacky+fai at fluffbunny.de
Mon Aug 27 22:17:04 CEST 2012


Thomas Neumann <blacky+fai at fluffbunny.de> wrote:
> I extracted a commandlist from your pastebin. Seems like the failing
> command is the first one. Would be interesting to know which exit code
> has been signaled. Try modifying Exec.pm::execute_command() but you may
> have more luck kludging some output handler into the return function of
> Exec.pm::execute_command_internal().

Or maybe not. There are some LV's which are still running. So it wouldn't
surprise me in the slightest if they are blocking md from tearing down
the volumes.

Instead of
 
 mdadm --stop --scan
 mdadm --assemble --scan --config=/tmp/fai/mdadm-from-examine.conf
 mdadm -W --stop /dev/md0
 vgchange -a n vg
 lvremove -f vg/var
 lvremove -f vg/swap
 lvremove -f vg/root

the correct order should probably be more like

 vgchange -a n vg
 lvremove -f vg/var
 lvremove -f vg/swap
 lvremove -f vg/root
 mdadm --stop --scan
[mdadm --assemble --scan --config=/tmp/fai/mdadm-from-examine.conf]
 mdadm -W --stop /dev/md0
 wipefs -a /dev/sdb1
 wipefs -a /dev/sda1
 mdadm -W --stop /dev/md1
 [tearing down complete, start to build new configuration]

This is just a guess on how it might work. Definitely needs testing.

bye
thomas


More information about the linux-fai mailing list