[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to recover RAID-1 array when "./MAKDEV md" fails!?



Frank P. Hart wrote:

First, profuse apologies to the list maintainers for breaking the thread...
Unfortunately, the e-mail client I am using here was unable to handle the
mailto: string from the "reply-to" hyperlink.  (Thanks, Bill G.!)  This
should appear close to the original thread, though.

Updates on my swap predicament:  I did a bit of digging on udev and found
the Decibels udev Primer most useful:
http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html
Item number 12 in the primer discusses "problem devices" and how to get them
to work.  It was here I discovered that there is a MAKEDEV on the system
that will work with udev, but it is installed in /sbin.  (Why that "other"
MAKEDEV is there is an open question.)  I was able to make the devices in
/sbin and mv them over to /dev, which then made it possible for me to coax
mdadm into creating the swap array.  I then used "swapon -a" (which uses
/etc/fstab, which still listed swap as being md1).
After a shutdown and reboot, though, my swap array was then missing again --
and again, udev dutifully wiped /dev clean of the devices I had manually
created with /sbin/MAKEDEV/.  I suspect there may be a problem with the boot
or shutdown scripts when swap is on a RAID-1 array, and would appreciate
some tips from the developers on where to look next.  Since I do get a good
swap array on the very first boot after the installation, I'm more
suspicious of the shutdown scripts.
In the interim, a satisfactory workaround is to use udev to create the md1
device in /dev so that mdadm can be run.  This is discussed in item 12 at
the URL above.  Then, the swap array can be started with a two-line script
(run as root) consisting of the following:

	mdadm -Cv -l1 -n2 /dev/md1 /dev/sd{a,b}5 --run
	swapon -a

Elton, you asked about some files.  I'm going by memory here since the
machine is at home (and I'm not):  After a reboot without the above
workarounds, /proc/mdstat reports only md0 -- expected since udev scrubs
/dev.  /etc/fstab has both md0 and md1 defined, along with the other usual
stuff.  There's no /etc/raidtab since mdadm was used (and I think raidtools
isn't even in the rc2+ distro.)  One interesting thing was the output from
fdisk.  Following what the "automated" partitioners might do, I defined my /
partitions first as primary partitions, and then defined the swap partitions
as logical partitions (but both were set to RAID autodetect, 'fd').
However, fdisk still reports a W95 extended partition (code 'f') as
/sd{a,b}2 with the same set of cylinder locations as the swap partitions.  I
understand that logical parititions have to be created from within primary
partitions.

_______________________________________________________________________
Frank P. Hart                                   NC State University
Dept. of Electrical and Computer Engineering    P.O. Box 7914
EGRC Room 438   Telephone: (919) 513-7261       Raleigh, NC  27695-7914






Check that is /etc/modprobe.conf is empty then remove it because of following

Reason: As mentioned in MODPROBE.CONF(5)

   NOTE:  If the file /etc/modprobe.conf exists, all contents of /etc/mod-
   probe.d/ are ignored by default. It is up to the  system  administrator
   to  keep them in sync, either using a tool to concenate files /etc/mod-
   probe.d/ and write /etc/modprobe.conf or using  include  statements  to
   share the configuration data (see below).



--
Prashant Kumar
Junior Undergraduate, Dept. of Computer Sc. and Engineering
IIT Kanpur ,  India.
http://home.iitk.ac.in/student/prashkr
Ph # +91-9935164525



Reply to: