Bug 150787 - Cannot create raid device manually because of missing device
Cannot create raid device manually because of missing device
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mdadm (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-10 11:37 EST by Peter Bieringer
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-05 16:39:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2005-03-10 11:37:22 EST
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 16:39:15 EDT
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.