Disk_config lens for Augeas

Raphaël Pinson raphink at gmail.com
Mon Sep 5 15:25:51 CEST 2011


On Fri, Sep 2, 2011 at 2:53 PM, Michael Tautschnig <mt at debian.org> wrote:

> Hi again,
>
> [...]
> >
> > I have noticed that the schema on the wiki is outdated, and sometimes not
> > functional even. With the lens in the current state, I've been able to
> > successfully parse 477 disk_config files we use in production. I'd be
> happy
> > to get more tricky cases to test if you wish to send some to me.
> >
>
> I think the following three examples should be of such nature:
>
> Config 1:
>
> disk_config disk1 bootable:1 preserve_always:all
> always_format:5,6,7,8,9,10,11
>
primary  -         0   -     -
> primary  -         0   -     -
> logical  /         0   ext3  rw,relatime,errors=remount-ro   createopts="-c
> -j"
> logical  swap      0   swap  sw
> logical  /var      0   ext3  rw,relatime                     createopts="-m
> 5 -j"
> logical  /tmp      0   ext3  rw                              createopts="-m
> 0 -j"
> logical  /usr      0   ext3  rw,relatime
> createopts="-j"
> logical  /home     0   ext3  rw,relatime,nosuid,nodev        createopts="-m
> 1 -j"
> logical  /wrk      0   ext3  rw,relatime,nosuid,nodev        createopts="-m
> 1 -j"
> logical  /transfer 0   vfat  rw
>
>
> Config 2:
>
> disk_config /dev/sda
> primary  -  250M  -  -
> primary  -  20G   -  -
> logical  -  8G    -  -
> logical  -  4G    -  -
> logical  -  5G    -  -
>
> disk_config /dev/sdb sameas:/dev/sda
>
> disk_config raid
> raid1  /boot  sda1,sdb1  ext3  defaults
> raid1  /      sda2,sdb2  ext3  defaults,errors=remount-ro
> raid1  swap   sda5,sdb5  swap  defaults
> raid1  /tmp   sda6,sdb6  ext3  defaults createopts="-m 1"
> raid1  /var   sda7,sdb7  ext3  defaults
>
>
> Config 3:
>
> disk_config /dev/sdb
> primary  /      21750  ext3  defaults,errors=remount-ro
> primary  /boot  250    ext3  defaults
> logical  -      4000   -     -
> logical  -      2000   -     -
> logical  -      10-    -     -
>
> disk_config cryptsetup randinit
> swap  swap      /dev/sdb5  swap  defaults
> tmp   /tmp      /dev/sdb6  ext2  defaults
> luks  /local00  /dev/sdb7  ext3  defaults,errors=remount-ro  createopts="-m
> 0"
>
>
>
I updated the lens to support these examples. See [0] to see how they are
parsed by Augeas.


Cheers,


Raphaël


[0]
http://git.fedorahosted.org/git/?p=augeas.git;a=blob;f=lenses/tests/test_fai_diskconfig.aug;h=f35feda5e3118692d29c0b45dc6685735f8ff4eb;hb=11c16475a064ce20edd19a7bf8a998e4fcb5e571
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20110905/2b236512/attachment.html>


More information about the linux-fai-devel mailing list