After discussion with Scott, the best short-term solution would seem to
be:

1) Modify /etc/init.d/umountfs to call the following in do_stop before
calling umount/swapoff:

     "initctl emit unmount-filesystem"

2) Modify /etc/init.d/umountroot to call the following in do_stop before
calling umount:

     "initctl emit unmount-root-filesystem"


3) Modify all upstart configs for services which are "slow" to stop such that 
they "stop on unmount-filesystem",
    rather than "stop on runlevel [016]".

4) Test!

The overall effect of this being that when /etc/init.d/umountfs emits
the unmount-filesystem event, it will block until any Upstart jobs which
"stop on" those events have completed. Thus, /etc/init.d/umountfs will
wait for the mysql Upstart job to finish before unmounting its
filesystems.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.1 in ubuntu.
https://bugs.launchpad.net/bugs/688541

Title:
  race condition on shutdown (leads to corrupted fs)

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to