Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 604565 - Additional files stored in /dev/md/ directory.
Additional files stored in /dev/md/ directory.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mdadm (Show other bugs)
6.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Doug Ledford
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-16 04:50 EDT by jbielans
Modified: 2010-08-20 07:39 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-16 11:16:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jbielans 2010-06-16 04:50:07 EDT
Description of problem:
Additional files:
 - *pid
 - *sock
 - *map
appears sometimes in /dev/md/ directory.
If those file are "work files" and are needed for mdadm
to operate properly, should they be stored in this directory?
Shouldn't it be any temporary folder for better clarity?
Also if those files are necessary, why those files don't 
appear always when raid is created?

How reproducible:
Sporadically.

Steps to Reproduce:
mdadm -C /dev/md/imsm0 -amd -e imsm -n 3 /dev/sdb /dev/sdc /dev/sdd -R
mdadm -C /dev/md/r5d3n1s64-45 -amd -l5 --chunk 64 --size 23592960 -n 3 /dev/sdb /dev/sdc /dev/sdd -R -f
mdadm -f /dev/md/r5_d3_n1_s64_45 /dev/sdc
mdadm -Ss
  
Expected results:
Files in /dev/md/:
 - imsm
 - r5_d6_n0_s4_18572

Actual results:
Files in /dev/md/:
 - imsm
 - r5_d6_n0_s4_18572
 - md127.pid
 - md127.sock
 - md-device-map


Additional info:
- OS: RH 6.0 SNAP 3
- Platform: ICH9
Comment 2 RHEL Product and Program Management 2010-06-16 05:13:25 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Krzysztof Wojcik 2010-06-16 05:49:08 EDT
It was intended to store additional files in /dev/md/

Here is the commit that allow to store *.pid and *.sock files in localization indicated by VAR_RUN environment variable.

commit 5d4d1b26d3da8b489ed7e2f5a38f7d90b7f4008f
Author: NeilBrown <neilb@suse.de>
Date:   Thu Feb 4 16:31:49 2010 +1100

    mdmon: allow pid to be stored in different directory.

    /var/run probably doesn't persist from early boot.
    So if necessary, store in in /lib/init/rw or somewhere else
    that does persist.

    Signed-off-by: NeilBrown <neilb@suse.de>


Issue reported in this BZ is not a bug.

RedHat,

Please close this record as NOTABUG.
Comment 4 Doug Ledford 2010-06-16 11:16:40 EDT
To answer Jarema's questions (so that they aren't asked again by someone else):

1) Should the files be stored in /dev/md?

Yes and no.  They don't belong there according to the type of file that they are.  However, these are files that are needed very early in the boot process, long before any other part of the filesystem is mounted read/write, however /dev is always mounted read/write on modern systems because it is a virtual filesystem.  Therefore it is safe to put these files here.  And because they are directly related to the operation of md devices, they somewhat sort of belong in /dev/md.

2) Why are they only sporadically created?

They aren't sporadic, there are very specific rules under which they are created.  The file md-device-map is created any time you run mdadm in incremental assembly mode.  It is used to store state information about what drives have already been found and what arrays they have been attached to.  The *.sock and *.pid files are created by mdmon and are there whenever there is an imsm array that has an attached mdmon process.

And finally, Krzysztof is right, this isn't a bug, so I'm closing this bug report out.
Comment 5 jbielans 2010-08-20 07:39:25 EDT
Not reproducible on RHEL6.0 Snapshot 10 x86_64.

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