Still puzzled by setup-storage

Michael Tautschnig mt at debian.org
Tue Dec 29 07:54:07 CET 2009


> Hi all,
> 
> I'm still puzzled by setup-storage (fai 3.2.17~lenny1). Imagine a server with 
> two (locical) device sda and sdb and the following disk_layout:
> 
> disk_config disk1 disklabel:msdos bootable:1
> 
> primary  /boot         128      ext3     rw,errors=remount-ro
> primary  /             8000   ext3      rw
> primary  swap          8192    swap     sw
> logical  /var         20000        ext3    rw
> logical  /tmp         2000         ext3    rw
> logical  /local        5000-       ext3    rw,nosuid createopts="-
> m1",tuneopts="-c0 -i0"
> 
> disk_config disk2 disklabel:gpt preserve_reinstall:1
> primary     /data               1000-   xfs     rw
> 
> This one does preserve the data partition upon a reinstall as I want it. 
> However, when I put new disks into this system, it will barf at me, as I've 
> not given it the "initial" flag and terminate the install. If I keep the 
> initial flag, data would be wiped out during the install.
> 
> With preserve_always it will stop the install if this partition does not exist 
> or will keep it, if it's already there.
> 

That is the expected and seemingly correct behaviour, yes.

> Is there a generic way to do "create the partition if it's not yet present 
> otherwise keep it?"
> 

Basically: No, because I had considered this too dangerous (note that
setup-storage stops in all those cases described above, where the system does
not match what the admin specified; if you say "initial" then setup-storage
cannot tell that this is not the case).

I'd see several ways to solve this, as it seems to pose a problem for you (and
possible others users). The hack: Change your config to say preserve_##UNDEF##:1
and have a hook run before partitioning that replaces ##UNDEF## by reinstall or
always, depending on the contents of /proc/partitions or the like. A true hack.

The much nicer approach is introducing something like preserve_lazy:1 (a tribute
to lazyformat...; but hints for better names are welcome) which causes behaviour
exactly as you described. Shouldn't be too much of a hassle, but I cannot tell
whether it'll be done in a day or a week.

Best,
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/20091229/fe3a495e/attachment.bin 


More information about the linux-fai mailing list