From: Michael Tokarev <mjt@tls.msk.ru>
To: Nix <nix@esperi.org.uk>
Cc: "Mark A. O'Neil" <mark.a.oneil@Dartmouth.EDU>,
linux-raid@vger.kernel.org
Subject: Re: Recovery of software RAID5 using FC6 rescue?
Date: Wed, 09 May 2007 15:34:50 +0400 [thread overview]
Message-ID: <4641B1DA.7030607@msgid.tls.msk.ru> (raw)
In-Reply-To: <87vef2wlw3.fsf@hades.wkstn.nix>
Nix wrote:
> On 8 May 2007, Michael Tokarev told this:
>> BTW, for such recovery purposes, I use initrd (initramfs really, but
>> does not matter) with a normal (but tiny) set of commands inside,
>> thanks to busybox. So everything can be done without any help from
>> external "recovery CD". Very handy at times, especially since all
>> the network drivers are here on the initramfs too, so I can even
>> start a netcat server while in initramfs, and perform recovery from
>> remote system... ;)
>
> What you should probably do is drop into the shell that's being used to
> run init if mount fails (or, more generally, if after mount runs it
That's exactly what my initscript does ;)
chk() {
while ! "$@"; do
warn "the following command failed:"
warn "$*"
p="** Continue(Ignore)/Shell/Retry (C/s/r)? "
while : ; do
if ! read -t 10 -p "$p" x 2>&1; then
echo "(timeout, continuing)"
return 1
fi
case "$x" in
[Ss!]*) /bin/sh 2>&1 ;;
[Rr]*) break;;
[CcIi]*|"") return 1;;
*) echo "(unrecognized response)";;
esac
done
done
}
chk mount -n -t proc proc /proc
chk mount -n -t sysfs sysfs /sys
...
info "mounting $rootfstype fs on $root (options: $rootflags)"
chk mount -n -t $rootfstype -o $rootflags $root /root
if [ $? != 0 ] && ! grep -q "^[^ ]\\+ /root " /proc/mounts; then
warn "root filesystem ($rootfstype on $root) is NOT mounted!"
fi
...
> hasn't ended up mounting anything: there's no need to rely on mount's
> success/failure status). [...]
Well, so far exitcode has been reliable.
/mjt
next prev parent reply other threads:[~2007-05-09 11:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 12:27 Linux MD Raid Bug(?) w/Kernel sync_speed_min Option Justin Piszcz
2007-05-08 13:03 ` Neil Brown
2007-05-08 13:13 ` Justin Piszcz
2007-05-08 13:24 ` Justin Piszcz
2007-05-09 9:13 ` Neil Brown
2007-05-08 17:24 ` Recovery of software RAID5 using FC6 rescue? Mark A. O'Neil
2007-05-08 20:04 ` Michael Tokarev
2007-05-09 6:29 ` Nix
2007-05-09 11:34 ` Michael Tokarev [this message]
2007-05-09 19:50 ` Nix
2007-05-16 16:10 ` Mark A. O'Neil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4641B1DA.7030607@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=linux-raid@vger.kernel.org \
--cc=mark.a.oneil@Dartmouth.EDU \
--cc=nix@esperi.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.