installer's software raid detection

Bug #33117 reported by Carl Karsten
8
Affects Status Importance Assigned to Milestone
partman-md (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Should the installer be trying to recognize existing raid and LV configs? Because it is trying, but sometimes failing.

For instance - I run the installer,
after “detecting disks and other hardware”
at the "partition disks" step, I hit Alt-F2 and run:
sh cpl.sh a
which is:
fdisk -l >/var/log/fdisk.txt 2>&1
cat /proc/partitions >/var/log/partitions.txt 2>&1
cat /proc/mdstat >/var/log/mdstat.txt 2>&1
scp -r $0 /etc /var/log carl@dev:$1

(dev:a is http://dev.personnelware.com/carl/temp/Feb27/a/ )

http://dev.personnelware.com/carl/temp/Feb27/a/log/fdisk.txt partitions.txt and mdstat.txt

Disk /dev/sda: 18.2 GB, 18210037760 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 * 1 62 497983+ 83 Linux
/dev/sda2 63 1169 8891977+ fd Linux raid autodetect
/dev/sda3 1170 2213 8385930 82 Linux swap / Solaris
Disk /dev/sdb: 9100 MB, 9100044288 bytes
64 heads, 32 sectors/track, 8678 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
   Device Boot Start End Blocks Id System
/dev/sdb1 1 8678 8886256 fd Linux raid autodetect

major minor #blocks name
   8 0 17783240 sda
   8 1 497983 sda1
   8 2 8891977 sda2
   8 3 8385930 sda3
   8 16 8886762 sdb
   8 17 8886256 sdb1

cat: /proc/mdstat: No such file or directory

That is expected - the left overs from a previous run. I look around in /etc and couldn't find any raid configs (no /etc/madm)

Alt-F1, hit "manually edit parition table", Alt-F2, cpl.sh b http://dev.personnelware.com/carl/temp/Feb27/b/log/ - look that over, don't find anything interesting.

Alt-F1, hit “configure software raid”, (asked about formating sda3 for swap – dont answer yet). Alt-F2, cp1.sh c – still nothing

Alt-F1, hit “Yes” for “format swap?”, . Alt-F2, cp1.sh d
now something interesting
http://dev.personnelware.com/carl/temp/Feb27/d/log/partitions.txt has an md0

http://dev.personnelware.com/carl/temp/Feb27/d/log/mdstat.txt
Personalities : [raid0] [raid1] [raid5]
md0 : active raid1 sda2[0] sdb1[1]
      8886144 blocks [2/2] [UU]
unused devices: <none>

btw – this is “normal” considering that ther is now an md0
http://dev.personnelware.com/carl/temp/Feb27/d/log/fdisk.txt
Disk /dev/md0 doesn't contain a valid partition table

Alt-F1 back to the installer, I can't pick “create MD device” because “there are no usable partitions” because sda2 and sdb1 have already been allocated to md0. I can just hit “finish” and now there is a md0 partition for me to assign to /.

Personally, I don't think it should try - somewhere early it should wipe out any previous raid configs (and probably LV too) gien that it seems to use the partition table and /proc/mdstat to store the settings when moving in and out of "setup RAID" option.

Revision history for this message
Carl Karsten (carlfk) wrote :

This seems to setup the drives to cause the problem

# ZAP the boot record? and create a 4gig hda1 and hdc2, both type fd.
dd if=/dev/zero of=/dev/hda bs=512 count=1
dd if=/dev/zero of=/dev/hdc bs=512 count=1
echo 0,4000,fd|sfdisk -uM /dev/hda --no-reread
echo 0,4000,fd|sfdisk -uM /dev/hdc --no-reread
mdadm --create /dev/md0 --level=raid1 --force --raid-devices=2 /dev/hda1 /dev/hdc1

run the install,
instller causes md0 to be created before I pick the 'Create' option:

Like Feb27, here are log files at various steps:

http://dev.personnelware.com/carl/temp/Mar29/c/ d e and

http://dev.personnelware.com/carl/temp/Mar29/f/

Revision history for this message
Aaron Thul (aaron-thul) wrote :

I recently had a similar problem but it was caused from a power blip.

I had just set up set up software raid in the installer and had a power outage. When I restarted the installer and went in to partition the disks all I get was "Error reading /dev/md/1" The funny thing is there was a /dev/md1. I solved the problem going to the shell and running: cp -a /dev/md1 /dev/md/1

Revision history for this message
Soja (norbert-krankilla) wrote :

This is what I was solving yesterday. I've solved it using "ln /dev/md0 /dev/md/0" from console between two installation steps.

Revision history for this message
Justin Traer (justin-traer) wrote :

I installed 7.04 this wk after having to swap out a flakey motherboard and I end up reusing alot of the same parts.

Doing so I ran into a few problems while setting up RAID. I ran into this bug repeatedly (I was tweaking things) and I found that I had to make the symlink as Soja described. That allowed the RAID setup to delete the array.

In Bug #22301, Colin Watson mentions changes/improvements that need to happen to that stage of the install so that the md devices are not started or over written by accident.

Revision history for this message
Aaron Thul (aaron-thul) wrote :

Has anyone been able to reproduce this problem recently?

Revision history for this message
Travis Whitaker (pi-boy-travis) wrote :

This bug needs more info regarding the latest release and packages.

Changed in partman-md (Ubuntu):
status: New → Incomplete
Revision history for this message
Vish (vish) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.
We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future.
To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New".

Changed in partman-md (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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