Bug#633054: mdadm: /run transition: Please switch use of /lib/init/rw to /run
Michael Tokarev
mjt at tls.msk.ru
Tue Sep 27 15:13:49 UTC 2011
On 27.09.2011 17:22, Michael Biebl wrote:
> Hi,
>
> I did a test upgrade from wheezy to sid today to test
>
>> [ Michael Tokarev ]
>> * move initscript metadata from /lib/init/rw/.mdadm to /run/mdadm,
>> and depend on initscripts (>= 2.88dsf-13.3) for /run (Closes: #633054)
>> * move runtime stuff from /dev/.mdadm to /run/mdadm
>
> After the upgrade, I still had a /lib/init/rw/.mdadm directory and
> /dev/.mdadm/map but also:
>
> /run/mdadm/autorebuild.pid
> /run/mdadm/map
> /run/mdadm/monitor.pid
>
>
> Is it intential or an oversight that /lib/init/rw/.mdadm and /dev/.mdadm were
> not cleaned up after the upgrade? After a reboot those leftovers were gone.
It is oversight actually. I will look more closely at this. The leftovers
aren't really an issue, they will be gone on the next reboot. But the pid
files of a running processes may be a minor issue, -- like, it is possible
for mdadm monitor to try to run twice on /etc/init.d/mdadm restart if it
can't find proper pid files of the older version, or have somehow broken
incremental build, which is more serious.
dpkg can take care of some of this, by stopping service before upgrade.
> Another minor issue I noticed is, that mdadm.8.in and mdmon.8 still reference
> the old locations/files:
>
> mdadm.8.in:.BR /dev/.mdadm.map ).
> mdadm.8.in:.B /dev/.mdadm.map
> mdmon.8:.BR /dev/.mdadm .
Have you actually read the referenced places? They mention default locations
as set by upstream, and tells just that. The above with context:
mdadm keeps a list of arrays that it has partially assembled in
/var/run/mdadm/map (or /var/run/mdadm.map if the directory
doesn't exist. Or maybe even /dev/.mdadm.map).
/var/run/mdadm/map
When --incremental mode is used, this file gets a list of arrays cur‐
rently being created. If /var/run/mdadm does not exist as a directory,
then /var/run/mdadm.map is used instead. If /var/run is not available
(as may be the case during early boot), /dev/.mdadm.map is used on the
basis that /dev is usually available very early in boot.
The particular filesystem to use is given to mdmon at compile time and
defaults to /dev/.mdadm.
I considered patching these but I think it is better to leave it as-is
for now, especially since - I hope - upstream will follow the move to
/run too.
> Other then that, the package works fine and the test-upgrade went smoothly.
>
> Thanks for your work,
Thank you!
/mjt
More information about the pkg-mdadm-devel
mailing list