1 |
Am 10.08.2011 03:04, schrieb Daniel Frey: |
2 |
> On 01/-10/37 11:59, Florian Philipp wrote: |
3 |
>> Remounting root read-only is done by an init script called mount-ro |
4 |
>> which is started in runlevel shutdown. Try to add a custom init script |
5 |
>> to your /etc/init.d directory with the following content: |
6 |
>> |
7 |
>> #!/sbin/runscript |
8 |
>> depend() |
9 |
>> { |
10 |
>> after mount-ro |
11 |
>> } |
12 |
>> start() |
13 |
>> { |
14 |
>> ebegin 'Shutting down mdadm' |
15 |
>> mdadm --wait-clean --scan |
16 |
>> eend $? |
17 |
>> } |
18 |
>> |
19 |
>> Add it to the runlevel with `rc-update add <your-script> shutdown` and |
20 |
>> don't forget to mark it executable. |
21 |
>> |
22 |
>> Disclaimer: I've not tried this (obviously) and if the script eats your |
23 |
>> dog and wreaks your system, it is entirely your fault ;) |
24 |
> |
25 |
> |
26 |
> Thanks, I tried this out, and while it does run after mounting ro, it |
27 |
> just hangs. I've noticed that it's supposed to be monitoring |
28 |
> /proc/mdstat but it was (presumably) unmounted long ago. |
29 |
> |
30 |
> I guess I have to do some more experimenting. |
31 |
> |
32 |
> Dan |
33 |
> |
34 |
> |
35 |
> |
36 |
|
37 |
Try remounting proc in your new init script. You have to advice mount to |
38 |
not try adding it to /etc/mtab since that would obviously fail. |
39 |
mount --no-mtab -t proc proc /proc |
40 |
|
41 |
Hope this helps, |
42 |
Florian Philipp |