setup-storage & preserve_lazy on LVM

Michael Tautschnig mt at debian.org
Mon Mar 28 21:17:47 CEST 2011


Hi Mât,

[...]
> I'm using FAI 4.0~beta2+experimental70 for my tests and can't get it to
> work.
> 
> For the sudding case, I've used a "simple" class to made an initial
> install. Then I've added some partitions to the preserve_lazy command
> and reinstall.
> 
> I think there are two issues:
> 
> * I've saw in the debug output that my LVM parts will be preserved and
> my PV part will also be preserved (good here) but setup-storage try to
> create the PV partition (but it shouldn't !). Hopefully it give me an
> error about /dev/sda9 is in use and stop here.
> 

I'm not 100% sure I understand what you mean by "create the PV partition (but it
shouldn't)" - you asked to preserve partition 9 (well, implicitly, you want to
preserve the LVM volumes and therefore setup-storage infers that this partition
must be preserved. To setup-storage, this means that it will rebuild the
partition in the very same place and won't do any formatting. 

> * In the logs I saw "/dev/sda4 will be resized", why should this part be
> resized, as it is the same partition plan !?
> 

Well, indeed I could add a logic to detect that the partition hasn't moved at
all and could therefore just be rebuilt as is. (That is, the logical partition
will be created in the same place and the containing extended partition will be
resized, which is a no-op in this case.)

Therefore I don't quite see a problem with these steps, apart from the fact that
at some point ...

> I'll send the two debug output logs to Michael by private mail.
> 

... in these logs we have:

(CMD) parted -s /dev/sda mklabel msdos 1> /tmp/KATiFXM2l8 2> /tmp/P8rxJ2K0zg
Executing: parted -s /dev/sda mklabel msdos
(STDOUT) Warning: WARNING: partition(s) 5 on /dev/sda could not be modified, probably because it/they is/are in use.  As a result, the old partition(s) will remain in use until after reboot. You should reboot now before making further changes.

(And several more of these until finally it all fails for /dev/sda9.)

> I hope we can't solve this :)
            ^^^^^^ 

Are you sure? Then we're fine off I guess :-))))

> Bests
> Mât
> 
> PS: I've also seen this message:
> "Can't exec "mdadm-startall": No such file or directory
> at /usr/sbin/setup-storage line 146, <$config_file> line 1."
> 
> What should I do ? Should I install mdadm-startall in my nfsroot, or
> setup-storage should check if the command is available before calling
> it ?

Ok, so first of all:

- I tried your configs in an attempt to reproduce your problem. But for me it
  works!? Therefore I wonder whether this is related to a particular version of
  some tool!? Could you run parted --version in your NFSROOT?
- I've used squeeze, which version of Debian or Ubuntu is your NFSROOT based
  upon?
- I think the missing mdadm-startall isn't quite fatal, but obviously it isn't
  nice either. As squeeze is Debian/stable, presumably all recent Debian or
  Ubuntu distributions provide that command, however.
- Just to rule out sources of randomness: could you simply give it another try?

Best regards,
Michael



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20110328/edca3a24/attachment.bin>


More information about the linux-fai mailing list