After a RAID device has been set up and that device has been selected "for 
use with LVM", the following message is displayed when changes to devices 
and partitions are committed to disk before configuring LVM:
   "Error informing the kernel about modifications to partition
    /dev/md/0p1 -- Invalid argument.  This means Linux won't know about
    any changes you made to /dev/md/0p1 until you reboot -- so you
    shouldn't mount it or use it in any way before rebooting."
For Sarge installations a different, but similar message was shown:
   "The kernel was unable to re-read the partition table on /dev/md/0
    (Invalid argument).  This means Linux won't know anything nothing
    about the modifications you made until you reboot.  You should reboot
    your computer before doing anything with /dev/md/0."
The basic cause is that partitions on a software RAID device are not 
really supported by parted. I did some tests using parted from shell with 
very inconsistent results (changes are sometimes committed, but 'parted 
print' does not show them while 'fdisk list' does; kernel/udev does not 
create /dev/md/0p1 device nodes).
After investigation the only reason partman tries to commit changes at all 
turned out to be that the script update.d/21lvm_sync_flag sets the "lvm" 
flag for a "dummy" partition that is created by partman in 
init.d/31md-devices.
Earlier hacks in partman-lvm have already made sure that partman itself 
does not rely only on the flag, but sets "method" instead (based on the 
output of 'pvdisplay') in case of LVM on RAID. In line with this and as 
the flag is never actually written anyway, it seems safe not to try 
setting the flag if the lvm device is on a /dev/md/X device.
The following patch implements this.
--- update.d/lvm_sync_flag      (revision 38772)
+++ update.d/lvm_sync_flag      (working copy)
@@ -24,6 +24,16 @@
        method=$(cat $id/method)
 fi
+# As setting flags on RAID devices does not work and causes errors from
+# libparted, do not attempt to sync flags in case of LVM on RAID.
+# This is in line with the hacks in init.d/lvm and undo.d/lvm.
+if [ -f device ]; then
+       case $(cat device) in
+           /dev/md/*)
+               exit 0 ;;
+       esac
+fi
+
 has_lvm=no
 flags=''
 open_dialog GET_FLAGS $id
On Thursday 27 July 2006 01:49, Debian Bug Tracking System wrote:
> This is an automatic notification regarding your Bug report
> #377391: Extremely irritating libparted error message during LVM on
> RAID setup, which was filed against the partman-lvm package.
>
> It has been closed by Michael Vogt <m...@debian.org>.
Today I received this BTS message closing #377391; this is due to:
Changes:
 apt (0.6.45) unstable; urgency=low
[...]
   * apt-pkg/acquire-item.cc:
     - check for bzip2 in /bin (closes: #377391)
I think there must be a typo in this bug number in your changelog as the 
closed BR has nothing to do with apt. Suggest you check which bug should 
have been closed.
Note: #377391 was already closed with partman-lvm/41, so no need to reopen 
it.
Thanks for the mail and sorry for the typo. I closed the correct bug
by hand now.
Cheers,
 Michael
-- 
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo
-- 
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org