RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 604565 - Additional files stored in /dev/md/ directory.
Summary: Additional files stored in /dev/md/ directory.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mdadm
Version: 6.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Doug Ledford
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-16 08:50 UTC by jbielans
Modified: 2010-08-20 11:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-16 15:16:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jbielans 2010-06-16 08:50:07 UTC
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 Program Management 2010-06-16 09:13:25 UTC
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 09:49:08 UTC
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>
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>


Issue reported in this BZ is not a bug.

RedHat,

Please close this record as NOTABUG.

Comment 4 Doug Ledford 2010-06-16 15:16:40 UTC
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 11:39:25 UTC
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.