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

Bug#838503: debian-installer: mdadm should not start syncing RAID1 arrays at full speed during installation



Package: debian-installer
Version: 20160630

When creating a RAID1 array in the debian-installer and using it for the
installation, mdadm immediately starts syncing the disks of the RAID
array.

This is a bad idea, because the subsequent install will be really slow on
rotational disks (linear disk access by mdadm and random disk access by
dpkg).  On a fairly recent computer with 2 SATA disks, the installation
took around 20 minutes before even arriving to the tasksel step.

I can see two solutions:

1) lower the speed of the syncing operation, by setting the
   "dev.raid.speed_limit_max" sysctl setting to e.g. 1000;

2) disable syncing altogether, by passing "--assume-clean" to mdadm when
   creating the array.


This second solution does not seem to be recommended by the mdadm
developers, here is an excerpt of the mdadm man page:

    --assume-clean

    Tell mdadm that the array pre-existed and is known to be clean.  It
    can be useful when trying to recover from a major failure as you can
    be sure that no data will be affected unless you actually write to the
    array.  It can also be used when creating a RAID1 or RAID10 if you
    want to avoid the initial resync, however this practice — while
    normally safe — is not recommended.  Use this only if you really know
    what you are doing.

    When the devices that will be part of a new array were filled with
    zeros before creation the operator knows the array is actually
    clean. If that is the case, such as after running badblocks, this
    argument can be used to tell mdadm the facts the operator knows.


Regards,


Reply to: