Hi,
I have setup FAI from debian squeeze about a month or so back, and
have been successfully testing it since until two nights ago!
While it was working perfectly, now, after building a fresh
nfsroot from squeeze (fai-setup), the client node installation fails
at the disk format task,
with the following message:
"Failed to obtain UUID for /dev/mapper/main-root". Looking at the
format.log (attached), I found out that fai-vol_id -u
/dev/mapper/main-root returns nothing, and so does fai-vol_id -l.
Further investigation revealed that there is no UUID set for that
device (/dev/mapper/main-root). I verified this by running blkid, the
tool that fai-vol_id calls behind the scenes in my setup.
Referring to my disk_config (attached in-line below), I have three
disk volumes: /dev/md0 (/boot - raid1), /dev/mapper/main-swap (swap -
lvm lv on /dev/md1 raid10), and /dev/mapper/main-root (/ - lvm lv on
/dev/md1 raid10). Running blkid on the client node after the disk task
fails shows UUIDs
for everything except /dev/mapper/main-root. The raw disk partitions
(/dev/sd[abcd][12]), the raid devices
(/dev/md[01]) and the swap volume (/dev/mapper/main-swap) all have UUIDs.
I find this extremely strange
since the same exact disk_config file was working fine, and I could
not pinpoint a package upgrade in squeeze the can be responsible -
although I haven't looked for one hard enough, admittedly.
I repeated the experiment on a working pair of nodes: a FAI server and
a FAI client. Using the old nfsroot, the client got past the
disk_config without error. After rebuilding the nfsroot (rm -r
/srv/fai/nfsroot; fai-setup -U -v) and absolutely no other changes,
the client install fails at the disk_config.
My disk_config. Physical disks: 4x250GB.
============ disk_config =====================
disk_config sda bootable:1
primary - 500MiB - -
primary - 0- - -
disk_config sdb bootable:1
primary - 500MiB - -
primary - 0- - -
disk_config sdc bootable:1
primary - 500MiB - -
primary - 0- - -
disk_config sdd bootable:1
primary - 500MiB - -
primary - 0- - -
disk_config raid
raid1 /boot sda1,sdb1,sdc1,sdd1 ext4 rw createopts="-L boot"
raid10 - sda2,sdb2,sdc2,sdd2 - -
disk_config lvm
vg main md1
main-swap swap 4GiB swap sw
createopts="-L swap"
main-root / 0- ext4 rw,errors=remount-ro
createopts="-L root"
=================== end disk_config ============================
Starting setup-storage 1.2.1
Using config file: /var/lib/fai/config/disk_config/ARCHLAB
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
Executing: parted -s /dev/sdb unit B print free
Executing: parted -s /dev/sdb unit chs print free
Executing: parted -s /dev/sdc unit TiB print
Executing: parted -s /dev/sdc unit B print free
Executing: parted -s /dev/sdc unit chs print free
Executing: parted -s /dev/sdd unit TiB print
Executing: parted -s /dev/sdd unit B print free
Executing: parted -s /dev/sdd unit chs print free
Finding all volume groups
No volume groups found
Executing: mdadm --detail --scan --verbose -c partitions
Executing: parted -s /dev/sdb mklabel msdos
Executing: parted -s /dev/sdb mklabel msdos
Executing: parted -s /dev/sdb mkpart primary 32256B 518192639B
Executing: parted -s /dev/sdb mkpart primary 518192640B 5362882559B
Executing: parted -s /dev/sdb set 1 boot on
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mkpart primary 32256B 518192639B
Executing: parted -s /dev/sda mkpart primary 518192640B 5362882559B
Executing: parted -s /dev/sda set 1 boot on
Executing: parted -s /dev/sdc mklabel msdos
Executing: parted -s /dev/sdc mklabel msdos
Executing: parted -s /dev/sdc mkpart primary 32256B 518192639B
Executing: parted -s /dev/sdc mkpart primary 518192640B 5362882559B
Executing: parted -s /dev/sdc set 1 boot on
Executing: parted -s /dev/sdd mklabel msdos
Executing: parted -s /dev/sdd mklabel msdos
Executing: parted -s /dev/sdd mkpart primary 32256B 518192639B
Executing: parted -s /dev/sdd mkpart primary 518192640B 5362882559B
Executing: parted -s /dev/sdd 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/sdd set 1 raid on
Executing: parted -s /dev/sdc set 1 raid on
Executing: yes | mdadm --create /dev/md0 --level=raid1 --force --run --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdd1 /dev/sdc1
Executing: mkfs.ext4 -L boot /dev/md0
Command mkfs.ext4 -L boot /dev/md0 had exit code 1
Executing: parted -s /dev/sdd set 2 raid on
Command parted -s /dev/sdd set 2 raid on had exit code 1
Executing: parted -s /dev/sdc set 2 raid on
Command parted -s /dev/sdc set 2 raid on had exit code 1
Executing: parted -s /dev/sdb set 2 raid on
Command parted -s /dev/sdb set 2 raid on had exit code 1
Executing: parted -s /dev/sda set 2 raid on
Command parted -s /dev/sda set 2 raid on had exit code 1
Executing: yes | mdadm --create /dev/md1 --level=raid10 --force --run --raid-devices=4 /dev/sdd2 /dev/sdc2 /dev/sdb2 /dev/sda2
Executing: pvremove -ff -y /dev/md1
Executing: pvcreate /dev/md1
Executing: vgcreate main /dev/md1
Executing: vgchange -a y main
Executing: lvcreate -n swap -L 4096 main
Executing: mkswap /dev/main/swap
Executing: lvcreate -n root -L 5052.10756835937 main
Executing: mkfs.ext4 -L root /dev/main/root
Command mkfs.ext4 -L root /dev/main/root had exit code 1
Executing: readlink -f /dev/main/swap
Executing: fai-vol_id -u /dev/mapper/main-swap
Executing: fai-vol_id -l /dev/mapper/main-swap
/dev/mapper/main-swap UUID=95c4919f-648c-43be-8dfd-02720ce65abb
Executing: readlink -f /dev/main/root
Executing: fai-vol_id -u /dev/mapper/main-root
Command fai-vol_id -u /dev/mapper/main-root had exit code 2
Failed to obtain UUID for /dev/mapper/main-root.
This may happen if the device was part of a RAID array in the past;
in this case run mdadm --zero-superblock /dev/mapper/main-root and retry