mdadm should be used for fakeraid (instead of dmraid)

Bug #1028677 reported by Antonio on 2012-07-24
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
Undecided
Unassigned
mdadm (Ubuntu)
Undecided
Unassigned
partman-md (Ubuntu)
Undecided
Unassigned
ubiquity (Ubuntu)
Undecided
Unassigned

Bug Description

mdadm now support external metadata and can hadle fakeraid better than dmraid:
https://raid.wiki.kernel.org/index.php/RAID_setup#External_Metadata
http://download.intel.com/design/intarch/PAPERS/326024.pdf

It seems that dmraid is no more developed (only maintenance), so ubuntu should use mdadm instead of dmraid for fakeraid.

Actually, it's not possible to setup a new ubuntu install with mdadm fakeraid (tried 12.04 and 12.10 alpha 2 alternate cd): only dmraid is offered.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: mdadm (not installed)
ProcVersionSignature: Ubuntu 3.0.0-23.39-generic 3.0.36
Uname: Linux 3.0.0-23-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Wed Jul 25 00:45:56 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111011)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mdadm
UpgradeStatus: Upgraded to oneiric on 2012-07-07 (17 days ago)

I was under impression that alternative/server CDs did offer mdadm, and supported activating dmraid.

Changed in debian-installer (Ubuntu):
status: New → Invalid
status: Invalid → New
Changed in mdadm (Ubuntu):
status: New → Invalid
Antonio (freenix-1) wrote :

Well, alternate cd has mdadm, but it isn't used for fakeraid.

If you setup a fakeraid volume from the bios, and then start a new install, you are forced to use dmraid.
If you don't setup a raid volume with the bios, you are offered the chance of setup a linux software raid with mdadm, but this isn't a fakeraid.

I tried to manually setup a fakeraid with the precise live cd:
- booted the cd with the nodmraid option (also did a rmmod dmraid*)
- setted up a fakeraid volume accordingly to https://raid.wiki.kernel.org/index.php/RAID_setup#External_Metadata
- finally started the installation from inside the live following this thread http://ubuntuforums.org/showthread.php?t=1928562
but failed since the raid volume was in read-only (probably due to Bug #957494 ).

The procedure found in the forum may work, but it is a trickier way. This bug is aimed at having a more convenient ad automated way to setup a fakeraid (or handle an existing fakeraid volume) from the installer.

Tomorrow I will try with the quantal live cd (#957494 should be fixed in quantal).

Changed in debian-installer (Ubuntu):
status: New → Invalid
Changed in ubiquity (Ubuntu):
status: New → Invalid
Changed in partman-md (Ubuntu):
status: New → Confirmed
Dimitri John Ledkov (xnox) wrote :

Ok. Both ubiquity and the debian-installer use a piece of software for partitioning collectively known as partman.

Partman has many "plugins" for setting up different file systems and things.

Partman-md is a single package which handles mdadm based RAID.

Partman-md upstream is at:
  Vcs-Browser: http://git.debian.org/?p=d-i/partman-md.git
  Vcs-Git: git://git.debian.org/d-i/partman-md.git

The actual code is bash scripts and debconf templates.

What needs doing is:
1) add a detection if external metadata is supported by the underlying disks
2) add a question to offer a choice of metadata formats: e.g. internal (1.2/1.1/1.0/0.9), external (ISMS, DDF)
3) modify the partitioning to use the correct/requested metadata format.

The patch will be small and fairly straight-forward, after you understand how all the different run-parts scripts work together with debconf. You will find more information from http://wiki.debian.org/Installer

I do not have access to ISMS/DDF hard-drives, therefore I cannot develop&test such patch.

If you develop such a patch I will be happy to review it and push it into Debian and Ubuntu.

JK (j-c-k) wrote :

It is critical to replace dmraid with mdadm as dmraid is unable to deal with large disk sizes. For a 3TB imsm raid1 dual-boot ('fakeraid') in my case the disks were shown as ~746GB sized and dmraid -an would not release them. So the only way was to boot the live cd with nodmraid and manually install mdadm and assemble the array.

