On 01/11/2010 11:39 PM, Andre Noll wrote: > On 22:36, Doug Ledford wrote: >>> I believe (Doug, please correct me if the following is wrong) the >>> advantage of storing mdmon's pid files in /dev is that in /dev they >>> remain visible after the switch to the new root. That's the "handoff >>> after pivotroot" in the subject. >> >> I'm a little fuzzy on this myself. The original patch was from another >> Red Hatter that works on dracut, the new mkinitrd replacement in Fedora >> 12. When integrating IMSM support in the md raid stack and dracut, >> there became a problem with starting mdmon in the initramfs filesystem >> and then transitioning it to the new filesystem. It turns out that, as >> you point out, because /dev is moved from the initramfs to the new root >> (mainly because udev is now started in the initramfs), we could avoid a >> number of issues caused by mdmon's files being in /var/run instead of >> /dev. > > One could also mount /var/run in the initramfs and move it over > like /dev, but that gets a bit messy because /var might be on a yet > another fs.. > >> This also allowed us to do the mdmon restart *after* the switchroot >> had taken place and solved a number of issues with getting mdmon >> support to work. > > Just out of interest: Why does mdmon need the restart at all? Because of the design and limitation of page cache. If you start a long running program from the initramfs, then the page cache usage will pin the initramfs in memory. You need to reexec the program from the hard drive so that the initramfs can be freed. Of course, this is all because superblock handling for imsm superblocks is in user space...<grumble, grumble, grumble>. -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: CFBFF194 http://people.redhat.com/dledford Infiniband specific RPMs available at http://people.redhat.com/dledford/Infiniband
Attachment:
signature.asc
Description: OpenPGP digital signature