I'm afraid I can reproduce this too. With grub -7, the xfs_freeze stuff
does happen, but the result seems to be that the grub command gets stuck
in an uninterruptable sleep. I tried thawing the xfs partition after a
few minutes, and grub happily continued with the install. I see the same
kind of hang if I freeze an XFS partition and then try to write to it,
so it seems like running the grub command must somehow be writing to the
XFS partition as well as accessing it directly. It's seems we're damed
if we do, and damned if we don't...
FWIW, my test was with a system that had a single XFS partition for the
whole root filesystem, including /boot.
I thought perhaps it was the redirection of grub's output to a log file
by grub-install, since writing to a log file when XFS is frozen could
hang. But even after removing the redirection to $log_file, it still
hangs. :-(
On Mon, Aug 09, 2004 at 06:00:25PM -0300, Joey Hess wrote:
I'm afraid I can reproduce this too. With grub -7, the xfs_freeze stuff does happen, but the result seems to be that the grub command gets stuck
in an uninterruptable sleep. I tried thawing the xfs partition after a
few minutes, and grub happily continued with the install. I see the same kind of hang if I freeze an XFS partition and then try to write to it,
so it seems like running the grub command must somehow be writing to the XFS partition as well as accessing it directly. It's seems we're damed
if we do, and damned if we don't...
FWIW, my test was with a system that had a single XFS partition for the whole root filesystem, including /boot.
I thought perhaps it was the redirection of grub's output to a log file
by grub-install, since writing to a log file when XFS is frozen could
hang. But even after removing the redirection to $log_file, it still
hangs. :-(
Hi Joey,
Could you try to mount / as readonly before grub-install is run?
Robert Millan wrote:
Could you try to mount / as readonly before grub-install is run?
Doesn't grub-install copy things into /boot? My /boot was on the root filesystem in the test that I did.
I still don't understand why the current solution doesn't work. xfs_freeze suposedly puts the filesystem in a state that all write requests are blocked.
Am I missing something?
Robert Millan wrote:
I still don't understand why the current solution doesn't work. xfs_freeze suposedly puts the filesystem in a state that all write requests are blocked.
Am I missing something?
xfs_freeze is definitly causing all write to block. Apparently something
in grub-installer must then be doing a write while the filesystem is
frozen. I don't know for sure what it is; I suspect it may be more than
one thing. One place that seems likely to write and block is the
redirection of $grub_shell to $log_file. Since removing that one doesn't
fix it, I'm left assuming that running $grub_shell itself somehow causes
a write, and thus a freeze. Maybe getting strace on there and stracing
it would help.
The grub shell needs to write to /dev/hda for grabbing stage files into the boot sector (see lib/device.c in grub source code).
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 41:59:36 |
| Calls: | 12,109 |
| Files: | 15,006 |
| Messages: | 6,518,416 |