Newcomer's question about existing software raid
Preston Hagar
prestonh at gmail.com
Tue Dec 8 18:37:32 UTC 2009
On Tue, Dec 8, 2009 at 12:07 PM, Peter Humphrey
<peter at humphrey.ukfsn.org> wrote:
> Hello list,
>
> I've just used the 9.10 standard installation CD to install Kubuntu in some
> spare space on an IDE drive, and now I want to mount one of the existing
> mdraid partitions on /home/<user>/common. I've googled for advice but I only
> see how to install on a new mdraid partition, not how to mount one that's
> there already.
>
> I've installed mdraid, and the mdraid.conf file is written, apparently
> correctly, but I still get "/dev/md2 does not exist" when I attempt to mount
> it.
>
> Would someone please point me to where I can find the right advice?
>
> Thanks.
>
> --
> Rgds
> Peter
>
I would first try
cat /proc/mdstat
Does it show your RAID array? If so, it should let you know what it
is showing up as /dev/md1, /dev/md2, etc as well as the state of it
(Degraded, etc).
If it doesn't show your RAID array, there are a couple of things you can try:
mdadm --assemble --scan
will try to find and start any RAID arrays that are listed in the
mdadm.conf file (which is usually at /etc/mdadm/mdadm.conf)
After you run it
cat /proc/mdstat
again to see if it found the arrays. If not, you might try
mdadm --assemble /dev/md2 [partitions]
where [partitions] is replaced with the partitions that make up the
raid array (they should look something like /dev/sdc2 or /dev/hdb5,
etc depending on if you are using IDE or SATA drives and which drives
you set them up on)
If that still doesn't work, I would try one of these solutions from
the mdadm man page to figure out exactly which drives/partitions have
the RAID superblocks on them so you know how to issue the assemble
command:
echo ’DEVICE /dev/hd*[0-9] /dev/sd*[0-9]’ > mdadm.conf
mdadm --detail --scan >> mdadm.conf
This will create a prototype config file that describes
currently active arrays that are known to be
made from partitions of IDE or SCSI drives. This file should
be reviewed before being used as it may
contain unwanted detail.
echo ’DEVICE /dev/hd[a-z] /dev/sd*[a-z]’ > mdadm.conf
mdadm --examine --scan --config=mdadm.conf >> mdadm.conf
This will find arrays which could be assembled from
existing IDE and SCSI whole drives (not parti‐
tions), and store the information in the format of a config
file. This file is very likely to contain
unwanted detail, particularly the devices= entries. It
should be reviewed and edited before being
used as an actual config file.
mdadm --examine --brief --scan --config=partitions
mdadm -Ebsc partitions
Create a list of devices by reading /proc/partitions, scan
these for RAID superblocks, and printout a
brief listing of all that were found.
Hope this helps.
Preston
More information about the ubuntu-users
mailing list