From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: [PATCH} Add RAID devices. Date: Sun, 31 Jul 2016 10:52:03 +0200 Message-ID: <20160731085203.GA4857@solar> References: <20160714131306.GA11566@solar> <20160723140701.GB6873@solar> <86k2g2pw0a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTmTk-000319-HJ for guix-devel@gnu.org; Sun, 31 Jul 2016 04:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTmTh-00020P-Ds for guix-devel@gnu.org; Sun, 31 Jul 2016 04:52:12 -0400 Received: from mailrelay1.public.one.com ([91.198.169.124]:47062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTmTh-0001zh-0Y for guix-devel@gnu.org; Sun, 31 Jul 2016 04:52:09 -0400 Content-Disposition: inline In-Reply-To: <86k2g2pw0a.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: myglc2 Cc: guix-devel@gnu.org On Sat, Jul 30, 2016 at 07:05:25PM -0400, myglc2 wrote: > > I might write a more detailed blog post about this; there is a little > > subtlety with the non-automatic determination of dependencies between > > devices, so one needs to make sure that the partitions to be assembled > > are present before the mdadm command is executed. > I rebooted and the array is not assembled ;-( Strange! But I will also tell you the subtlety ;-) Here is a trick to use (thanks to Ludovic): (define md0 (mapped-device (source (list "/dev/sda2" "/dev/sdb2")) (target "/dev/md0") (type raid-device-mapping))) (operating-system ... (mapped-devices (list md0)) (file-systems (cons (file-system (title 'device) (device "/dev/md0") (dependencies (list md0)) (mount-point "/") (type "ext4")) %base-file-systems)) The "dependencies" field makes sure that the file system is only mounted after the array is assembled; I am not sure that this is your problem, but you might want to give it a try. In the long run, this should be reprogrammed: Devices and file systems should wait until all their "inputs" are present, or at least wait for a reasonable time. Andreas