This file is indexed.

/usr/share/doc/HOWTO/ja-html/Root-RAID-HOWTO-8.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>Root RAID HOWTO cookbook: $BIUO?(B A. Bohumil Chalupa $B$5$s$K$h$k(B md0 $B$N%7%c%C%H%@%&%s(B</TITLE>
 <LINK HREF="Root-RAID-HOWTO-9.html" REL=next>
 <LINK HREF="Root-RAID-HOWTO-7.html" REL=previous>
 <LINK HREF="Root-RAID-HOWTO.html#toc8" REL=contents>
</HEAD>
<BODY>
<A HREF="Root-RAID-HOWTO-9.html">$B<!$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO-7.html">$BA0$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO.html#toc8">$BL\<!$X(B</A>
<HR>
<H2><A NAME="Appendix-A"></A> <A NAME="s8">8.</A> <A HREF="Root-RAID-HOWTO.html#toc8">$BIUO?(B A. Bohumil Chalupa $B$5$s$K$h$k(B md0 $B$N%7%c%C%H%@%&%s(B</A></H2>

<P>Bohumil Chalupa $B$5$s$N(B Linux RAID $B%a!<%j%s%0%j%9%H$X$NEj9F$G!$(BRAID1, 5 
$B$G$N(B mdstop $B$NLdBj$N2sHrJ}K!$G$9!%$3$NJ}K!$G$O!$%7%c%C%H%@%&%s$N;~$K(B 
RAID $B%G%P%$%9$,2u$l$F$$$k2DG=@-$OA[Dj$7$F$$$^$;$s!%$=$3$G!$I.<T$,%V!<(B
$B%H;~$N@5>o$J;2>H%9%F!<%?%9$r4JC1$KHf3S$9$k$h$&$K$7$^$7$?!%$3$l$K$h$j!$(B
$B%"%l%$$K0[>o$,$"$k$H$-!$%*%Z%l!<%?$,D4@0$9$k$3$H$,$G$-$^$9!%$3$l$K$D$$(B
$B$F$N>\:Y$OK\J8Cf$G=R$Y$F$$$^$9!%(B</P>
<P>
<PRE>
> From: Bohumil Chalupa &lt;bochal@apollo.karlov.mff.cuni.cz>
>  
> initrd $B$H(B linuxrc $B$r;H$C$F(BRAID1 $B%"%l%$$rF0$+$7!$$=$l$+$i(B root $B$r(B 
> /dev/md0 $B$K$&$^$/@ZBX$($k$3$H$G$-$^$7$?!%(B
> 
> $B$7$+$7!$%"%l%$$r@5>o$K(B *$B;_$a$k(B* $BJ}K!$O$o$+$j$^$;$s!%(B
</PRE>
</P>
<P>
<PRE>
$B$=$l$G$O!$;d$,$*Ez$($7$^$7$g$&(B :-)
</PRE>
</P>
<P>
<PRE>
> Date: Mon, 29 Dec 1997 02:21:38 -0600 (CST)
> From: Edward Welbon &lt;welbon@bga.com>
> Subject: Re: dismounting root raid device
> 
> RAID0 $B0J30$N(B md $B%G%P%$%9$K$D$$$F$O!$A4$F$N=q$-9~$_$,=*N;$7$F$$$k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$%A%'%C%/%5%`$d(BRAID$B$N%9!<%Q!<%V%m%C%/$N%G!<%?(B
$B$NJ]B8$O9T$C$F$$$^$;$s!%(B"$B<B:](B"$B$N%V!<%H%Q!<%F%#%7%g%s$N>pJs!$$D$^$j%k!<(B
$B%H$K3d$jEv$F$?(B md $B%\%j%e!<%`$,%7%c%C%H%@%&%s;~$K%j!<%I%*%s%j!<$G:F%^%&(B
$B%s%H$5$l$?$3$H$@$1$rJ]B8$7$F$$$^$9!%$=$7$F!$5/F0;~$K(B linuxrc $B%9%/%j%W(B
$B%H$,$3$N>pJs$r8+$D$1$l$P(B mkraid --only-superblock $B$r<B9T$7!$$3$l$,8+$D(B
$B$+$i$J$1$l$P(B ckraid $B$r<B9T$7$^$9!%(B
$B$D$^$j!$(BRAID $B$N%9!<%Q!<%V%m%C%/>pJs$O%7%c%C%H%@%&%s;~$K$O99?7$5$l$:!$(B
$B5/F0;~$K99?7$5$l$^$9!%(B
$B$"$^$j$9$C$-$j$7$?J}K!$G$J$$$N$G$9$,!$(B :-( $BF0$$$F$O$$$^$9!%(B
</PRE>
</P>
<P>
<PRE>
$B;d$O(BRAID$B%G%P%$%9$r%k!<%H$K$7$F5/F0$9$k$?$a$K(B Edward Welbon $B$5$s$N(B 
initrd.md $B$H(B Slackware $B$NAH9g$;$r;H$C$F$$$^$9!%(B
$B;d$N3P$($F$$$k8B$j$G$O!$=$@5$7$?%U%!%$%k$O(B mkdisk, linuxrc $B$H%7%c%C%H(B
$B%@%&%sMQ$N%9%/%j%W%H(B /etc/rc.d/rc.6 $B$@$1$G$9!%(B
$B$b$A$m$s!$(B lilo.conf $B$O=$@5$7$^$7$?!%(B

$B=EMW$JItJ,$r%a!<%k$KE:IU$7$F$*$-$^$9!%(B

Bohumil Chalupa

--------------- my.linuxrc follows -----------------
#!/bin/sh
# we need /proc
/bin/mount /proc 
# start up the md0 device. let the /etc/rc.d scripts get the rest of them
# we should do as little as possible here
# ________________________________________
# root raid1 shutdown test &amp; recreation
# /start must be created on the rd image in my.mkdisk
echo "preparing md0: mounting /start"
/bin/mount /dev/sda2 /start -t ext2
echo "reading saved md0 state from /start"
if [ -f /start/root.raid.ok ]; then
 echo "raid ok, modyfying superblock"
 rm /start/root.raid.ok
 /sbin/mkraid /etc/raid1.conf -f --only-superblock
else
 echo "raid not clean, runing ckraid --fix"
 /sbin/ckraid --fix /etc/raid1.conf
fi
echo "unmounting /start"
/bin/umount /start
# _________________________________________
#
echo "adding md0 for root file system"
/sbin/mdadd /dev/md0 /dev/sda1 /dev/sdb1 
echo "starting md0"
/sbin/mdrun -p1 /dev/md0
# tell kernel we want to switch to /dev/md0 as root device, the 0x900 value
# is arrived at via 256*major_device_number + minor_device number.
echo "setting real-root-dev"
/bin/echo 0x900>/proc/sys/kernel/real-root-dev
#  unmount /proc so that the ram disk can be deallocated.
echo "unmounting /proc"
/bin/umount /proc
/bin/echo "We are hopefully ready to mount /dev/md0 (major 9, minor 0) as
root"
exit
--------------- end of my.linuxrc ----------------------------------


----------- extract from /etc/rc.d/rc.6 follows -----------------
  # Turn off swap, then unmount local file systems.
  echo "Turning off swap."
  swapoff -a
  echo "Unmounting local file systems."
  umount -a -tnonfs
  # Don't remount UMSDOS root volumes:
  if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
    mount -n -o remount,ro /
  fi

  # Save raid state
  echo "Saving RAID state"
  /bin/mount -n /dev/sda2 /start -t ext2
  touch /start/root.raid.ok
  /bin/umount -n /start

-------------- end of excerpt from rc.6 ------------------------


------------------ part of my.mkdisk follows ----------------------
#
#  now we have the filesystem ready to be populated, we need to 
#  get a few important directories.  I had endless trouble till
#  I created a pristine mtab.  In my case, it is convenient that
#  /etc/mdtab is copied over, this way I can activate md with
#  a simple "/sbin/mdadd -ar" in linuxrc.
#
cp -a $ROOT/etc $MOUNTPNT 2>cp.stderr 1>cp.stdout
rm -rf $MOUNTPNT/etc/mtab
rm -rf $MOUNTPNT/etc/ppp*
rm -rf $MOUNTPNT/etc/termcap
rm -rf $MOUNTPNT/etc/sendmail*
rm -rf $MOUNTPNT/etc/rc.d
rm -rf $MOUNTPNT/etc/dos* 
cp -a $ROOT/sbin $ROOT/dev $ROOT/lib $ROOT/bin $MOUNTPNT 2>>cp.stderr
1>>cp.stdout
# _____________________________________________________________________
#  RAID: will need mkraid and ckraid
cp -a $ROOT/usr/sbin/mkraid $ROOT/usr/sbin/ckraid $MOUNTPNT/sbin
2>>cp.stderr 1>>cp.stdout
# ---------------------------------------------------------------------
#  it seems that init wont come out to play unless it has utmp.   this can
#  probably be pruned back alot.  no telling what the real bug was 8-).
#
mkdir $MOUNTPNT/var $MOUNTPNT/var/log $MOUNTPNT/var/run $MOUNTPNT/initrd
touch $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
chmod a+r $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
ln -s /var/run/utmp $MOUNTPNT/var/log/utmp
ln -s /var/log/utmp $MOUNTPNT/etc/utmp
ls -lstrd $MOUNTPNT/etc/utmp $MOUNTPNT/var/log/utmp $MOUNTPNT/var/run/utmp
#
#  since I wanted to change the mount point, I needed this though
#  I suppose that I could have done a "mkdir /proc" in linuxrc.
#
mkdir $MOUNTPNT/proc
chmod 555 $MOUNTPNT/proc
#
#  ------------------------------------------------------
#  we'll mount the real boot device to /start temporarily
#  to check the root raid state saved at shutdown time
#
mkdir $MOUNTPNT/start
#  -------------------------------------------------------
#
#  need linuxrc  (it is, after all, the point of this exercise).
#
if [ -x ./my.linuxrc ]; then
  cp -a ./my.linuxrc $MOUNTPNT/linuxrc
  chmod 777 $MOUNTPNT/linuxrc
else
   ln -s /bin/sh $MOUNTPNT/linuxrc
fi
#
----------------- part of my.mkdisk ends -----------------
</PRE>
</P>

<HR>
<A HREF="Root-RAID-HOWTO-9.html">$B<!$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO-7.html">$BA0$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO.html#toc8">$BL\<!$X(B</A>
</BODY>
</HTML>