LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2010, 05:03 AM   #1
gopimallikharjun
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Rep: Reputation: 0
RAID array creations fails


Hello Raid Experts

I am trying to create a raid array and I am getting the following error, Probably someone can help me out in this regard.

sh-3.1# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 5 251 1984027+ fd Linux raid autodetect
/dev/sda2 1 4 32098+ 83 Linux
/dev/sda3 252 498 1984027+ 83 Linux
/dev/sda4 499 57985 461760557+ f W95 Ext'd (LBA)
/dev/sda5 499 57985 461760557 fd Linux raid autodetect

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 498 57985 461760742+ f W95 Ext'd (LBA)
/dev/sdb5 498 57985 461760742 fd Linux raid autodetect

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 498 57985 461760742+ f W95 Ext'd (LBA)
/dev/sdc5 498 57985 461760742 fd Linux raid autodetect

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 498 57985 461760742+ f W95 Ext'd (LBA)
/dev/sdd5 498 11996 92351562+ 83 Linux
/dev/sdd6 11996 16595 36940429 83 Linux
/dev/sdd7 16595 34990 147761719+ 83 Linux
/dev/sdd8 34991 57985 184702149 83 Linux


When I try to create Raid array /dev/md1, I am getting following error.

/sbin/mdadm --verbose --create --level=0 --raid-devices=3 /dev/md1 /dev/sda5 /dev/sdb5 /dev/sdc5

mdadm: chunk size defaults to 512K
mdadm: super1.x cannot open /dev/sda5: Device or resource busy
mdadm: ddf: Cannot use /dev/sda5: Device or resource busy
mdadm: Cannot use /dev/sda5: It is busy
mdadm: device /dev/sda5 not suitable for any style of array


Any pointers in this regard is appreciated ...
 
Old 10-13-2010, 05:50 AM   #2
longbow0
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian
Posts: 20

Rep: Reputation: 2
have you umounted /dev/sda5?
 
Old 10-13-2010, 05:57 AM   #3
gopimallikharjun
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Yes, I tried both options - by mounting and then unmounting also ...

Made sure that no one is using this device by checking using lsof
 
Old 10-13-2010, 08:57 AM   #4
longbow0
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian
Posts: 20

Rep: Reputation: 2
may be this link would be useful
http://www.righteoushack.net/?p=197
 
Old 12-30-2015, 04:26 AM   #5
michael.luczkow
LQ Newbie
 
Registered: Dec 2015
Posts: 1

Rep: Reputation: Disabled
Sorry to bump an ancient thread, but I came across this in searching and though I'd add some keywords for future people searching.

Longbow0, the link you posted was dead on. That was the problem.

Short version: For some reason, the package "dmraid" causes certain block devices (which may or may not be or have been used in a fakeraid) to not be able to have their superblock wiped or be added to a new mdadm raid device.

Here's what I saw:

Code:
fdisk -l | grep GB | grep 3000 (Show my 3TB disks)
Disk /dev/sdf: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdn: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
Disk /dev/sde: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdg: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdj: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdk: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdm: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdo: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdl: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdi: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdh: 3000.6 GB, 3000592982016 bytes
Disk /dev/mapper/ddf1_49424d202020202010000079101403b2437f272b36611111: 3000.0 GB, 2999999004672 bytes
Disk /dev/mapper/ddf1_49424d202020202010000079101403b2437f272b90111111: 3000.0 GB, 2999999004672 bytes
So, what the heck are those /dev/mapper/ddf1_49xxx devices???

Throw some blocks on them with "dd" and they reveal themselves as /dev/sde and /dev/sdl.

Code:
[root@stack ~]# mdadm --zero-superblock /dev/sde
mdadm: Couldn't open /dev/sde for write - not zeroing
That's odd, none of my other 3TB disks did that. WTF? Lets try to make the raid anyway:

Code:
[root@stack ~]# mdadm --create /dev/md0 --level=6 --raid-devices=15 /dev/sd{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}
mdadm: super1.x cannot open /dev/sde: Device or resource busy
mdadm: /dev/sde is not suitable for this array.
mdadm: super1.x cannot open /dev/sdl: Device or resource busy
mdadm: /dev/sdl is not suitable for this array.
mdadm: create aborted
Ehrmm... nope.

Code:
[root@stack ~]# dd if=/dev/zero bs=1024 count=10M conv=fsync of=/dev/sde
^C134401+0 records in
134401+0 records out
137626624 bytes (138 MB) copied, 1.59491 s, 86.3 MB/s
I can put blocks on it just fine, so what's the problem? No, it's not mounted either. None of my software raid devices are mounted anywhere, they are presented as raw blocks to VMs that are not even powered on at the moment.

Code:
[root@stack ~]# yum erase dmraid
.....
Removed:
  dmraid.x86_64 0:1.0.0.rc16-11.el6                                                                                                                                                                                                          
Dependency Removed:
  dmraid-events.x86_64 0:1.0.0.rc16-11.el6                                                                                                                                                                                                   
Complete!
reboot.

Works like a champ!

Code:
[root@stack ~]# mdadm --create /dev/md0 --level=6 --raid-devices=15 /dev/sd{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}

[root@stack ~]# cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md0 : active raid6 sdo[14] sdn[13] sdm[12] sdl[11] sdk[10] sdj[9] sdi[8] sdh[7] sdg[6] sdf[5] sde[4] sdd[3] sdc[2] sdb[1] sda[0]
      38091755520 blocks super 1.2 level 6, 512k chunk, algorithm 2 [15/15] [UUUUUUUUUUUUUUU]
      [>....................]  resync =  2.1% (63183872/2930135040) finish=513.4min speed=95670K/sec
      bitmap: 22/22 pages [88KB], 65536KB chunk

unused devices: <none>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rebuilt RAID array with old mount points present; file system check fails on boot... mvb187 Linux - Software 3 12-04-2009 09:38 AM
Adding an old software-RAID array to a software-RAID installation.. Boot problems GarethM Linux - Hardware 2 05-05-2008 04:16 PM
folder creations limitations hampeh Linux - Enterprise 4 07-02-2007 07:26 AM
CRON job creations w/ ssh w3developing Red Hat 5 02-26-2006 02:51 AM
Raid Array wwnexc Linux - Hardware 1 09-25-2005 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration