Bug 150787 - Cannot create raid device manually because of missing device
Summary: Cannot create raid device manually because of missing device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mdadm
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Doug Ledford
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-10 16:37 UTC by Peter Bieringer
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-05 20:39:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Bieringer 2005-03-10 16:37:22 UTC
problem:
Because udev only creates required devices, I cannot create a new
raid, reason: device is missing

Version-Release number of selected component (if applicable):
mdadm-1.6.0-2

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL4, but leave some space on the disks free
2. create partition on each disk, type fd
3. reboot to activate partitions, needed because of:
WARNING: Re-reading the partition table failed with error 16: Device
or resource busy.
4. try to create raid:
# mdadm --create /dev/md2 --level 1 --raid-devices 2 /dev/sd[ab]5
    

Actual Results:  mdadm: error opening /dev/md2: No such file or directory

Expected Results:  Working

Additional info:

# ll /dev/md*
brw-rw----  1 root disk 9, 0 Mar 10 17:14 /dev/md0
brw-rw----  1 root disk 9, 1 Mar 10 17:14 /dev/md1

Workaround:
# mknod /dev/md2 b 9 2  &&  mdadm --create /dev/md2 --level 1
--raid-devices 2 /dev/sd[ab]5
mdadm: array /dev/md2 started.

Perhaps mdadm should get smarter and create missing devices (or
request creation using udev).

BTW: one can extend mknod also to understand "mdX" automagically like
already on "hdX".

Comment 1 Doug Ledford 2006-07-05 20:39:15 UTC
This isn't a bug.  The mdadm program, as per the upstream developer's wishes,
does not currenly automatically create device nodes.  In order to have mdadm
create the device node as part of the array creation process, the option
--auto=yes may be passed on the create command line and it will do as you are
expecting.  Further details of the --auto option can be found in the man page
for mdadm.


Note You need to log in before you can comment on or make changes to this bug.