JK (j-c-k) wrote :

Just for reference, #957494 is an incomplete fix for the readonly issue mentioned above. mdmon is still missing in the initrd which leads to read-only arrays. Inclusion of mdmon into the image fixes this. However, system shutdown is still broken in this case.

also dmraid make ubiquity crash when dualbooting with intel smart response technology powered windows. (see bug marked as duplicate)

Well, I think it would be nice to replace dmraid sometime in the future with mdadm, however, first mdadm would need to support most devices from dmraid like e.g. also the Promise Fasttrak Metadata (after all those are used for AMD RAID controller)

Dimitri John Ledkov (xnox) wrote :

@Andreas the idea is transition to mdadm for those formats that it does support and continue using dmraid for the rest.

Antonio (freenix-1) wrote :

@Dmitrijs: I totally agree with your comment #8

It seems that something is moving in debian about fakeraid & mdadm: they have working patches, see their bug 699434, http://bugs.debian.org/699434, and metabug 699430 http://bugs.debian.org/699430.

Brian Candler (b-candler) wrote :

I have a 12.04 system with fakeraid for the root partition across /dev/sda and /dev/sdb. I want to convert it from using dmraid to mdadm (so I can monitor it with /proc/mdstat for instance)

mdadm is 3.2.5, and it says in the manpage it can understand ddf and imsm metadata, and this indeed seems to be the case:

# mdadm --examine /dev/sda
/dev/sda:
          Magic : Intel Raid ISM Cfg Sig.
        Version : 1.1.00
    Orig Family : 8bc6b015
         Family : 8bc6b015
     Generation : 00000010
     Attributes : All supported
           UUID : 2ff8e106:4db45609:75487070:XXXXXXXX
       Checksum : b92d117e correct
    MPB Sectors : 1
          Disks : 2
   RAID Devices : 1

  Disk00 Serial : S14CNEAXXXXXXXX
          State : active
             Id : 00000000
    Usable Size : 234435342 (111.79 GiB 120.03 GB)

[Volume0]:
           UUID : a7fb0d20:01efbd85:c89e3f79:bf86cf8e
     RAID Level : 1
        Members : 2
          Slots : [UU]
    Failed disk : none
      This Slot : 0
     Array Size : 222715904 (106.20 GiB 114.03 GB)
   Per Dev Size : 222716168 (106.20 GiB 114.03 GB)
  Sector Offset : 0
    Num Stripes : 869984
     Chunk Size : 64 KiB
       Reserved : 0
  Migrate State : idle
      Map State : uninitialized
    Dirty State : clean

  Disk01 Serial : S14CNEAXXXXXXXX
          State : active
             Id : 00000001
    Usable Size : 234435342 (111.79 GiB 120.03 GB)

(Ditto for sdb)

So to try and migrate it, I did the following:

* apt-get remove dmraid # removes udev rules for dmraid
* apt-get autoremove
* /usr/share/mdadm/mkconf >/etc/mdadm/mdadm.conf

mdadm.conf has two relevant lines:
ARRAY metadata=imsm UUID=2ff8...
ARRAY /dev/md/Volume0 container=2ff8... member=0 UUID=...

However on bootup, the root filesystem came up as /dev/sdb1, so it looks like mdadm didn't auto-detect the arrays.

I also tried "md=1 raid=autodetect" on the kernel command line, to no avail (although the root filesystem came up as /dev/sda1 in that case; it may have been a coincidence)

Putting dmraid package back again, the system said it was unable to find the root device with the given UUID, and panicked. So now I have to specify root=/dev/sda1 explicitly.

I was kind-of expecting to break the system this way as I was planning to reinstall it anyway, but it would be great to know how to reinstall it so that it uses mdadm raid1 for its root but with BIOS-compatible metadata.

Eugene Savelov (savelov) wrote :

I see this issue is addressed in latest 14.04 ubuntu and bahavior is changed, at least on new installations it is default to mdadm

fermulator (fermulator) wrote :

What is the latest here? I've spent an hour scouring forums and other such places in an attempt to find concise instructions on how to migrate an existing system running "FakeRAID" (raid1) from dmraid to mdadm.

