LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Kubuntu 12.04 cannot mount RAID -- strange device name (http://www.linuxquestions.org/questions/ubuntu-63/kubuntu-12-04-cannot-mount-raid-strange-device-name-4175414318/)

qajaq 07-01-2012 01:50 PM

Kubuntu 12.04 cannot mount RAID -- strange device name
 
I recently installed Kubuntu 12.04 and am trying to create a software RAID-1 device using two partitions: sda4 and sdb6. I've done this before, on this machine and on a couple others, using earlier Kubuntu versions, but this time I'm encountering a problem new to me.

I ran the following command line:
Code:

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb6
.

Then I ran:
Code:

mdadm --detail | egrep UUID > /etc/mdadm/mdadm.uuid
to extract the array's UUID, concatenated the resulting file with mdadm.conf (after saving a copy) and edited that file to include the line:

Code:

ARRAY /dev/md0 UUID=d8e7b.....
Then I ran
Code:

mdadm --assemble
When I re-booted the computer, I did not find /dev/md0. Instead, I found /dev/md127 and a sub-directory /dev/md with one entry as follows:
Quote:

Cozumel:0 -> ../md127
("Cozumel" is the name of the computer.)

When I run
Code:

mdadm --examine --scan
I get the following:
Quote:

ARRAY /dev/md/0 metadata=1.2 UUID=d8e7b..... name=Cozumel:0
I cannot mount the array. The closest I've been able to get has been with the command
Code:

mount /dev/md127 /datalib
but this comes back saying I must specify the filesystem type. When I try to do that
Code:

mount -t ext3 /dev/md127 /datalib
I'm told
Quote:

wrong fs type, bad option, bad superblock on /dev/md127 /datalib
missing codepage or helper proram, or other error.
At this point, I'm at a loss. Where might I go from here?

whizje 07-01-2012 02:21 PM

what happens if you do
mdadm --examine --scan >> mdadm.conf
This adds a line to mdadm.conf. And then remove the line you added.
The array will still be md127 but will be assembled.

qajaq 07-01-2012 02:43 PM

When I do that, the line that identifies the array as /dev/md/0 (which is a link in the /dev/md subdirectory pointing to /dev/md127). With that line on the configuration file, I still cannot mount the array with any of the following commands:
Quote:

mount /dev/md127 /datalib
(calls for fs type)
Quote:

mount -t ext3 /dev/md127 /datalib
(wrong fs type, etc.)
Quote:

mount /dev/md/0 /datalib
(device does not exist)
Quote:

mount /dev/md/Cozumel:0 /datalib
(calls for fs type)
Quote:

mount -t ext3 /dev/md/Cozumel:0 /datalib
(wrong fs type, etc.)
Where I've noted the "wrong fs type, etc." error message, this is (in full) a message saying
Quote:

wrong fs type, bad option, bad superblock on <device>
missing codepage or helper program, or other error

qajaq 07-01-2012 02:45 PM

And, by the way, I've run
Quote:

parted -l
to confirm that both partitions are formatted as ext3 partitions. Is there some different fs type I'm supposed to call for the assembled RAID device?

whizje 07-01-2012 03:35 PM

what says
Code:

cat /proc/mdstat
and
bash-4.2# mdadm -E /dev/sda4
bash-4.2# mdadm -E /dev/sdb6
bash-4.2# mdadm -D /dev/md127
and
parted -l /dev/md127


whizje 07-01-2012 03:47 PM

Quote:

to confirm that both partitions are formatted as ext3 partitions.
?? have -you formatted md0 ?

qajaq 07-01-2012 04:10 PM

In my reading about RAIDs, I haven't seen anything about formatting the resulting multi-disk device. Can you elucidate, or point me to a further resource?

whizje 07-01-2012 05:05 PM

A raid device is for the os just a block device like any other disk, which you can partition if you want and need to format with a filesystem.

whizje 07-01-2012 05:07 PM

To format the raid device with ext3.
Code:

mkfs -t ext3 /dev/md127

qajaq 07-01-2012 08:22 PM

I've created software RAID-1 devices several times in the past, on this and other machines with earlier distributions of Kubuntu, and I've never had to use mkfs after creating the array, editing the configuration file, and assembling the array. However, I gave it a try (after finding confirmation at a website that recommended using
Code:

mkfs.ext3 /dev/md127
and it appears to have worked. At least I didn't get any error messages when I gave the "mount /dev/md127 /datalib" command.

Thanks!


All times are GMT -5. The time now is 06:18 AM.