From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qqs1x-0006LH-Vg for garchives@archives.gentoo.org; Tue, 09 Aug 2011 19:32:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5AF421C16A; Tue, 9 Aug 2011 19:31:47 +0000 (UTC) Received: from mail-pz0-f42.google.com (mail-pz0-f42.google.com [209.85.210.42]) by pigeon.gentoo.org (Postfix) with ESMTP id DC6F321C034 for ; Tue, 9 Aug 2011 19:30:51 +0000 (UTC) Received: by pzk37 with SMTP id 37so475107pzk.1 for ; Tue, 09 Aug 2011 12:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=UTIxjd5Y6UuQ6bAMGvRp3rryTwnSR8myBBcRTwtA6MM=; b=hcyPdm8bQINN46uhlyzspK8F3h8jkvYGBhWeFQtFn0/VHk4IEH0/Z+HFzR5pwKvgjl /cw2c4RaPe55CKuZGs97ThwBtjT6M7qBgXFniivLlFGKAD8i7iYbsX/9fiSZI7/KlVd2 FFdEhE7Mwhb73UzqnMaVWcsN1PaSBzVDw9uuU= Received: by 10.142.131.20 with SMTP id e20mr829536wfd.181.1312918251170; Tue, 09 Aug 2011 12:30:51 -0700 (PDT) Received: from [192.168.247.60] (d207-216-234-202.bchsia.telus.net [207.216.234.202]) by mx.google.com with ESMTPS id b2sm98742wfe.15.2011.08.09.12.30.49 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 12:30:50 -0700 (PDT) Message-ID: <4E418AD8.7070707@gmail.com> Date: Tue, 09 Aug 2011 12:30:32 -0700 From: Daniel Frey User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110801 Lightning/1.0b3pre Thunderbird/3.1.10 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Run command after root mounted ro? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: a3296e5f30c201ab66e32ba2128306af Greetings, I discovered a possible reason for mdadm always marking my raid array as bad on reboot. The problem is I don't know how to check for the issue. When using root on a native mdadm raid, the kernel handles the array state transition at shutdown, so it's not a big deal. However, it's different when using external metadata - mdadm must be called before the reboot. Apparently mdadm must be called after the root filesystem is mounted read-only. Then it can mark the array as clean and not rebuild every single reboot. Where do I check this? The /etc/init.d/mdadm script happens well before root is mounted read-only. Apparently `mdadm --wait-clean --scan` needs to be called so the external metadata is updated correctly. If you use this command with a native mdadm raid it does nothing, but it's critical apparently to the health of other metadata types. I've grepped through /etc/init.d/ and found nothing. Dan