Thursday, June 18, 2009

One string to rule them all ...

... one string to find them
Lord of the Rings (almost)

On openSUSE 11.2 I did a little change with the handling of how AutoYaST looks for the profile on devices. Currently you have to do it this way:

autoyast=device://sde2/mydir/myprofile.xml

to find the profile on /dev/sde2 in the path /mydir/myprofile.xml.
On openSUSE 11.2 you can use one string to find a profile on every device AutoYaST can find. So with:

autoyast=device:///mydir/myprofile.xml

AutoYaST will look for the profile on every device it can mount and will stop looking when the profile is found. Take care that you use three slashes if you want to use that feature. The old syntax with naming the device still works of course.
Actually that can even make the autoyast=usb://myprofile.xml superfluously because USB devices are found and mounted too with the new feature. I'll still keep the old USB syntax for a while but I might change the code underneath the veil to use the new "devices://" code.

Ciao! - Uwe

Wednesday, June 10, 2009

Two AutoYaST Features by One Char

and the star char is - The Slash!

Feature 1:
On openSUSE 11.2, if you add a "/" at the end of a filename in the <files> section, AutoYaST will create a directory:


<files config:type="list">
<config_file>
<file_path>/myData/</file_path>
<file_permissions>644</file_permissions>
</config_file>
...
</files>


Maybe nothing which makes the crowd go wild but might be useful from time to time and saves you from writing a script just for that.

Feature 2:
That's a bit more impressive than the first. If you use a "/" at the beginning of a <package> or <pattern>, you tell AutoYaST to interpret it as a regular expression like this:


<software>
<patterns config:type="list">
<pattern>/.*_server</pattern>
</patterns>
<packages config:type="list">
<pattern>/kde4.*</pattern>·
</packages>
</software>


Beware of using <package>/.*</package> because that will select every package and some of them conflict.

happy slashing ;) - Uwe

Tuesday, June 2, 2009

AutoYaST and LVM striping

A less known fact of the AutoYaST LVM configuration is, that it can do striping too. The reason for that being less known might be, that I just documented it a few weeks ago, even though that feature was available since ages.
If you now say "I want that!!! What is it good for?" you can read this article. In a nutshell, with striping you spread the harddisk IO across multiple physical devices which increases the IO performance but also the risk of data loss, so never use that without a RAID system below.

How to use that in AutoYaST? Just configure the number of physical devices and the blocksize in KB like this:


<drive>
<device>/dev/data_vg</device>
<is_lvm_vg config:type="boolean">true</is_lvm_vg>
<type config:type="symbol">CT_LVM</type>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<lv_name>my_data_lv</lv_name>
<mount>/data</mount>
<stripes config:type="integer">2</stripes>
<stripesize config:type="integer">4</stripesize>
<size>10G</size>
</partition>
</partitions>
<pesize>4M</pesize>
<use>all</use>
</drive>

That's the same like you would do without striping, except for those two keys:

<stripes config:type="integer">2</stripes>

which is the number of physical devices you use. And:

<stripesize config:type="integer">4</stripesize>

which is the size of a block in KB. So after writing 4kb the physical device will be switched.
That's all you need to activate striping on a logical volume.


happy striping - Uwe