If no such documentation exists, I'd be more than happy to create it, however I will need guidance into the proper procedure.

fermulator (fermulator) wrote :

Just attempted this without much thinking:
http://pastebin.com/eWy2n0hq

Similar situation as reported by b-candler.

Upon reboot after that, the system root drive was /dev/sda ,/dev/sdb unused.

If I try to force an mdadm assemble, it only pulls in /dev/sdb since sda is in use by the operating system.
{{{
callaghan@callaghan-family:/dev/disk$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md126 : inactive sdb[0]
      62520452 blocks super external:/md127/0

md127 : inactive sdb[0](S)
      2260 blocks super external:imsm
}}}

I also tried to run "update-grub", but afterwards I can see that /etc/grub/grub.cfg is now set to boot from /dev/sda (by-uuid), not any mdadm.

Somehow need to get "update-grub" to reconfigure for mdadm/mdraid support.

John Center (john-center) wrote :

Here are a set of notes I made for myself because I did this often enough I didn't want to forget. I hope this helps.

    -John

New procedure for using Ubuntu Desktop installer (until they fix it)
--------------------------------------------------------------------

1) Launch UEFI setup at startup:

 * Disable Legacy BIOS
 * Turn on RAID & SMART

2) Boot Ubuntu CD:

 1) Pick "Try Ubuntu" & edit kernel command line.

 2) Add "nodmraid" to kernel line to prevent dmraid from assembling the disks.

 3) Hit F10 to start session.

3) Start 2 terminals & increase scrolling buffer.

4) sudo to root in one of the windows.

5) Do the following before starting installation:

 1) apt-get purge dmraid

 2) apt-get install mdadm

 3) mdadm --assemble --scan --verbose

6) Partition the raid drive:

 1) gdisk /dev/md126

 1G EFI partition (EF00)
 1T EXT4 partition (FD00) <-- change md126p2 to type FD00
 128G swap partition (8200)
 600G NTFS partition (0700)

7) Do the following before starting installation:

 1) apt-get install grub-efi-amd64

 2) apt-get update
    apt-get upgrade

8) Run installer until it fails on bootloader.

9) Mount & chroot raid disk:

 1) mkdir /target (if not still mounted)

 2) mount /dev/md126p2 /target

 3) mount /dev/md126p1 /target/boot/efi

 4) for i in /dev /dev/pts /proc /sys /run; do mount -B $i /target$i; done

 5) chroot /target

10) Do the following again on the chroot volume:

 apt-get purge dmraid
 apt-get install mdadm
 apt-get install grub-efi-amd64
 apt-get update
 apt-get upgrade

11) Run grub-install to fix the bootloader:

 * grub-install --boot-directory=/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/boot/efi --recheck [--verbose|--debug] /dev/md126

12) Unmount the raid disk:

 * for i in /dev /dev/pts /proc /sys /run; do umount /target$i; done

 * umount /target/boot/efi
   umount /target/boot

13) Find all the places that may try to stop mdadm/mdmon from starting & disable them:

 * find /etc -name "*" -type f -exec grep 'nomdmonisw' {} \; -print
 * find /lib -name "*" -type f -exec grep 'nomdmonisw' {} \; -print
 * find /usr -name "*" -type f -exec grep 'nomdmonisw' {} \; -print

 * Comment out dmraid2mdadm.cfg at /etc/default/grub.d/

14) Fix up the mdadm configuration:

 * cp /lib/udev/rules.d/63-md-raid-arrays.rules /etc/udev/rules.d/
 * cp /lib/udev/rules.d/64-md-raid-assembly.rules /etc/udev/rules.d/
 * cp /usr/share/initramfs-tools/hooks/mdadm /etc/initramfs-tools/hooks/
 * cp /usr/share/initramfs-tools/scripts/mdadm-functions /etc/initramfs-tools/scripts/
 * Edit rules if need be.

 * See mdadm.patch file from bug# 1320402 & fix up files.

 * Create /etc/initramfs-tools/conf.d/mdadm:

 ## mdadm boot_degraded configuration
 ##
 BOOT_DEGRADED=true

 * Create /boot/efi/EFI/ubuntu/grub.cfg:

 search.fs_uuid 9b5a6959-7df1-4455-a643-d369487d24aa root
 set prefix=($root)'/@/boot/grub'
 configfile $prefix/grub.cfg

 * update-grub

