Software RAID and races in the boot process

Marius Gedminas marius at pov.lt
Thu Dec 23 14:23:10 UTC 2004


Hi,

On Thu, Dec 23, 2004 at 02:07:07PM +0000, Eamonn Sullivan wrote:
> On Thu, 23 Dec 2004 15:42:39 +0200, Marius Gedminas <marius at pov.lt> wrote:
> > I suspect that there is a race condition: /etc/rcS.d/S25mdadm-raid
> > starts up the raid devices, but udev creates the corresponding device
> > nodes a little bit too late, causing fsck to fail, but subsequent mount
> > to succeed.
>
> I have the exact same problem on a simpler setup: just one SATA drive.
> The only solution suggested so far is to create a script in rc.d to
> run after the boot process to mount the drive instead of doing it in
> fstab. That seems a bit broken to me, so please post any solution you
> find.

I have created a script called /etc/rcS.d/S29wait-for-udev.sh and made
it executable.  The script does

  ls -l /dev/md* >> /root/wait-for-udev.debug
  sleep 5
  ls -l /dev/md* >> /root/wait-for-udev.debug

After a reboot (that worked flawlessly) I see that the first ls only
shows /dev/md0, while the second ls shows all /dev/mdX devices.

I would not call this a proper solution, but it is a workaround that
Works For Me(TM).

I do think that the mdadm init.d script itself should wait until the
devices become available, so I consider this to be a bug.  Expect a bug
report after I come back from lunch.

HTH,
Marius Gedminas
-- 
Bumper sticker: No radio - Already stolen.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20041223/4f45b8ab/attachment.sig>


More information about the ubuntu-users mailing list