[mdlug] "Device busy" errors and RAID setup issues
David McMillan
skyefire at skyefire.org
Tue Nov 10 14:03:03 EST 2009
Jeff Hanson wrote:
> On Mon, Nov 9, 2009 at 8:09 PM, David McMillan <skyefire at skyefire.org> wrote:
>> Not sure what I have going on here. I've built myself a (intended)
>> RAID server with five SATA 1TB drives dedicated to the RAID array
>> (separate dedicated boot drive), running Jaunty Jackalope (I tried a few
>> server-dedicated distros, but JJ is what I'm comfortable with). The
>> HOWTOs I've found on the net make building a RAID array using mdadm
>> pretty simple, but I keep getting "Device or resource busy" on one or
>> more of the RAID drives when I try to do an mdadm build. What's really
>> odd is that the "busy" drive(s) are different each time I reboot the
>> machine. These drives have been fdisk'd to auto-detect RAID partitions,
>> are completely empty, and are not mounted -- never *have been* mounted,
>> for that matter. Running an lsof turns up nothing using any of the
>> /dev/sd* drives aside from the boot drive. 'tis a pozzlement.
>
> BIOS boot order and other things can affect assignments which is why
> they use UUIDs now. Check the UUIDs using blkid to see if you somehow
> ended up with a duplicate (like cloning an existing RAID member
> instead of creating each drive separately with fdisk/cfdisk/parted and
> mdadm).
Hm. Okay, I'll try that.
>> The other problem is that when I experimentally tried creating a RAID
>> array out of the drives that *weren't* busy, some odd things happened.
>> The array built successfully, as far as I could tell -- no error
>> messages, and it showed up as an active /dev/md0 in /proc/mdstat, but
>> when I rebooted the computer, mdadm won't show /dev/md0 as an active
>> array device, although it'll accept start/stop commands. Trying to
>> build the array again from scratch yields a bunch of "device appears to
>> already be part of a RAID array" error messages. Thing is, I can't seem
>> to get rid of the old array so I can start over again.
>
> Stop the arrays and try zeroing the drives using dd.
Ah, dd. Is there anything it *can't* do?
Actually, I've already done this (do you know how *long* it takes to
dd-zero five full 1TB drives? Yowza!), and found that sometimes even
"sudo dd" will generate the "busy" error. I'm working around it for the
moment. I should have fully zer0'd drives to try again with when I get
home from work tonight.
> Also check mdadm bug reports:
> https://bugs.launchpad.net/ubuntu/+source/mdadm?field.searchtext=&orderby=-datecreated
D'oh. Why didn't I think of that?
More information about the mdlug
mailing list