Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't create mdadm raid
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
betlor5
n00b
n00b


Joined: 12 Jul 2013
Posts: 23

PostPosted: Mon Oct 14, 2013 5:34 pm    Post subject: Can't create mdadm raid Reply with quote

Hi,

I'm trying to create a software raid1 with 6 hdds. It is working for two partions of the first raid, but not for the bigger partitions.

I created the partions through
Code:

mknode /dev/md* b 9 *


followed by
Code:

mdadm --create /dev/md4 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda5 /dev/sdb5 -v
mdadm: /dev/sda5 appears to contain an ext2fs file system
    size=-1500099132K  mtime=Thu Jan  1 00:00:00 1970
mdadm: /dev/sdb5 appears to contain an ext2fs file system
    size=-1500099132K  mtime=Thu Jan  1 00:00:00 1970
mdadm: size set to 2794868096K
Continue creating array? y


But checking mdstat tells me:

Code:

 cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md3 : active raid1 sda4[0] sdb4[1]
      134217664 blocks [2/2] [UU]

md1 : active raid1 sda2[0] sdb2[1]
      131008 blocks [2/2] [UU]


Sda and Sdb are partioned as follwed

Code:

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34            2047   1007.0 KiB  EF02  BIOS boot partition
   2            2048          264191   128.0 MiB   FD00  Linux RAID
   3          264192         2361343   1024.0 MiB  8200  Linux swap
   4         2361344       270796799   128.0 GiB   FD00  Linux RAID
   5       270796800      5860533134   2.6 TiB     FD00  Linux RAID


If I try to format the raid partion I get
Code:

mkfs.ext4 /dev/md4
mke2fs 1.42.7 (21-Jan-2013)
mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.


Please help.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1406

PostPosted: Mon Oct 14, 2013 5:51 pm    Post subject: Reply with quote

Dumb :?: but have you rebooted as in:
Code:
 Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
betlor5
n00b
n00b


Joined: 12 Jul 2013
Posts: 23

PostPosted: Mon Oct 14, 2013 6:50 pm    Post subject: Reply with quote

Yes I rebooted. I even tried a sysrescuecd, but nothing changed.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31370
Location: 56N 3W

PostPosted: Mon Oct 14, 2013 7:18 pm    Post subject: Reply with quote

betlor5,

Please try
Code:
mdadm --create /dev/md4 --level=1 --raid-devices=2 --metadata=1.2 /dev/sda5 /dev/sdb5 -v

I don't think metadata=0.90 imposes partition size restrictions but its worth a try.

mdadm may not like the vaild filesystems on the partitions either. You may need --force
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1406

PostPosted: Mon Oct 14, 2013 7:24 pm    Post subject: Reply with quote

Try a GParted Live CD. What does it detect?
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2424
Location: Germany

PostPosted: Mon Oct 14, 2013 8:42 pm    Post subject: Re: Can't create mdadm raid Reply with quote

betlor5 wrote:
I created the partions through
Code:

mknode /dev/md* b 9 *



That should *never* be necessary, and is highly likely to cause problems further down the road.

Quote:

followed by
Code:

Continue creating array? y



It should say one of these after that:
Code:

mdadm: array /dev/md4 started.
mdadm: /dev/md4 is already in use.


Otherwise there likely was an error.
_________________
Linux-User @ VServer (Debian), Desktop (Gentoo), Netbook (Ubuntu), Router (OpenWRT), PDA (Cacko), Smartphone (Android)
Back to top
View user's profile Send private message
betlor5
n00b
n00b


Joined: 12 Jul 2013
Posts: 23

PostPosted: Tue Oct 15, 2013 12:56 am    Post subject: Reply with quote

Hi,

I tried assembling it without the use of
Quote:

-metadata=0.90

and it worked. I guess the old mdadm has a problem with large partitions. My next question is:

As soon as I restart the raids keeps changing their name leading to a kernel panic. Is it possible stop them from changing?

I tried writing the information in /etc/mdadm.conf and also tried the
Quote:

--name=...

option, but it didn't change anything.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum