Public bug reported:
Binary package hint: lvm2
lvm2 does check if a device is part of raid before attempting to init
the vg on the device.
This check is required to make sure that there is no collision and a vg is
erroneously
enabled on the device that's part of a raid.
How to reproduce:
create 2 100Mb files
losetup /dev/loop0 file0
losetup /dev/loop1 file1
make a raid1 out of the loop devices.
pvcreate /dev/md0
vgcreate vg_test /dev/md0
lvcreate -L50M -nlv_test vg_test
vgchange -a n <- stop and disable LVM2.
stop the raid
run vgscan and this error will appear:
Found duplicate PV /dev/loop1: using /dev/loop1 not /dev/loop0
This is because the position of LVM and md data that don't guarantee
what device should be enabled first.
In the above case, the vg_test an lv_test can be enabled on one of the
raid1 disks only.
mdadm will fail to start later because loop1 is busy.
Assuming this situation is used for normal FS, there are corner cases in which
LVM and mdadm are racing to start
the devices and there is no guarantee that mdadm is always executed before LVM.
If we assuming that on boot LVM is started first and mdadm fails, the user will
still be able to run and do whatever he wants,
but the FS on the other device is offsync.
If at the next reboot mdadm is started first, the raid will start without
problems because raid superblocks are still valid
and we start LVM, there will be a royal inconsistency in the system according
to where the raid will fetch the data.
Raid1 for example tends to load balance between devices by default on read.
This leads to FS corruption.
We did generally avoided this problem by guaranteeing certain
initialization orders but this is not always reliable.
The fix (already landed in feisty) does allow LVM to not start on raid
devices.
Little endian machines are not affected by this problem.
Fabio
** Affects: lvm2 (Ubuntu)
Importance: High
Assignee: Fabio Massimo Di Nitto
Status: Confirmed
** Affects: lvm2 (Ubuntu Dapper)
Importance: Undecided
Status: Unconfirmed
** Affects: lvm2 (Ubuntu Edgy)
Importance: Undecided
Status: Unconfirmed
** Changed in: lvm2 (Ubuntu)
Importance: Undecided => High
Assignee: (unassigned) => Fabio Massimo Di Nitto
Status: Unconfirmed => Confirmed
** Summary changed:
- lvm2 check if device is md is broken on big endian machines
+ [SRU] lvm2 check if device is md is broken on big endian machines
--
[SRU] lvm2 check if device is md is broken on big endian machines
https://launchpad.net/bugs/81598
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs