From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: [PATCH} Add RAID devices. Date: Sun, 31 Jul 2016 12:12:02 -0400 Message-ID: <86lh0hlrcd.fsf@gmail.com> References: <20160714131306.GA11566@solar> <20160723140701.GB6873@solar> <86k2g2pw0a.fsf@gmail.com> <20160731085203.GA4857@solar> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTtNF-0007jf-Vi for guix-devel@gnu.org; Sun, 31 Jul 2016 12:13:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTtNB-0006eC-P4 for guix-devel@gnu.org; Sun, 31 Jul 2016 12:13:56 -0400 Received: from blaine.gmane.org ([80.91.229.8]:50006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTtNB-0006bf-Cy for guix-devel@gnu.org; Sun, 31 Jul 2016 12:13:53 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bTtN2-0003ru-RZ for guix-devel@gnu.org; Sun, 31 Jul 2016 18:13:44 +0200 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: guix-devel@gnu.org --=-=-= Content-Type: text/plain Andreas Enge writes: > 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. Thanks, I tried that. the 'guix system reconfigure' succeeds and starts the raid array (please see system35.scm & system35.log, attached). But the reboot hangs at: [...] clocksource: Switched to clocksource tsc --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=system35.log Content-Transfer-Encoding: base64 cm9vdEBnMSB+IyBjYXQgL3Byb2MvbWRzdGF0ClBlcnNvbmFsaXRpZXMgOiBbcmFpZDFdIAp1bnVz ZWQgZGV2aWNlczogPG5vbmU+CnJvb3RAZzEgfiMgcm0gLWZyIC9tbnQvbWQwCnJvb3RAZzEgfiMg bHMgL21udApyb290QGcxIH4jIGd1aXggc3lzdGVtIHJlY29uZmlndXJlIHN5c3RlbTM1LnNjbQpz dWJzdGl0dXRlOiB1cGRhdGluZyBsaXN0IG9mIHN1YnN0aXR1dGVzIGZyb20gJ2h0dHBzOi8vbWly cm9yLmh5ZHJhLmdudS5vcmcnLi4uIDEwMC4wJQpUaGUgZm9sbG93aW5nIGRlcml2YXRpb24gd2ls bCBiZSBidWlsdDoKICAgL2dudS9zdG9yZS9yZDZtNTdwZ2E5ZGRmOWxzdmZqYTZqeWJiMXZucmo3 ZC1ncnViLmNmZy5kcnYKL2dudS9zdG9yZS9sMW1wd2F4bGYybmhtMTh2enhpcjlucGRpMmluaXM3 ai1zeXN0ZW0KL2dudS9zdG9yZS9zNngwajljeTB2Z2ZuemM2eHlicmdjeDBrMzI3YnJyZi1ncnVi LmNmZwovZ251L3N0b3JlLzdwM3BjMjJzNWFwNHNtbTZoYWJnZ2pjZ2o4M2FhaWR2LWdydWItMi4w MmJldGEzCmFjdGl2YXRpbmcg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gNjU1MzZLQiBjaHVuawoKdW51c2VkIGRldmljZXM6IDxu b25lPgpyb290QGcxIH4jIGV4aXQKZXhpdAoKUHJvY2VzcyBzaGVsbCBmaW5pc2hlZAo= --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=system35.scm Content-Transfer-Encoding: base64 Ozs7IGcxIHN5c3RlbSBjb25maWcKKHVzZS1tb2R1bGVzIChnbnUpKQoodXNlLXNlcnZpY2UtbW9k dWxlcyBuZXR3b3JraW5nIHNzaCkKKHVzZS1wYWNrYWdlLW1vZHVsZXMKIGJhc2UKIGFkbWluCiBk aXNrCiBsaW51eCAgICAgICAgICAgICAgICAgOyBtZGFkbQogcGFja2FnZS1tYW5hZ2VtZW50ICAg IDsgZ3VpeAogc2NyZWVuCiBnaG9zdHNjcmlwdCAgICAgICAgICAgOyBncy1mb250cwogZm9udHMg ICAgICAgICAgICAgICAgIDsgZm9udC1kZWphdnUgZm9udC1nbnUtZnJlZWZvbnQtdHRmCiBjdXJs ICAgICAgICAgICAgICAgICAgOyBscGFzdGUKIHNzaAogeG9yZyBjZXJ0cwogcnN5bmMKIHdnZXQK IHZlcnNpb24tY29udHJvbCAgICAgICA7IGdpdAogYXNwZWxsCiBlbWFjcwogY3VwcwogZ3JhcGh2 aXoKIHFlbXUKICkKKGRlZmluZSBtZDAKICAobWFwcGVkLWRldmljZQogICAoc291cmNlIChsaXN0 ICIvZGV2L3NkYjEiICIvZGV2L3NkYzEiKSkKICAgKHRhcmdldCAiL2Rldi9tZDAiKQogICAodHlw ZSByYWlkLWRldmljZS1tYXBwaW5nKSkpCihvcGVyYXRpbmctc3lzdGVtCiAgKGhvc3QtbmFtZSAi ZzEiKQogICh0aW1lem9uZSAiQW1lcmljYS9OZXdfWW9yayIpCiAgKGxvY2FsZSAiZW5fVVMudXRm OCIpCiAgKGJvb3Rsb2FkZXIgKGdydWItY29uZmlndXJhdGlvbiAoZGV2aWNlICIvZGV2L3NkYSIp KSkKICAobWFwcGVkLWRldmljZ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MgJygid2hlZWwiICJrdm0i KSkKCQkgKGhvbWUtZGlyZWN0b3J5ICIvaG9tZS9nMSIpKQoJCSh1c2VyLWFjY291bnQKCQkgKG5h bWUgImcxeCIpCgkJIChncm91cCAidXNlcnMiKQoJCSAoc3VwcGxlbWVudGFyeS1ncm91cHMgJygi d2hlZWwiICJrdm0iKSkKCQkgKGhvbWUtZGlyZWN0b3J5ICIvaG9tZS9nMXgiKSkKCQkodXNlci1h Y2NvdW50CgkJIChuYW1lICJneCIpCgkJIChncm91cCAidXNlcnMiKQoJCSAoc3VwcGxlbWVudGFy eS1ncm91cHMgJygid2hlZWwiICJrdm0iKSkKCQkgKGhvbWUtZGlyZWN0b3J5ICIvaG9tZS9neCIp KQoJCSViYXNlLXVzZXItYWNjb3VudHMpKQogIChwYWNrYWdlcwogICAoY29ucyoKICAgIGdsaWJj LXV0ZjgtbG9jYWxlcwogICAgcGFydGVkCiAgICBtZGFkbQogICAgcWVtdQogICAgZ3VpeAogICAg c2NyZWVuCiAgICBvcGVuc3NoIG5zcy1jZXJ0cyB4YXV0aAogICAgcnN5bmMgd2dldAogICAgY3Vy bCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgO2xw YXN0ZQogICAgZ2l0IGdpdC1tYW5wYWdlcwogICAgZ3MtZm9udHMgZm9udC1kZWphdnUgZm9udC1n bnUtZnJlZWZvbnQtdHRmCiAgICBhc3BlbGwKICAgIGVtYWNzCiAgICBmbHljaGVjayBwYXJlZGl0 IG1hZ2l0CiAgICBlbWFjcy16ZW5idXJuLXRoZW1lIGVtYWNzLW1hcmtkb3duLW1vZGUgZW1hY3Mt d2ViLW1vZGUKICAgIGN1cHMKICAgIGdyYXBodml6CiAgICAlYmFzZS1wYWNrYWdlcykpCiAgKHNl cnZpY2VzIChjb25zKiAoZGhjcC1jbGllbnQtc2VydmljZSkKCQkgICAobHNoLXNlcnZpY2UgIzpw b3J0LW51bWJlciAyMikKCQkgICAlYmFzZS1zZXJ2aWNlcykpKQo= --=-=-=--