Retaining software RAID devices during automated installation with autoyast

Anton Altaparmakov <[email protected]>
Newsgroups gmane.linux.suse.autoinstall
Message-ID <[email protected]>
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?

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>
      </drive>
    </partitioning>

Btw. the disks are gpt as they are 3TiB disks...

PS. I am installing SLES 11 SP2 x86_64 if that matters.

Thanks a lot in advance!

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/


-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.