Hi, I'm using the FAI 3.4.2 packages for Ubuntu Lucid from
http://ppa.launchpad.net/fai/ppa/ubuntu/. In general it's been working very
well, but I'm trying now to set up a box with software raid and running into
errors from setup-storage. Any help would be much appreciated.

The contents of disk_config/PHYSICAL_APPLIANCE are:

----
disk_config sda virtual
primary -       0-      -       -
#primary        -       4096    -       -

disk_config sdb virtual
primary -       0-      -       -
#primary        -       4096    -       -

disk_config raid
raid1   /       sda1,sdb1       ext4    rw,noatime      createopts="-m 1"
#raid1  swap    sda2,sdb2       swap    sw
----

(I commented out the swap MD just in case that was causing some kind of
issue, but I'll want that in the final config)

When I run without debugging, I get this in format.log:

----
Starting setup-storage 1.3
Using config file: /var/lib/fai/config/disk_config/PHYSICAL_APPLIANCE
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 --detail --scan --verbose -c partitions
Cannot satisfy pre-depends for true: ,type_raid_/dev/sda1 -- system left
untouched.
----

If I run 'mdadm --detail --scan --verbose -c partitions' there's no output.
I've attached the output of a debug run, please let me know if there's any
other info that would be helpful.

Thanks much.
Starting setup-storage 1.3
disklist was: 
Using config file: /var/lib/fai/config/disk_config/PHYSICAL_APPLIANCE
Input was:
disk_config sda virtual
primary	-	0-	-	-
#primary	-	4096	-	-

disk_config sdb virtual
primary	-	0-	-	-
#primary	-	4096	-	-

disk_config raid
raid1	/	sda1,sdb1	ext4	rw,noatime	createopts="-m 1"
#raid1	swap	sda2,sdb2	swap	sw
    Finding all volume groups
  No volume groups found
(CMD) mdadm --detail --scan --verbose -c partitions 1> /tmp/VmjzhIMPx5 2> /tmp/PJ_45vZCxP
Executing: mdadm --detail --scan --verbose -c partitions
Current disk layout
$VAR1 = {};
Current LVM layout
$VAR1 = {};
Current RAID layout
$VAR1 = {};
Desired disk layout
$VAR1 = {
          'PHY_/dev/sdb' => {
                              'preserveparts' => 0,
                              'disklabel' => 'msdos',
                              'partitions' => {
                                                '1' => {
                                                         'encrypt' => 0,
                                                         'number' => 1,
                                                         'filesystem' => '-',
                                                         'mountpoint' => '-',
                                                         'mount_options' => '-',
                                                         'size' => {
                                                                     'resize' => 0,
                                                                     'always_format' => 0,
                                                                     'range' => '0-100%',
                                                                     'preserve' => 0,
                                                                     'extended' => 0
                                                                   }
                                                       }
                                              },
                              'fstabkey' => 'device',
                              'bootable' => -1,
                              'virtual' => 1
                            },
          'RAID' => {
                      'volumes' => {
                                     '0' => {
                                              'journal_dev' => undef,
                                              'encrypt' => 0,
                                              'filesystem' => 'ext4',
                                              'mode' => '1',
                                              'createopts' => '-m 1',
                                              'mountpoint' => '/',
                                              'preserve' => 0,
                                              'mount_options' => 'rw,noatime',
                                              'devices' => {
                                                             '/dev/sda1' => {
                                                                              'missing' => 0,
                                                                              'spare' => 0
                                                                            },
                                                             '/dev/sdb1' => {
                                                                              'missing' => 0,
                                                                              'spare' => 0
                                                                            }
                                                           }
                                            }
                                   },
                      'fstabkey' => 'device'
                    },
          'PHY_/dev/sda' => {
                              'preserveparts' => 0,
                              'disklabel' => 'msdos',
                              'partitions' => {
                                                '1' => {
                                                         'encrypt' => 0,
                                                         'number' => 1,
                                                         'filesystem' => '-',
                                                         'mountpoint' => '-',
                                                         'mount_options' => '-',
                                                         'size' => {
                                                                     'resize' => 0,
                                                                     'always_format' => 0,
                   Cannot satisfy pre-depends for true: ,type_raid_/dev/sda1 -- system left untouched.
                                                  'range' => '0-100%',
                                                                     'preserve' => 0,
                                                                     'extended' => 0
                                                                   }
                                                       }
                                              },
                              'fstabkey' => 'device',
                              'bootable' => -1,
                              'virtual' => 1
                            }
        };
/ FS create_options: -m 1
Trying to add CMD: true
PRE: 
POST: exist_/dev/sdb1
Trying to add CMD: true
PRE: 
POST: exist_/dev/sda1
Trying to add CMD: parted -s /dev/sda set 1 raid on
PRE: cleared2_/dev/sda,exist_/dev/sda1
POST: type_raid_/dev/sda1
Trying to add CMD: parted -s /dev/sdb set 1 raid on
PRE: cleared2_/dev/sdb,exist_/dev/sdb1
POST: type_raid_/dev/sdb1
Trying to add CMD: yes | mdadm --create  /dev/md0 --level=raid1 --force --run --raid-devices=2 /dev/sda1 /dev/sdb1 
PRE: pt_complete_/dev/sda,pt_complete_/dev/sdb
POST: exist_/dev/md0
Trying to add CMD: mkfs.ext4 -m 1 /dev/md0
PRE: exist_/dev/md0
POST: has_fs_/dev/md0
Trying to add CMD: true
PRE: 
POST: all_pv_sigs_removed
Trying to add CMD: true
PRE: ,type_raid_/dev/sda1
POST: pt_complete_/dev/sda
Trying to add CMD: true
PRE: ,type_raid_/dev/sdb1
POST: pt_complete_/dev/sdb
Trying to add CMD: parted -s /dev/sda set 1 raid on
PRE: cleared2_/dev/sda,exist_/dev/sda1
POST: type_raid_/dev/sda1
Trying to add CMD: parted -s /dev/sdb set 1 raid on
PRE: cleared2_/dev/sdb,exist_/dev/sdb1
POST: type_raid_/dev/sdb1
Trying to add CMD: yes | mdadm --create  /dev/md0 --level=raid1 --force --run --raid-devices=2 /dev/sda1 /dev/sdb1 
PRE: pt_complete_/dev/sda,pt_complete_/dev/sdb
POST: exist_/dev/md0
Trying to add CMD: mkfs.ext4 -m 1 /dev/md0
PRE: exist_/dev/md0
POST: has_fs_/dev/md0
Trying to add CMD: true
PRE: ,type_raid_/dev/sda1
POST: pt_complete_/dev/sda

Antwort per Email an