Re: IMSM - problem with reshape+systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Apr 2014 14:31:38 +1000 NeilBrown <neilb@xxxxxxx> wrote:

> On Fri, 18 Apr 2014 09:24:35 +0000 "Baldysiak, Pawel"
> <pawel.baldysiak@xxxxxxxxx> wrote:
> 
> > Hi Neil/All.
> > We have discovered some problems with IMSM array reshape under OSs managed by systemd.
> > In case of reshape of arrays with IMSM metadata, mdadm manages the whole reshape process and it needs to be running in background.
> > If we reboot while reshaping, array will be assembled at startup
> > by udevworker by IMPORT{program}="mdadm -I /dev/sdX --export --offroot" part of udev rule array.
> > Mdadm will fork and continue to reshape an array from checkpoint.
> > However, systemd will treat udevworker as hanged process and it will be killed due to timeout with all its children (reshape will hang then).
> > I had planned to propose a patch for this problem, where additional unit file will be added
> > and udev will start systemd-service for mdadm -I command (see below),
> > but then we will lose information about exported variables - the ones that are used to trigger mdadm-last-resort service.
> > 
> > Do You have any idea how to solve this problem, and keep both functionalities?
> 
> Hi,
>  thanks for raising this issue.
> 
>  I think we need to address this using "mdadm --grow --continue".
> 
>  e.g. in used we run "mdadm -I --freeze-reshape --export" and arrange for
>  that to report some setting if a reshape is needed.
>  If it is needed, we set SYSTEMD_WANTS to some service which will run "mdadm
>  --grow --continue $device".
> 
>  Possibly we could get mdadm to run "systemctl start mdadm-reshape@$dev"
>  instead of forking, like it now does for running mdmon.
> 
>  I might have a poke at the code and see what falls out.
> 

Hi,
 I've just pushed some changes out to git://neil.brown.name/mdadm (and github)
which will hopefully address this problem.

I've added a new systemd unit, and mdadm will try to "systemctl start" it
rather than continuing on in the back ground.

It seems to work in at least one simple test case for me.  Can you check that
it works for you?

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux