Re: handling mdmon in the initramfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 10/02/2009 09:39 AM, Neil Brown wrote:
On Friday October 2, hdegoede@xxxxxxxxxx wrote:
Hi,

There is no such thing in the initrd (a writable /var/run), but there is
a writable / (initrd == ramdisk), and mdadm will happily create /var/run
itself, if it would not do that, there would no issue.

mdadm does not create directories (or at least not for the map file).
So if /var/run does not exist, it will use a file in /dev.


Although I do wonder how later, when we do have a writable /var/run, mdadm
decides which file to use. Once it has used /dev/.mdadm.map once it should
keep on using that.

It always tries the first of
   /var/run/mdadm/map  /var/run/mdadm.map /dev/.mdadm.map

it will normally read, then write.
So if /var/run doesn't exist, it will use /dev/.mdadm.map
Once /var/run/mdadm exists, it will
   read from /dev/.mdadm.map
   write to /var/run/mdadm/map

and from then on use /var/run/mdadm/map

So if the initramfs really does not contain /var/run, then this aspect
should "just work".


Ok,

Harald, I know we recently added some stuff to dracut with symlinks under
/var/run/mdadm. Since since then, we've opted to instead patch mdmon
to store its state under /dev/.mdadm (until a better fix is upstream), so the
symlink stuff can be removed and then the map stuff should just work.

Note that we will then still have issues with incremental assembly, as
dracut does incremental assembly, and if we then have partly assembled
arrays when switching over to /, rc.sysinit does a
mdadm -As --run, assembling everything in mdadm.conf, which will still
cause issues if some of them are already partly incremental assembled. But
I don't consider this a mdadm bug, but a distro one :)

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux