On Sat, Jul 09, 2005 at 11:11:45AM +0200, martin f krafft wrote:
> This issues has been discussed before and I cannot find a solution.
> We have the challenge to create the Grub menu.lst file and
> immediately reboot afterwards.
OK. Can you remount-readonly before you reboot? That is what
is done for the root filesystem before a clean shutdown... and
that flushes everything with no log recovery being required at
(I assume by "immediately reboot" above, you are not doing a clean
system shutdown for some reason? why not, out of curiousity?)
> so when Grub accesses the device directly, the file does
> not yet exist.
Right (invalid assumption on the part of Grub there).
> The problem is that xfs_freeze -f says it would flush everything to
> the disk, but it does not. Not even waiting for 20 seconds after
> calling xfs_freeze works. If xfs_freeze does not do the trick and
> sync does not work for XFS,
I'm curious in what way xfs_freeze did not work here?
And to clarify your statement above ("sync does not work for XFS"),
sync works just fine on XFS, it just doesn't do what Grub incorrectly
assumes it will do.
> how can I actually flush all buffers to
> the disk and commit all open transactions from the log?
"mount -oremount,ro ..." is guaranteed to do that, and is a filesystem
independent way of doing things, so seems like a better solution.
xfs_freeze should also do so, so I'm a bit surprised by your assertion
there ... what was your test case where something was not flushed?