FAI dying during partition setup

Holger Parplies wfai at parplies.de
Mon Sep 29 23:50:20 CEST 2008


Hi,

Ryan Steele wrote on 2008-09-29 17:13:29 -0400 [Re: FAI dying during partition setup]:
> >>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.  [...]

while I have no experience with FAI > 3.1.8 or the LVM hooks, I would guess
that, for some reason, the volume group is activated (do you have anything in
/dev/mapper?). You could see if 'vgchange -an' changes anything about the
BLKRRPART (that's one of the things I like about FAI - you can debug your
scripts in the exact context they are run).

I use FAI 3.1.8 with my own partition-hook for managing my own LVM requirements
(like sometimes keeping some of the LVs ...). What works for me without any
problems (including repeated installation with identical disk layout) is
basically

- sfdisk
- modprobe dm_mod
- pvcreate -y -ff [and I didn't mention -ff ;-]
- vgscan

and so on (including mke2fssing my root partition, which isn't on LVM). Of
course I don't pvcreate in the cases I want to keep LVs :).

I realize FAI 3.2.4 is a totally different context (kernel version, etc.), but
maybe it helps just the same.

> >2. Added "dm_mod" to the list of kernelmodules in 20-hwdetect.source

So I guess my suggestion is, basically, to modprobe dm_mod later, specifically
after the sfdisk has been done.

Regards,
Holger


More information about the linux-fai mailing list