[CentOS] kickstart - dont wipe data

Thu Aug 7 15:48:02 UTC 2014
Markus Falb <markus.falb at fasel.at>

On 7.8.2014 12:10, Maxim Shpakov wrote:
> Hi!
> 
> I think that your problem is here
> 
> volgroup v pv.00 --noformat

This gives another error

...
Members may not be specified for preexisting volgroup
...

This is not documented in the Installation Guide, but at
http://fedoraproject.org/wiki/Anaconda it is stated

...
--noformat
    Use an existing volume group. Do not specify partitions when using
this option.
...

Also note that this line works for the one disk install!

Thanks anyways, Markus

> 
> 2014-08-07 13:06 GMT+03:00 Markus Falb <markus.falb at fasel.at>:
>> Hi,
>> I am struggling with kickstart.
>> What I want to achieve is a reinstall, but some data partitions should
>> survive the install, i.e. they should not be formatted.
>> With a single disk this works, here is the relevant part from the
>> kickstart file (I shortened the name of the volume group)
>>
>> ...
>> zerombr
>> clearpart --none --initlabel
>> part /boot --fstype="xfs"   --label=boot --onpart=vda1
>> part pv.00 --fstype="lvmpv"              --onpart=vda2 --noformat
>> volgroup v --noformat
>> logvol /     --fstype=xfs  --name=wurzel --vgname=v --useexisting
>> logvol /home --fstype=ext4 --name=home   --vgname=v --noformat
>> ...
>>
>> you see, / will be reformatted, /boot will be reformatted, but /home
>> will not.
>>
>> Now a machine with md raid 1. I tried the following.
>>
>> ...
>> #zerombr
>> #clearpart --none --initlabel
>>
>> part raid.01 --onpart vda1 --noformat
>> part raid.02 --onpart vdb1 --noformat
>> raid /boot --fstype xfs --label boot --level 1 --device md0 --noformat
>>
>> part raid.11 --onpart vda2 --noformat
>> part raid.12 --onpart vdb2 --noformat
>> raid pv.00 --level 1 --device md1 --noformat
>>
>> volgroup v --noformat
>> logvol /     --fstype=xfs --name=wurzel --vgname=v --useexisting
>> logvol /home --fstype=ext4 --name=home  --vgname=v --noformat
>> ...
>>
>> But I get
>>
>> ...
>> 02:54:21,069 ERR anaconda: storage configuration failed: The following
>> problem occurred on line 6 of the kickstart file:
>>
>> No preexisting RAID device with the name "0" was found.
>> ...
>>
>> What is wrong? I really want preserve data and only wipe system.