FAI dying during partition setup

Ryan Steele ryans at aweber.com
Mon Sep 29 18:58:28 CEST 2008


Recently, I've been trying to set up LVM clients with FAI 3.2.4 for 
Ubuntu, using Peter Gervai's well-placed LVM hooks.  However, I keep 
hitting the situation where sfdisk cannot read the partition table, and 
mke2fs cannot create a filesystem, because it thinks the device is in 
use.  It's reproducible every time if I FAI-install the client more than 
once.  E.g., the first time I FAI-install the LVM-enabled host, it 
works.  But then, if I try it again (with the exact same disk_config), 
sfdisk and mke2fs drop me to an emergency shell.  I would guess it's 
because it's unable to get the kernel to re-read the partition table 
without a reboot, but I'm really not sure how FAI can get around that 
situation, as there is currently no method for having FAI "pick up where 
it left off" right after writing the partition table.

Has anybody else encountered this?  It really makes FAI unusable.  
Here's the output from FAI when this happens (from fai.log).  /dev/sda2 
was my LVM volume:

Calling task_install
Calling task_partition
Partitioning local harddisks
setup_harddisks version 0.43fai
Probing disks:  /dev/sda
Disks found: sda

Using config file: /var/lib/fai/config/disk_config/COSTELLO
Mapping disk name disk1 to sda
Creating partition table: LC_ALL=C sfdisk -q  /dev/sda < /tmp/fai/partition.sda
BLKRRPART: Device or resource busy
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before using mkfs
Creating file systems:
  mke2fs -q -c -j /dev/sda1
  mke2fs -q /dev/sda2
/dev/sda2 is apparently in use by the system; will not make a filesystem here!

MKE2FS ERROR:

setup_harddisks version 0.43fai
Probing disks:  /dev/sda
Disks found: sda

Using config file: /var/lib/fai/config/disk_config/COSTELLO
Mapping disk name disk1 to sda
Creating partition table: LC_ALL=C sfdisk -q  /dev/sda < /tmp/fai/partition.sda
Creating file systems:
  mke2fs -q -c -j /dev/sda1
  mke2fs -q /dev/sda2
Save log files via ssh to fai at faimaster:costello/install-20080929_142911


 




More information about the linux-fai mailing list