FAI client Install: 12.04: mdadm fails to create /dev/md0 or /dev/md1

Denny Schierz linuxmail at 4lin.net
Wed May 16 08:59:30 UTC 2012


hi,

I try to get Ubuntu 12.04 installed, via a Fai Debian Squeeze server. The partition setup is very easy, only create two partitions on /dev/sd[ab] with raid1 and on top LVM, but every time setup-storage breaks:

root at A-CLIENT:~# setup-storage -X

Starting setup-storage 1.3
Using config file: /var/lib/fai/config/disk_config/ANNABELL
Executing: parted -s /dev/sda unit TiB print
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda unit TiB print
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
Executing: parted -s /dev/sdb unit TiB print
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/sdb mklabel msdos
Executing: parted -s /dev/sdb unit TiB print
Executing: parted -s /dev/sdb unit B print free
Executing: parted -s /dev/sdb unit chs print free
    Finding all volume groups
  No volume groups found
Executing: mdadm --examine --scan --verbose -c partitions
Executing: parted -s /dev/sdb mklabel msdos
Executing: parted -s /dev/sdb mkpart primary "" 32256B 314605055B
Executing: parted -s /dev/sdb mkpart primary "" 314605056B 12884901887B
Executing: parted -s /dev/sdb set 1 boot on
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mkpart primary "" 32256B 314605055B
Executing: parted -s /dev/sda mkpart primary "" 314605056B 12884901887B
Executing: parted -s /dev/sda set 1 boot on
Executing: parted -s /dev/sda set 1 raid on
Executing: parted -s /dev/sdb set 1 raid on
Executing: parted -s /dev/sdb set 2 raid on
Executing: parted -s /dev/sda set 2 raid on
Executing: yes | mdadm --create  /dev/md0 --level=raid1 --force --run --raid-devices=2 /dev/sda1 /dev/sdb1 
Command had non-zero exit code

I've cleared both devices with dd if=/dev/zero of=/dev/sd[ab] ...

root at A-CLIENT:~# cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdb1[1] sda1[0]
      307188 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>

DMESG:

[...]

[    3.048908] scsi target2:0:1: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
[    3.051766] sd 2:0:0:0: [sda] 25165824 512-byte logical blocks: (12.8 GB/12.0 GiB)
[    3.051989] sd 2:0:0:0: [sda] Write Protect is off
[    3.052110] sd 2:0:0:0: [sda] Mode Sense: 03 00 00 00
[    3.052136] sd 2:0:0:0: [sda] Cache data unavailable
[    3.054966] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    3.055591] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    3.057162] sd 2:0:1:0: [sdb] 25165824 512-byte logical blocks: (12.8 GB/12.0 GiB)
[    3.057436] sd 2:0:1:0: [sdb] Write Protect is off
[    3.057557] sd 2:0:1:0: [sdb] Mode Sense: 03 00 00 00
[    3.057580] sd 2:0:1:0: [sdb] Cache data unavailable
[    3.057701] sd 2:0:1:0: [sdb] Assuming drive cache: write through
[    3.057965] sd 2:0:1:0: [sdb] Cache data unavailable
[    3.058087] sd 2:0:1:0: [sdb] Assuming drive cache: write through
[    3.058704] sd 2:0:1:0: Attached scsi generic sg2 type 0
[    3.059286] sd 2:0:0:0: [sda] Cache data unavailable
[    3.059410] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    3.067747]  sdb: unknown partition table
[    3.068006] sd 2:0:1:0: [sdb] Cache data unavailable
[    3.068129] sd 2:0:1:0: [sdb] Assuming drive cache: write through
[    3.068258] sd 2:0:1:0: [sdb] Attached SCSI disk
[    3.071853]  sda: unknown partition table
[    3.072102] sd 2:0:0:0: [sda] Cache data unavailable
[    3.072230] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    3.072361] sd 2:0:0:0: [sda] Attached SCSI disk
[    4.075086] RPC: Registered named UNIX socket transport module.
[    4.075222] RPC: Registered udp transport module.
[    4.075337] RPC: Registered tcp transport module.
[    4.075452] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    4.077620] FS-Cache: Loaded
[    4.082132] FS-Cache: Netfs 'nfs' registered for caching
[    4.096443] aufs 3.2-20120109
[    4.799546] udevd[499]: starting version 175
[    4.988326] ACPI: resource piix4_smbus [io  0x1040-0x1047] conflicts with ACPI region SMB_ [io 0x1040-0x104b]
[    4.988549] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    4.998499] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    5.055005] parport_pc 00:08: reported by Plug and Play ACPI
[    5.055398] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[    5.131167] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input2
[    5.227786] ppdev: user-space parallel port driver
[    5.266843] init: udev-fallback-graphics main process (675) terminated with status 1
[    5.567628] usbcore: registered new interface driver usbkbd
[    5.567630] usbkbd: :USB HID Boot Protocol keyboard driver
[   13.012632] sd 2:0:0:0: [sda] Cache data unavailable
[   13.012940] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   13.013967]  sda: unknown partition table
[   13.206613] sd 2:0:1:0: [sdb] Cache data unavailable
[   13.206920] sd 2:0:1:0: [sdb] Assuming drive cache: write through
[   13.208029]  sdb: unknown partition table
[   13.867321] eth0: no IPv6 routers present
[   14.857192] md: could not open unknown-block(8,1).
[   14.857494] md: md_import_device returned -16
[   14.869735] md: bind<sda1>
[   14.875013] md: bind<sdb1>
[   14.876543] bio: create slab <bio-1> at 1
[   14.876589] md/raid1:md0: not clean -- starting background reconstruction
[   14.878538] md/raid1:md0: active with 2 out of 2 mirrors
[   14.878600] md0: detected capacity change from 0 to 314560512
[   14.880348] md: resync of RAID array md0
[   14.880350] md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
[   14.880352] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.
[   14.880355] md: using 128k window, over a total of 307188k.
[   14.887112]  md0: unknown partition table
[   18.974646] md: md0: resync done.
[   18.996588] RAID1 conf printout:
[   18.996590]  --- wd:2 rd:2
[   18.996593]  disk 0, wo:0, o:1, dev:sda1
[   18.996594]  disk 1, wo:0, o:1, dev:sdb1