15) reboot

Sergio Callegari (callegar) wrote :

At the moment mdadm with imsm metadata is totally broken on xenial (and I suspect on all ubuntu distros with systemd). Due to incorrect ordering of things at shutdown machines with arrays assembled at boot with mdadm and imsm metadata may hang and the array is resynced everytime even if the bios shows it being in a normal state.

See bug 1320402, bug 1587142

Dear,

I think I've just found the products you were looking for, it's just amazing! Take a look http://www.myblog.media/reading.php?UE8xMDI4Njc3QGJ1Z3MubGF1bmNocGFkLm5ldA--

See you soon, ntonio Parravicini

From: Bug 1028677 [mailto:<email address hidden>]
Sent: Friday, November 03, 2017 12:52 PM
To: <email address hidden>
Subject: Howtobrew.com

I just started as a Breton Nightblade. I was wondering if it is feasible to do a sort of caster version of nightblade. So far, I have been playing with the bow and using siphoning, and that seems good for solo.

If this is something that can work, would it be better to go for light armor or something else?

Any advice?

Sent from Mail for Windows 10

Hey,

You need to have a look at that nice and beautiful products I ran across yesterday, it's awesome! This is actually the link http://www.polariz.in/regulator.php?UE8xMDI4Njc3QGJ1Z3MubGF1bmNocGFkLm5ldA--

See you soon, ntonio Parravicini

-

Neither we nor any third parties provide any warranty or guarantee as to the accuracy, timeliness, performance, completeness or suitability of the information and materials found or offered on this website for any particular purpose. You acknowledge that such information and materials may contain inaccuracies or errors and we expressly exclude liability for any such inaccuracies or errors to the fullest extent permitted by law.

I found some interesting information that appears like,appears to be)

Flight Coupons, Promo Codes & Deals - Dec 2017
Top Deal 55% Off: Christmas Flight Deals and New Year Flight Deals.

Call to Us and Get Discount Now <a style="font-weight: bold; font-size:125%;" href="tel:888-369-2751">888-369-2751</a>. (24/7 Support.)<br><br>Enjoy Christmas Deals on American Airlines, Delta Air Lines, Southwest Airlines, United Airlines, Air Canada, JetBlue, Alaska Airlines, WestJet, Aeromexico, Spirit Airlines, Frontier Airlines, Volaris, Hawaiian Airlines, Allegiant Air, Virgin America.

Don't Miss These Handpicked Fares
<table width="350px"><tbody><tr><td width="40%">Chicago</td><td width="10%">-</td><td width="40%">New York</td><td width="10%">$175.79</td></tr><tr><td width="40%">Los Angeles</td><td width="10%">-</td><td width="40%">San Francisco</td><td width="10%">$103.94</td></tr><tr><td width="40%">Los Angeles</td><td width="10%">-</td><td width="40%">New York</td><td width="10%">$175.88</td></tr><tr><td width="40%">Chicago</td><td width="10%">-</td><td width="40%">Los Angeles</td><td width="10%">$325.27</td></tr><tr><td width="40%">Miami</td><td width="10%">-</td><td width="40%">New York</td><td width="10%">$96.85</td></tr><tr><td width="40%">Atlanta</td><td width="10%">-</td><td width="40%">Chicago</td><td width="10%">$100.84</td></tr><tr><td width="40%">Boston</td><td width="10%">-</td><td width="40%">Miami</td><td width"10%">$189.86</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="40%">Las Vegas</td><td width"10%">$248.59</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="40%">Casablanca</td><td width"10%">$825.37</td></tr><tr><td width="40%">Miami</td><td width="10%">-</td><td width="40%">Johannesburg</td><td width"10%">$1016.58</td></tr><tr><td width="40%">Atlanta</td><td width="10%">-</td><td width="40%">New York</td><td width"10%">$225.76</td></tr><tr><td width="40%">Atlanta</td><td width="10%">-</td><td width="40%">Orlando</td><td width"10%">$90.19</td></tr><tr><td width="40%">Chicago</td><td width="10%">-</td><td width="40%">Washington DC</td><td width"10%">$195.26</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="40%">Toronto</td><td width"10%">$119.47</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="40%">London</td><td width"10%">$399.84</td></tr></tbody></table>

