Re: Retaining software RAID devices during automated installation with autoyast
Thomas Fehr <[email protected]>
| Newsgroups | gmane.linux.suse.autoinstall |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 20, Anton Altaparmakov wrote: > Hi Uwe, > > Doing automated installation of server with / on ext3 on software RAID 1 mirror of /dev/sda2 and /dev/sdb2 and /home on xfs on software RAID 10 of /dev/sda3, /dev/sdb3, /dev/sdc3, /dev/sdd3. > > I want to preserve /home when doing an automated reinstall of the machine. I can keep the existing partitions fine and they get assigned to MD devices correctly. > > However whilst the partitions are being kept fine, I see the messages "deleting MD device" (or some such wording), followed by "creating MD device" (or similar wording) and indeed it then fails to mount /home as the xfs file system is not there any more. )-: > > If I set <create config:type="boolean">false</create> for the partitions on the /dev/md device in the autoyast file then the md devices are still destroyed but then not created again so the install fails immediately as there is nowhere to install. )-: > > Is this a bug or a feature? > > Is there any way I can get autoyast to preserve the existing md devices? I now found time to fiddle around with this and has a closer look at autoyast code handling MD setup. Setup was mostly fine, except <use> in /dev/md part. > If you want to see my autoyast partitioning section, this is it: > > <partitioning config:type="list"> > <drive> > <device>/dev/sda</device> > <initialize>false</initialize> > <disklabel>gpt</disklabel> > <partitions config:type="list"> > <partition> > <create config:type="boolean">false</create> > <partition_nr config:type="integer">1</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">2</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md0</raid_name> > <raid_type>raid1</raid_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">3</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md2</raid_name> > <raid_type>raid10</raid_type> > </partition> > </partitions> > <use>1,2,3</use> > </drive> > <drive> > <device>/dev/sdb</device> > <initialize>false</initialize> > <disklabel>gpt</disklabel> > <partitions config:type="list"> > <partition> > <create config:type="boolean">false</create> > <partition_nr config:type="integer">1</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">2</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md0</raid_name> > <raid_type>raid1</raid_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">3</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md2</raid_name> > <raid_type>raid10</raid_type> > </partition> > </partitions> > <use>1,2,3</use> > </drive> > <drive> > <device>/dev/sdc</device> > <initialize>false</initialize> > <disklabel>gpt</disklabel> > <partitions config:type="list"> > <partition> > <create config:type="boolean">false</create> > <partition_nr config:type="integer">1</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">2</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md1</raid_name> > <raid_type>raid1</raid_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">3</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md2</raid_name> > <raid_type>raid10</raid_type> > </partition> > </partitions> > <use>1,2,3</use> > </drive> > <drive> > <device>/dev/sdd</device> > <initialize>false</initialize> > <disklabel>gpt</disklabel> > <partitions config:type="list"> > <partition> > <create config:type="boolean">false</create> > <partition_nr config:type="integer">1</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">2</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md1</raid_name> > <raid_type>raid1</raid_type> > </partition> > <partition> > <create config:type="boolean">false</create> > <partition_id config:type="integer">253</partition_id> > <partition_nr config:type="integer">3</partition_nr> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <partition_type>primary</partition_type> > <raid_name>/dev/md2</raid_name> > <raid_type>raid10</raid_type> > </partition> > </partitions> > <use>1,2,3</use> > </drive> > <drive> > <device>/dev/md</device> > <initialize>false</initialize> > <partitions config:type="list"> > <partition> > <create config:type="boolean">false</create> > <filesystem config:type="symbol">ext3</filesystem> > <format config:type="boolean">true</format> > <resize config:type="boolean">false</resize> > <mount>/</mount> > <mountby config:type="symbol">device</mountby> > <partition_nr config:type="integer">0</partition_nr> > <raid_options> > <chunk_size>4</chunk_size> > <raid_type>raid1</raid_type> > </raid_options> > </partition> > <partition> > <create config:type="boolean">false</create> > <filesystem config:type="symbol">swap</filesystem> > <format config:type="boolean">true</format> > <resize config:type="boolean">false</resize> > <mount>swap</mount> > <mountby config:type="symbol">device</mountby> > <partition_nr config:type="integer">1</partition_nr> > <raid_options> > <chunk_size>4</chunk_size> > <raid_type>raid1</raid_type> > </raid_options> > </partition> > <partition> > <create config:type="boolean">false</create> > <filesystem config:type="symbol">xfs</filesystem> > <fstopt>relatime,barrier,largeio,logbufs=8,logbsize=256k,swalloc</fstopt> > <format config:type="boolean">false</format> > <resize config:type="boolean">false</resize> > <mount>/home</mount> > <mountby config:type="symbol">device</mountby> > <partition_nr config:type="integer">2</partition_nr> > <raid_options> > <chunk_size>64</chunk_size> > <raid_type>raid10</raid_type> > </raid_options> > </partition> > </partitions> > <use>all</use> Here you just need to have "<use>free</use>" Otherwise the code handles existing raids like existing partitions on a disk and prefers removal of exsiting raids over reusing them. So your setup is fine (except for <use> in /dev/md): - set "initialize" to false for every disk - set "create","format" to false for every partition belonging to a raid - set "initialize" to false for /dev/md - set "create" to false for every raid device in /dev/md to reuse - set "format" for /dev/md as prefered (e.g. false for /home, true for /) - set "<use>free</use>" for /dev/md entry in disks > Btw. the disks are gpt as they are 3TiB disks... In tried with msdos while reproducing, but that should not matter... > PS. I am installing SLES 11 SP2 x86_64 if that matters. I tried also with SLES 11 SP2... > Thanks a lot in advance! You are welcome... Bye, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: [email protected] GPG public key available. -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]