sometimes I have:

cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdb1[1] sda1[0]
      307188 blocks super 1.2 [2/2] [UU]
      
md127 : inactive sda2[1](S)
      12274656 blocks super 1.2
       
md1 : inactive sdb2[0](S)
      12274656 blocks super 1.2
       
unused devices: <none>

I tried to use mdadm from Squeeze and also the kernel, which I use for my Squeeze setups, but it _always_ fails getting madm to work. I have also created a Fai hook, to stop existing raids and overwrite everything with zeros, but nothing helps. The same setup works for Squeeze.

Another try, after clearing the devices:

root at A-CLIENT:~# setup-storage -X

Starting setup-storage 1.3
Using config file: /var/lib/fai/config/disk_config/ANNABELL
Executing: parted -s /dev/sda unit TiB print
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda unit TiB print
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
Executing: parted -s /dev/sdb unit TiB print
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/sdb mklabel msdos
Executing: parted -s /dev/sdb unit TiB print
Executing: parted -s /dev/sdb unit B print free
Executing: parted -s /dev/sdb unit chs print free
    Finding all volume groups
  No volume groups found
Executing: mdadm --examine --scan --verbose -c partitions
Executing: parted -s /dev/sdb mklabel msdos
Executing: parted -s /dev/sdb mkpart primary "" 32256B 314605055B
Executing: parted -s /dev/sdb mkpart primary "" 314605056B 12884901887B
Executing: parted -s /dev/sdb set 1 boot on
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mkpart primary "" 32256B 314605055B
Executing: parted -s /dev/sda mkpart primary "" 314605056B 12884901887B
Executing: parted -s /dev/sda set 1 boot on
Executing: parted -s /dev/sda set 1 raid on
Executing: parted -s /dev/sdb set 1 raid on
Executing: parted -s /dev/sdb set 2 raid on
Executing: parted -s /dev/sda set 2 raid on
Executing: yes | mdadm --create  /dev/md0 --level=raid1 --force --run --raid-devices=2 /dev/sda1 /dev/sdb1 
Executing: mkfs.ext3  /dev/md0
Executing: yes | mdadm --create  /dev/md1 --level=raid1 --force --run --raid-devices=2 /dev/sdb2 /dev/sda2 
Command had non-zero exit code

root at A-CLIENT:~# cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdb1[1] sda1[0]
      307188 blocks super 1.2 [2/2] [UU]
      [==================>..]  resync = 93.6% (287872/307188) finish=0.0min speed=57574K/sec
      
md127 : inactive sda2[1](S)
      12274656 blocks super 1.2
       
md1 : inactive sdb2[0](S)
      12274656 blocks super 1.2
       
unused devices: <none>

[...]


(just a small notice, the nfs root for fai is also a bootstraped for/with Ubuntu 12.04 on the Debian side)


I think, it must have have something to do, with the base system from Ubuntu.

any suggestions?

cu denny

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20120516/d3669d61/attachment.sig>


More information about the ubuntu-users mailing list