[linux-lvm] bug in lvm-1.0.7-105 ?

Martin Vogt vogt at itwm.fhg.de
Mon Jan 19 12:11:07 UTC 2004


Hello,

I think I found a bug in the

/etc/init.d/boot.lvm

script. (SuSE 9.0)

The Script mounts the root filesystem read/write to write
the information from vgscan to /etc/lvmtab.d/.

After that it tries to remount the root filesystem again with:

mount -n -o remount,ro /

This fails, which lead to a error message when

/etc/init.d/boot.localfs

is run.

This is the fix for /etc/init.d/boot.lvm:

            [...............]
               else
                echo "Remounting root file system (/) read/write for 
vgscan..."
                mount -n -o remount,rw /
                test $FSCK_RETURN -gt 0 && touch /fsck_corrected_errors
                echo "Scanning for LVM volume groups..."
                /sbin/vgscan

                # NEW [START]
                z=0
                mount -n -o remount,ro /
                while [ ! $? = 0 ] ; do
                      echo "ro mount failed: $z"
                      sleep 1
                      let "z=$z+1"
                      if [ $z -gt 10 ] ; then
                          break;
                      fi
                      mount -n -o remount,ro /                 
                done
                # NEW [END]
            [...............]


After usually 5 seconds the readonly mount succeeds.
(Is this some internal buffer flush time in the kernel ?)
The root filesystem is reiser.

regards,


Martin





More information about the linux-lvm mailing list