Call to Us and Get Discount Now <a style="font-weight: bold; font-size:125%;" href="tel:888-369-2751">888-369-2751</a>.

dino99 (9d9) on 2017-12-27
Changed in partman-md (Ubuntu):
status: Confirmed → Invalid
Download full text (3.8 KiB)

Whether you want to go to Tenerife or Tokyo, we'll find low cost flights to get you there.
We also find the cheapest hotels and car hire deals.<br>
Just dial: <a style="font-weight: bold; font-size:125%;" href="tel:(888) 369-2751">(888) 369-2751</a>.
Skyscanner is free! When you find your flights and dial (888) 369-2751, we redirect your call through directly to the airline or travel agent.<br>We never charge you commission. Nor do we add hidden fees. See more ways we put you first.
Acclaimed flight comparison Skyscanner is an award winning site recommended by: The Independent, The Guardian, Which? Travel, BBC Radio 1 and more!<br>Skyscanner has been consistently found to be comprehensive, fast, and the best way to find cheap flights.<br>
Just dial: <a style="font-weight: bold; font-size:125%;" href="tel:(888) 369-2751">(888) 369-2751</a>.
Let’s get social! Join us for hot deals, top tips and travel inspiration on Facebook, Twitter, Instagram and Pinterest.
Find the perfect place to stay
The Trip by Skyscanner community has reviewed tens of thousands of hotels around the world so you can always find the perfect place to stay, based on your tribe and your price range.
Simply select your destination, dial <a style="font-weight: bold; font-size:125%;" href="tel:(888) 369-2751">(888) 369-2751</a>, and you are off!
And now Trip by Skyscanner searches all the top booking sites to make sure to always find you the lowest price.
Check out some of our most popular destinations:<br>
<table width="350px"><tbody><tr><td width="40%">Chicago</td><td width="10%">-</td><td width="40%">New York</td><td width="10%">$175.01</td></tr><tr><td width="40%">Los Angeles</td><td width="10%">-</td><td width="40%">San Francisco</td><td width="10%">$103.85</td></tr><tr><td width="40%">Los Angeles</td><td width="10%">-</td><td width="40%">New York</td><td width="10%">$175.37</td></tr><tr><td width="40%">Chicago</td><td width="10%">-</td><td width="40%">Los Angeles</td><td width="10%">$325.89</td></tr><tr><td width="40%">Miami</td><td width="10%">-</td><td width="40%">New York</td><td width="10%">$96.16</td></tr><tr><td width="40%">Atlanta</td><td width="10%">-</td><td width="40%">Chicago</td><td width="10%">$100.16</td></tr><tr><td width="40%">Newark</td><td width="10%">-</td><td width="40%">Toronto</td><td width"10%">$299.18</td></tr><tr><td width="40%">San Francisco</td><td width="10%">-</td><td width="40%">New York City</td><td width"10%">$293.75</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="40%">Kingston</td><td width"10%">$461.79</td></tr><tr><td width="40%">Los Angeles</td><td width="10%">-</td><td width="40%">Manila</td><td width"10%">$654.20</td></tr><tr><td width="40%">San Francisco</td><td width="10%">-</td><td width="40%">Tokyo</td><td width"10%">$690.46</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="40%">Casablanca</td><td width"10%">$825.23</td></tr><tr><td width="40%">Atlanta</td><td width="10%">-</td><td width="40%">Orlando</td><td width"10%">$90.78</td></tr><tr><td width="40%">New York City</td><td width="10%">-</td><td width="...

Read more...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.