Bug#648208: os-prober: blockdev --setro affects running kvm instances
09.11.2011 19:29, Jan Niehusmann wrote:
> Package: os-prober
> Version: 1.42
> Severity: important
>
> I had the following issue with os-prober:
>
> While running an apt-get upgrade, a kvm instance running on the same
> machine reported journal write errors on it's virtual disk.
>
> The virtual disk is a logical volume on the host filesystem.
>
> Further investigation revealed that the apt-get upgrade triggered a
> grub-update, which in turn called os-prober.
>
> Os-prober then calls "blockdev --setro" on devices it considers not
> mounted. Unfortunately, it doesn't see that the device is mounted
> from kvm. Therefore, setting the device read-only affects the kvm
> instance, which in turn reports a (non-recoverable) error.
I think it is kernel problem - it should not let to set device to be
readonly if it is already open in read-write mode.
[]
> It would be better if the user had a chance to select which devices
> should be scanned. At least the user should be warned that running
> os-prober while devices are used by other processes is not a safe
> operation.
It isn't really helpful - yes it will allow to work around the problem
once you already hit it, but it is difficult to think about it beforehand.
/mjt
Reply to: