** Changed in: linux (Ubuntu Bionic)
       Status: Confirmed => Fix Committed

** Changed in: linux (Ubuntu Disco)
       Status: Confirmed => Fix Committed

** Changed in: linux (Ubuntu Eoan)
       Status: Confirmed => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1850540

Title:
  multi-zone raid0 corruption

Status in Release Notes for Ubuntu:
  New
Status in linux package in Ubuntu:
  Confirmed
Status in mdadm package in Ubuntu:
  Fix Released
Status in linux source package in Precise:
  New
Status in mdadm source package in Precise:
  New
Status in linux source package in Trusty:
  Confirmed
Status in mdadm source package in Trusty:
  Confirmed
Status in linux source package in Xenial:
  Confirmed
Status in mdadm source package in Xenial:
  Confirmed
Status in linux source package in Bionic:
  Fix Committed
Status in mdadm source package in Bionic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed
Status in mdadm source package in Disco:
  Fix Committed
Status in linux source package in Eoan:
  Fix Committed
Status in mdadm source package in Eoan:
  Fix Committed
Status in linux source package in Focal:
  Confirmed
Status in mdadm source package in Focal:
  Fix Released
Status in mdadm package in Debian:
  Fix Released

Bug description:
  Bug 1849682 tracks the temporarily revert of the fix for this issue,
  while this bug tracks the re-application of that fix once we have a
  full solution.

  [Impact]
  (cut & paste from https://marc.info/?l=linux-raid&m=157360088014027&w=2)
  An unintentional RAID0 layout change was introduced in the v3.14 kernel. This 
effectively means there are 2 different layouts Linux will use to write data to 
RAID0 arrays in the wild - the “pre-3.14” way and the “3.14 and later” way. 
Mixing these layouts by writing to an array while booted on these different 
kernel versions can lead to corruption.

  Note that this only impacts RAID0 arrays that include devices of
  different sizes. If your devices are all the same size, both layouts
  are equivalent, and your array is not at risk of corruption due to
  this issue.

  Unfortunately, the kernel cannot detect which layout was used for
  writes to pre-existing arrays, and therefore requires input from the
  administrator. This input can be provided via the kernel command line
  with the raid0.default_layout=<N> parameter, or by setting the
  default_layout module parameter when loading the raid0 module. With a
  new enough version of mdadm (>= 4.2, or equivalent distro backports),
  you can set the layout version when assembling a stopped array. For
  example:

  mdadm --stop /dev/md0
  mdadm --assemble -U layout-alternate /dev/md0 /dev/sda1 /dev/sda2
  See the mdadm manpage for more details. Once set in this manner, the layout 
will be recorded in the array and will not need to be explicitly specified in 
the future.

  (The mdadm part of this SRU is for the above support ^)

  [Test Case]
  = mdadm =
  Confirm that a multi-zone raid0 created w/ older mdadm is able to be started 
on a fixed kernel by setting a layout.
  1) Ex: w/ old kernel/mdadm:
    mdadm --create /dev/md0 --run --metadata=default \
          --level=0 --raid-devices=2 /dev/vdb1 /dev/vdc1
  2) Reboot onto fixed kernel & update mdadm
  3) sudo mdadm --stop /dev/md0 &&
     sudo mdadm --assemble -U layout-alternate \
       /dev/md0 /dev/vdb1 /dev/vdc1
  4) Confirm that the array autostarts on reboot
  5) Confirm that w/ new kernel & new mdadm, a user can create and start an 
array in a backwards-compatible fashion (i.e. w/o an explicit layout).
  6) Verify that 'mdadm --detail /dev/md0' displays the layout

  = linux =
  Similar to above, but using kernel command line options.

  [Regression Risk]
  The kernel side of things will break starting pre-existing arrays. That's 
intentional.

  The mdadm side will cause a regression in functionality where a user
  can no longer create multi-zone raid0s on kernels that do not yet have
  the raid0 layout patches. This is intentional, as such RAID arrays
  present a corruption risk.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/1850540/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to