[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#239441: Bug 239441: Allows to modify partition table with mounted partitions



I wrote:
> I created a single primary partition and set it to be an LVM physical volume.
> I left hda5 alone as it was mounted for the hd-media install.

> I chose to configure LVM and tried to create a volume group, but it said no
> physical volumes were found. Console 3 says:
>   pvscan -- no valid physical volumes found
> So I ran
>   pvcreate /dev/hda1
> in a shell, and it let me configure LVM and then create the file systems.

Anton Zinoviev <anton@lml.bas.bg> wrote:
> One possible reason is that the mounted hda5 prevents the kernel to
> reread the partition table.

I suspect there's more than this going on here. If I modify the mounted
partition when doing the install, I get the following message after
writing the new partition table:

<<
The kernel was unable to re-read the partition table on
/dev/ide/host0/bus0/target0/lun0/disc (Device or resource busy). This
means that linux won't know anything nothing about the modifications
you made until you reboot. You should reboot your computer before doing
anything with /dev/ide/host0/bus0/target0/lun0/disc.
>>

I didn't get that message during the installation run reported above.

Also, I found I needed to run pvcreate even on installer runs when I
hadn't changed the partition at all (that is, there was already a
partition there with partition id 0x8e).

If it's possible, it would be nice if the installer didn't forbid you
to modify the partition table even if some partitions are mounted
(perhaps with suitable dire warnings). It makes it easier to reinstall
on a machine without working CD or floppy.

-M-



Reply to: