Red Hat Bugzilla – Bug 604565
Additional files stored in /dev/md/ directory.
Last modified: 2010-08-20 07:39:25 EDT
Description of problem:
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?
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
Files in /dev/md/:
Files in /dev/md/:
- OS: RH 6.0 SNAP 3
- Platform: ICH9
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
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.
Author: NeilBrown <firstname.lastname@example.org>
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 <email@example.com>
Issue reported in this BZ is not a bug.
Please close this record as NOTABUG.
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.
Not reproducible on RHEL6.0 Snapshot 10 x86_64.