Re: [PATCH] Wait for mdraid arrays to become clean before reboot / halt

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

 



On Wed, 2009-09-30 at 16:52 +0200, Hans de Goede wrote:
> With the new external metadata mdraid support we need to wait for raid
> sets to become clean (iow for mdmon to have finished updating the metadata)
> before rebooting. Otherwise we get a full array sync on the first boot after
> installation.
> ---
>  loader/shutdown.c |    5 +++++
>  scripts/mk-images |    4 ++++
>  2 files changed, 9 insertions(+), 0 deletions(-)

So this moves mdadm into the initrd? This will have repercussions, like
the mdadm udev rules will suddenly be able to find mdadm and do whatever
they're supposed to do. I doubt we we want that.

Dave
> 
> diff --git a/loader/shutdown.c b/loader/shutdown.c
> index 6ae4048..6a32e79 100644
> --- a/loader/shutdown.c
> +++ b/loader/shutdown.c
> @@ -58,6 +58,8 @@ static void performTerminations(int doKill) {
>  }
>  
>  static void performUnmounts(int doKill) {
> +	int ignore;
> +
>  	if (testing || !doKill)
>  		return;
>  
> @@ -66,6 +68,9 @@ static void performUnmounts(int doKill) {
>  
>  	printf("unmounting filesystems...\n"); 
>  	unmountFilesystems();
> +
> +	printf("waiting for mdraid sets to become clean...\n"); 
> +	ignore = system("/sbin/mdadm --wait-clean --scan");
>  }
>  
>  static void performReboot(reboot_action rebootAction) {
> diff --git a/scripts/mk-images b/scripts/mk-images
> index 00854d3..cfe62d3 100755
> --- a/scripts/mk-images
> +++ b/scripts/mk-images
> @@ -759,6 +759,10 @@ makeinitrd() {
>        cp -a org.freedesktop.nm_dispatcher.service $MBD_DIR/usr/share/dbus-1/system-services
>      )
>  
> +    # mdadm
> +    instbin $IMGPATH /usr/sbin/mdadm $MBD_DIR /sbin/mdadm
> +    instbin $IMGPATH /usr/sbin/mdmon $MBD_DIR /sbin/mdmon
> +
>      # Misc
>      instbin $IMGPATH /usr/sbin/dmidecode $MBD_DIR /sbin/dmidecode
>      instbin $IMGPATH /usr/bin/egrep $MBD_DIR /sbin/egrep

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux